[
  {
    "path": ".github/ISSUE_TEMPLATE/01_bug_report.md",
    "content": "---\nname: Bug Report\nabout: Report an issue in swagger-core\ntitle: \"[Bug]: \"\nlabels: Bug\nassignees: ''\n---\n\n## Description of the problem/issue\n\n<!--\nProvide a clear and concise description of the problem.\nTo help us understand the issue better, consider including:\n- What are you trying to achieve using swagger-core?\n- Are specific annotations not behaving as expected? (e.g., @Schema, @Parameter, @Operation)\n- Are generated OpenAPI specs missing information or incorrect?\n- Are you using swagger-core with JAX-RS, Spring, or another framework?\n- Did this issue affect code generation (e.g., Swagger Codegen/OpenAPI Generator)?\n-->\n\n## Affected Version\n\n<!-- What version of swagger-core are you using? -->\ne.g. 2.2.21\n\n<!-- Can you identify when the issue was introduced?\nIf yes, please provide the earliest version you know the bug exists in. -->\nEarliest version the bug appears in (if known):  \ne.g. 2.2.17\n\n## Steps to Reproduce\n\n<!-- Provide a step-by-step list on how to reproduce the issue.\nInclude any relevant OpenAPI definitions, configuration, or code snippets. -->\n\n1. ...\n2. ...\n3. ...\n\n## Expected Behavior\n\n<!-- What should have happened? -->\n\n## Actual Behavior\n\n<!-- What actually happened instead? -->\n\n## Logs / Stack Traces\n\n<!-- Paste relevant log output or error messages, if any. -->\n\n## Additional Context\n\n<!-- Add any other context, links, or screenshots about the problem here. -->\n\n## Checklist\n\n- [ ] I have searched the [existing issues](https://github.com/swagger-api/swagger-core/issues) and this is not a duplicate.\n- [ ] I have provided sufficient information for maintainers to reproduce the issue.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/02_question.md",
    "content": "---\nname: Question\nabout: Ask a question about swagger-core usage or behavior\ntitle: \"[Question]: \"\nlabels: Question\nassignees: ''\n---\n\n## Question\n\n<!--\nPlease clearly describe your question or the problem you're trying to solve.\nTo help us answer faster, consider including:\n- What are you trying to achieve with swagger-core?\n- Which version are you using?\n- What have you tried so far?\n- Are you encountering unexpected behavior or error messages?\n-->\n\n## Affected Version\n\n<!-- What version of swagger-core are you using? -->\ne.g. 2.2.21\n\n## Context\n\n<!--\nProvide any relevant code snippets, configuration, OpenAPI definitions,\nor links to documentation you are referring to.\n-->\n\n```java\n// Example code snippet here\n```\n\n## Additional Details\n\n<!-- Add any other information that might help us understand your question. -->\n\n## Checklist\n\n- [ ] I have searched the [existing issues](https://github.com/swagger-api/swagger-core/issues) and documentation before asking.\n- [ ] I have provided enough information for others to understand my question."
  },
  {
    "path": ".github/ISSUE_TEMPLATE/03_feature_request.md",
    "content": "---\nname: Feature Request\nabout: Suggest a new feature or enhancement for swagger-core\ntitle: \"[Feature]: \"\nlabels: Feature\nassignees: ''\n---\n\n## Feature Description\n\n<!--\nDescribe the feature you'd like to see.\n- What problem does it solve?\n- How would it improve swagger-core?\n- Is it related to OpenAPI spec support, annotation improvements, integration, etc.?\n-->\n\n## Use Case\n\n<!--\nExplain how you (or others) would use this feature in a real-world project.\nInclude context to help understand why this is valuable.\n-->\n\n## Suggested Solution (optional)\n\n<!--\nIf you have an idea for how the feature could be implemented, share it here.\nThis could include proposed APIs, annotations, or behavior.\n-->\n\n## Alternatives Considered\n\n<!--\nHave you tried other ways to solve this problem?\nAre there any existing workarounds?\n-->\n\n## Additional Context\n\n<!--\nInclude any other information, references, or related issues.\nScreenshots, links to OpenAPI specs, or code snippets can help too.\n-->\n\n## Checklist\n\n- [ ] I have searched the [existing issues](https://github.com/swagger-api/swagger-core/issues) to ensure this is not a duplicate.\n- [ ] This feature would be useful to more than just my use case.\n- [ ] I have provided enough detail for the maintainers to understand the scope of the request.\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "version: 2\nupdates:\n  - package-ecosystem: \"maven\"\n    target-branch: \"master\"\n    directory: \"/\"\n    schedule:\n      interval: \"daily\"\n    ignore:\n      - dependency-name: \"*\"\n        update-types: [\"version-update:semver-major\"]\n  - package-ecosystem: \"maven\"\n    target-branch: \"1.5\"\n    directory: \"/\"\n    schedule:\n      interval: \"daily\"\n    ignore:\n      - dependency-name: \"*\"\n        update-types: [\"version-update:semver-major\"]"
  },
  {
    "path": ".github/pull_request_template.md",
    "content": "# Pull Request\n\nThank you for contributing to **swagger-core**!\n\nPlease fill out the following information to help us review your PR efficiently.\n\n---\n\n## Description\n\n<!--\nDescribe what this PR changes:\n- What problem does it solve?\n- Is it a bug fix, new feature, or refactor?\n- Link to any related issues.\n-->\n\nFixes: <!-- e.g. #123 (optional) -->\n\n## Type of Change\n\n<!-- Check all that apply: -->\n\n- [ ] 🐛 Bug fix\n- [ ] ✨ New feature\n- [ ] ♻️ Refactor (non-breaking change)\n- [ ] 🧪 Tests\n- [ ] 📝 Documentation\n- [ ] 🧹 Chore (build or tooling)\n\n## Checklist\n\n<!-- Please check all that apply before requesting review: -->\n\n- [ ] I have added/updated tests as needed\n- [ ] I have added/updated documentation where applicable\n- [ ] The PR title is descriptive\n- [ ] The code builds and passes tests locally\n- [ ] I have linked related issues (if any)\n\n## Screenshots / Additional Context\n\n<!-- Optional: Add logs, screenshots, or notes for reviewers -->"
  },
  {
    "path": ".github/topissuebot.yml",
    "content": "labelName: \":thumbsup: Top Issue!\"\nlabelColor: \"f442c2\"\nnumberOfIssuesToLabel: 5\n"
  },
  {
    "path": ".github/workflows/codeql-analysis.yml",
    "content": "name: \"Code scanning - action\"\n\non:\n  push:\n    branches: [master, 1.5]\n  pull_request:\n    # The branches below must be a subset of the branches above\n    branches: [master, 1.5]\n  schedule:\n    - cron: '0 19 * * 1'\n\njobs:\n  CodeQL-Build:\n\n    runs-on: ubuntu-latest\n    permissions:\n      actions: read\n      contents: read\n      security-events: write\n\n    strategy:\n      fail-fast: false\n\n    steps:\n    - name: Checkout repository\n      uses: actions/checkout@v4\n      with:\n        # We must fetch at least the immediate parents so that if this is\n        # a pull request then we can checkout the head.\n        fetch-depth: 2\n\n    # If this run was triggered by a pull request event, then checkout\n    # the head of the pull request instead of the merge commit.\n    - run: git checkout HEAD^2\n      if: ${{ github.event_name == 'pull_request' }}\n\n    - name: Set up Java\n      uses: actions/setup-java@v1\n      with:\n        java-version: 11\n    # Initializes the CodeQL tools for scanning.\n    - name: Initialize CodeQL\n      uses: github/codeql-action/init@v3\n      # Override language selection by uncommenting this and choosing your languages\n      with:\n        languages: java\n\n    - name: Cache local Maven repository\n      uses: actions/cache@v4\n      with:\n        path: ~/.m2/repository\n        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}\n        restore-keys: |\n          ${{ runner.os }}-maven-\n    - name: Build with Maven and Gradle\n      run: |\n        ./mvnw --no-transfer-progress -B install --file pom.xml\n        cd ./modules/swagger-gradle-plugin\n        ./gradlew build --info\n        cd ../..\n    - name: Perform CodeQL Analysis\n      uses: github/codeql-action/analyze@v3\n"
  },
  {
    "path": ".github/workflows/dependency-review.yml",
    "content": "name: 'Dependency Review'\non: [pull_request]\n\npermissions:\n  contents: read\n\njobs:\n  dependency-review:\n    runs-on: ubuntu-latest\n    steps:\n    - name: 'Checkout Repository'\n      uses: actions/checkout@v4\n    - name: Dependency Review\n      uses: actions/dependency-review-action@v3\n      with:\n        fail-on-severity: high\n"
  },
  {
    "path": ".github/workflows/maven-pulls.yml",
    "content": "name: Build Test PR\n\non:\n  pull_request:\n    branches: [ \"master\" ]\n\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        java: [ 11, 17 ]\n\n    steps:\n    - uses: actions/checkout@v4\n    - name: Set up Java\n      uses: actions/setup-java@v4\n      with:\n        java-version: ${{ matrix.java }}\n        distribution: temurin\n        server-id: central\n        server-username: MAVEN_USERNAME\n        server-password: MAVEN_PASSWORD\n    - name: Cache local Maven repository\n      uses: actions/cache@v4\n      with:\n        path: ~/.m2/repository\n        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}\n        restore-keys: |\n          ${{ runner.os }}-maven-\n    - name: Build with Maven and Gradle\n      run: |\n        ./mvnw --no-transfer-progress -B install --file pom.xml\n        cd ./modules/swagger-gradle-plugin\n        ./gradlew build --info\n        cd ../..\n"
  },
  {
    "path": ".github/workflows/maven-v1-pulls.yml",
    "content": "name: Build Test PR 1.5\n\non:\n  pull_request:\n    branches: [ \"1.5\" ]\n\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        java: [ 11, 17 ]\n\n    steps:\n    - uses: actions/checkout@v2\n    - name: Set up Java\n      uses: actions/setup-java@v1\n      with:\n        java-version: ${{ matrix.java }}\n    - name: Cache local Maven repository\n      uses: actions/cache@v4\n      with:\n        path: ~/.m2/repository\n        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}\n        restore-keys: |\n          ${{ runner.os }}-maven-\n    - name: Build with Maven and Gradle\n      run: ./mvnw -B -Dhttps.protocols=TLSv1.2 verify --file pom.xml\n"
  },
  {
    "path": ".github/workflows/maven-v1.yml",
    "content": "name: Build Test Deploy 1.5\n\non:\n  push:\n    branches: [ \"1.5\" ]\n\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        java: [ 11, 17 ]\n\n    steps:\n      - uses: actions/checkout@v2\n      - name: Set up Java\n        uses: actions/setup-java@v1\n        with:\n          java-version: ${{ matrix.java }}\n          server-id: sonatype-nexus-snapshots\n          server-username: MAVEN_USERNAME\n          server-password: MAVEN_PASSWORD\n      - name: Cache local Maven repository\n        uses: actions/cache@v4\n        with:\n          path: ~/.m2/repository\n          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}\n          restore-keys: |\n            ${{ runner.os }}-maven-\n      - name: Build with Maven and Gradle\n        run: |\n          ./mvnw -B -Dhttps.protocols=TLSv1.2 verify --file pom.xml\n          export MY_JAVA_VERSION=`java -version 2>&1 | head -1 | cut -d'\"' -f2 | sed '/^1\\./s///' | cut -d'.' -f1`\n          echo \"JAVA VERSION\" ${MY_JAVA_VERSION}\n          if [[ ${MY_JAVA_VERSION} == \"11\" ]];\n          then\n            export MY_POM_VERSION=`./mvnw -q -Dexec.executable=\"echo\" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`\n            echo \"POM VERSION\" ${MY_POM_VERSION}\n            if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];\n            then\n                ./mvnw -B -Dhttps.protocols=TLSv1.2 clean deploy\n            else\n                echo \"not deploying release: \" ${MY_POM_VERSION}\n            fi\n          else\n            echo \"not deploying on java version: \" ${MY_JAVA_VERSION}\n          fi\n        env:\n          MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}\n          MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/maven.yml",
    "content": "name: Build Test Deploy master\n\non:\n  push:\n    branches: [ \"master\" ]\n\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        java: [ 11, 17 ]\n\n    steps:\n    - uses: actions/checkout@v4\n    - name: Set up Java\n      uses: actions/setup-java@v4\n      with:\n        java-version: ${{ matrix.java }}\n        distribution: temurin\n        server-id: central\n        server-username: MAVEN_USERNAME\n        server-password: MAVEN_PASSWORD\n    - name: Cache local Maven repository\n      uses: actions/cache@v4\n      with:\n        path: ~/.m2/repository\n        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}\n        restore-keys: |\n          ${{ runner.os }}-maven-\n    - name: Build with Maven and Gradle, Deploy snapshot to maven central\n      run: |\n        export MY_POM_VERSION=`./mvnw -q -Dexec.executable=\"echo\" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`\n        echo \"POM VERSION\" ${MY_POM_VERSION}\n        if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];\n        then\n          ./mvnw --no-transfer-progress -B install --file pom.xml\n          cd ./modules/swagger-gradle-plugin\n          ./gradlew build --info\n          cd ../..\n          export MY_JAVA_VERSION=`java -version 2>&1 | head -1 | cut -d'\"' -f2 | sed '/^1\\./s///' | cut -d'.' -f1`\n          echo \"JAVA VERSION\" ${MY_JAVA_VERSION}\n          if [[ ${MY_JAVA_VERSION} == \"11\" ]];\n          then\n            export MY_POM_VERSION=`./mvnw -q -Dexec.executable=\"echo\" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`\n            echo \"POM VERSION\" ${MY_POM_VERSION}\n            ./mvnw --no-transfer-progress -B clean deploy\n          else\n            echo \"not deploying on java version: \" ${MY_JAVA_VERSION}\n          fi\n        else\n          echo \"not building and maven publishing project as it is a release version: \" ${MY_JAVA_VERSION}\n        fi\n      env:\n        MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}\n        MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}\n"
  },
  {
    "path": ".github/workflows/prepare-release.yml",
    "content": "name: Prepare Release\n\non:\n  workflow_dispatch:\n    branches: [\"master\"]\n\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v4\n    - uses: tibdex/github-app-token@v1\n      id: generate-token\n      with:\n        app_id: ${{ secrets.APP_ID }}\n        private_key: ${{ secrets.APP_PRIVATE_KEY }}\n    - name: Set up Python 3.10\n      uses: actions/setup-python@v4\n      with:\n        python-version: '3.10'\n    - name: Set up Java 11\n      uses: actions/setup-java@v4\n      with:\n        java-version: 11\n        distribution: temurin\n        server-id: central\n        server-username: MAVEN_USERNAME\n        server-password: MAVEN_PASSWORD\n    - name: Cache local Maven repository\n      uses: actions/cache@v4\n      with:\n        path: ~/.m2/repository\n        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}\n        restore-keys: |\n          ${{ runner.os }}-maven-\n    - name: Run prepare release script\n      id: prepare-release\n      run: |\n        export MY_POM_VERSION=`./mvnw -q -Dexec.executable=\"echo\" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`\n        if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];\n        then\n          . ./CI/prepare-release.sh\n          echo \"PREPARE_RELEASE_OK=yes\" >> $GITHUB_ENV\n        else\n          echo \"not preparing release for release version: \" ${MY_POM_VERSION}\n          echo \"PREPARE_RELEASE_OK=no\" >> $GITHUB_ENV\n        fi\n        echo \"SC_VERSION=$SC_VERSION\" >> $GITHUB_ENV\n        echo \"SC_NEXT_VERSION=$SC_NEXT_VERSION\" >> $GITHUB_ENV\n    - name: Create Prepare Release Pull Request\n      uses: peter-evans/create-pull-request@v4\n      if: env.PREPARE_RELEASE_OK == 'yes'\n      with:\n        token: ${{ steps.generate-token.outputs.token }}\n        commit-message: prepare release ${{ env.SC_VERSION }}\n        title: 'prepare release ${{ env.SC_VERSION }}'\n        branch: prepare-release-${{ env.SC_VERSION }}\n    env:\n      ACTIONS_ALLOW_UNSECURE_COMMANDS:  true\n      MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}\n      MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}\n      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      SC_VERSION:\n      SC_NEXT_VERSION:\n"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "name: Release\n\non:\n  workflow_dispatch:\n    branches: [\"master\"]\n\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v4\n    - uses: tibdex/github-app-token@v1\n      id: generate-token\n      with:\n        app_id: ${{ secrets.APP_ID }}\n        private_key: ${{ secrets.APP_PRIVATE_KEY }}\n    - name: Set up Python 3.10\n      uses: actions/setup-python@v4\n      with:\n        python-version: '3.10'\n    - name: Set up Java 11\n      uses: actions/setup-java@v4\n      with:\n        java-version: 11\n        distribution: temurin\n        server-id: central\n        server-username: MAVEN_USERNAME\n        server-password: MAVEN_PASSWORD\n        gpg-private-key: ${{ secrets.OSSRH_GPG_PRIVATE_KEY }}\n    - name: Cache local Maven repository\n      uses: actions/cache@v4\n      with:\n        path: ~/.m2/repository\n        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}\n        restore-keys: |\n          ${{ runner.os }}-maven-\n    - name: Set up Gradle credentials\n      run: |\n        mkdir -p ~/.gradle\n        echo \"gradle.publish.key=${GRADLE_PUBLISH_KEY}\\ngradle.publish.secret=${GRADLE_PUBLISH_SECRET}\" > ~/.gradle/gradle.properties\n    - name: Run pre release script\n      id: preRelease\n      run: |\n        # export GPG_TTY=$(tty)\n        export MY_POM_VERSION=`./mvnw -q -Dexec.executable=\"echo\" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`\n        if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];\n        then\n          echo \"not releasing snapshot version: \" ${MY_POM_VERSION}\n          echo \"RELEASE_OK=no\" >> $GITHUB_ENV\n        else\n          . ./CI/pre-release.sh\n          echo \"RELEASE_OK=yes\" >> $GITHUB_ENV\n        fi\n        echo \"SC_VERSION=$SC_VERSION\" >> $GITHUB_ENV\n        echo \"SC_NEXT_VERSION=$SC_NEXT_VERSION\" >> $GITHUB_ENV\n        echo \"SC_LAST_RELEASE=$SC_LAST_RELEASE\" >> $GITHUB_ENV\n    - name: configure git user email\n      run: |\n        git config --global user.email \"action@github.com\"\n        git config --global user.name \"GitHub Action\"\n        git config --global hub.protocol https\n        git remote set-url origin https://\\${{ secrets.GITHUB_TOKEN }}:x-oauth-basic@github.com/''' + 'swagger-api/swagger-core' + '''.git\n    - name:  Run maven deploy/release\n      if: env.RELEASE_OK == 'yes'\n      run: |\n        ./mvnw --no-transfer-progress -B -Prelease deploy\n    - name: Run prepare javadocs script\n      id: prepareJavadocs\n      if: env.RELEASE_OK == 'yes'\n      run: |\n        . ./CI/prepare-javadocs.sh\n    - name: Checkout gh-pages\n      uses: actions/checkout@v4\n      with:\n        ref: \"gh-pages\"\n        fetch-depth: 0\n    - name: Run publish javadocs script\n      id: publishJavadocs\n      if: env.RELEASE_OK == 'yes'\n      run: |\n        TMPDIR=\"$(dirname -- \"${0}\")\"\n        . $TMPDIR/publish-javadocs.sh\n    - name: Checkout master\n      uses: actions/checkout@v4\n      with:\n        ref: \"master\"\n        fetch-depth: 0\n    - name: Run post release script\n      id: postRelease\n      if: env.RELEASE_OK == 'yes'\n      run: |\n        . ./CI/post-release.sh\n    - name: Create Next Snapshot Pull Request\n      uses: peter-evans/create-pull-request@v4\n      if: env.RELEASE_OK == 'yes'\n      with:\n        token: ${{ steps.generate-token.outputs.token }}\n        commit-message: bump snapshot ${{ env.SC_NEXT_VERSION }}-SNAPSHOT\n        title: 'bump snapshot ${{ env.SC_NEXT_VERSION }}-SNAPSHOT'\n        branch: bump-snap-${{ env.SC_NEXT_VERSION }}-SNAPSHOT\n    - name: Checkout 1.5\n      uses: actions/checkout@v4\n      with:\n        ref: \"1.5\"\n        fetch-depth: 0\n    - name: updateV1Readme script\n      id: updateV1Readme\n      if: env.RELEASE_OK == 'yes'\n      run: |\n        TMPDIR=\"$(dirname -- \"${0}\")\"\n        . $TMPDIR/update-v1-readme.sh ${{ env.SC_LAST_RELEASE }} ${{ env.SC_VERSION }}\n    - name: Create Update V1 Readme Pull Request\n      uses: peter-evans/create-pull-request@v4\n      if: env.RELEASE_OK == 'yes'\n      with:\n        token: ${{ steps.generate-token.outputs.token }}\n        commit-message: update 1.5 Readme with new v2 version ${{ env.SC_VERSION }}\n        title: 'update 1.5 Readme with new v2 version ${{ env.SC_VERSION }}'\n        branch: update-v1-readme-${{ env.SC_VERSION }}\n    - name: Checkout Wiki\n      uses: actions/checkout@v4\n      with:\n        repository: swagger-api/swagger-core.wiki\n        token: ${{ steps.generate-token.outputs.token }}\n        path: wiki\n        ref: \"master\"\n        fetch-depth: 0\n\n    - name: Run update wiki script\n      id: updateWiki\n      if: env.RELEASE_OK == 'yes'\n      run: |\n        TMPDIR=\"$(dirname -- \"${0}\")\"\n        . $TMPDIR/update-wiki.sh\n    - name: Checkout master\n      uses: actions/checkout@v2\n      with:\n        ref: \"master\"\n        fetch-depth: 0\n\n    env:\n      ACTIONS_ALLOW_UNSECURE_COMMANDS:  true\n      MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}\n      MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}\n      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      SC_VERSION:\n      SC_NEXT_VERSION:\n      GPG_PRIVATE_KEY: ${{ secrets.OSSRH_GPG_PRIVATE_KEY }}\n      GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PRIVATE_PASSPHRASE }}\n      GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}\n      GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}\n"
  },
  {
    "path": ".gitignore",
    "content": "build/\nlib/*.jar\ntarget\nsamples/scala-play2/logs\n.idea\n.idea_modules\n.settings\n.project\n.classpath\n.cache\natlassian-ide-plugin.xml\n*.iml\n.java-version\nsonar-project.properties\ntest-output/\n*.pyc\n"
  },
  {
    "path": ".mvn/wrapper/maven-wrapper.properties",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\ndistributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip\nwrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar\n"
  },
  {
    "path": ".whitesource",
    "content": "{\n  \"settingsInheritedFrom\": \"swagger-api/whitesource-config@main\",\n  \"scanSettings\": {\n    \"baseBranches\": [\"master\", \"1.5\"]\n  }\n}\n"
  },
  {
    "path": "CI/CI.md",
    "content": "## Continuous integration\n\n### Build, test and deploy\nSwagger Core uses Github actions to run jobs/checks building, testing and deploying snapshots on push and PR events.\n\nThese github actions are configured in `.github/workflows`:\n\n* maven.yml : Build Test Deploy master\n* maven-pulls.yml Build Test PR\n* maven-v1.yml : Build Test Deploy 1.5 (must exist in in `1.5` branch)\n* maven-v1-pulls.yml Build Test PR 1.5 (must exist in in `1.5` branch)\n\n\nThese actions use available actions in combination with short bash scripts.\n\n### Release\n\nReleases are semi-automated and consist in 2 actions using available public actions in combination with bash and python scripts.\n**TODO**: Python code is used for historical reasons to execute GitHub APIs calls, in general a more consistent environment would\nbe more maintainable e.g. implementing a custom JavaScript or Docker Container GitHub Action and/or a bash only script(s).\n\n#### Workflow summary\n\n1. execute `prepare-release.yml` / `Prepare Release` for `master` branch\n1. check and merge the Prepare Release PR pushed by previous step. Delete the branch\n1. execute `release.yml` / `Release` for `master` branch\n1. check and merge the `1.5` branch Readme update PR pushed by previous step. Delete the branch\n1. check and merge the next snaphot PR pushed by previous step. Delete the branch\n\n#### Prepare Release\n\nThe first action to execute is `prepare-release.yml` / `Prepare Release` for master, and\n`prepare-release-v1.yml` / `Prepare Release V1` for `1.5` branch.\n\nThis is triggered by manually executing the action, selecting `Actions` in project GitHub UI, then `Prepare Release` workflow\nand clicking `Run Workflow` (or `Prepare Release V1` and selecting `1.5` in the dropdown)\n\n`Prepare Release` takes care of:\n\n* create release notes out of merged PRs\n* Draft a release with related tag\n* bump versions to release, and update all affected files\n* build and test maven\n* build and test gradle plugin\n* push a Pull Request with the changes for human check.\n\nAfter the PR checks complete, the PR can me merged, and the second phase `Release` started.\n\n#### Release\n\nOnce prepare release PR has been merged, the second phase is provided by `release.yml` / `Release` actions for master, and\n`release-v1.yml` / `Release V1` for `1.5` branch.\n\nThis is triggered by manually executing the action, selecting `Actions` in project GitHub UI, then `Release` workflow\nand clicking `Run Workflow` (or `Release V1` and selecting `1.5` in the dropdown)\n\n`Release` takes care of:\n\n* build and test maven\n* build and test gradle plugin\n* deploy/publish to maven central\n* publish javadocs to gh-pages\n* deploy/publish gradle plugin\n* publish the previously prepared GitHub release / tag\n* push PR for next snapshot\n* push PR for 1.5 Readme update with new v2 version\n* update Wiki with javadocs links to new version\n\n\n\n### Secrets\n\nGitHub Actions make use of `Secrets` which can be configured either with Repo or Organization scope; the needed secrets are the following:\n\n* `APP_ID` and APP_PRIVATE_KEY`: these are the values provided by an account configured GitHub App, allowing to obtain a GitHub token\ndifferent from the default used in GitHub Actions (which does not allow to \"chain\" actions).Actions\n\nThe GitHub App must be configured as detailed in [this doc](https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens).\n\nSee also [here](https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#triggering-further-workflow-runs)\n\n* `OSSRH_GPG_PRIVATE_KEY` and `OSSRH_GPG_PRIVATE_PASSPHRASE` : gpg key and passphrase to be used for sonatype releases\nGPG private key and passphrase defined to be used for sonatype deployments, as detailed in\nhttps://central.sonatype.org/pages/working-with-pgp-signatures.html (I'd say with email matching the one  of the sonatype account of point 1\n\n* `MAVEN_CENTRAL_USERNAME` and `MAVEN_CENTRAL_PASSWORD`: sonatype user/token\n\n* `GRADLE_PUBLISH_KEY` and `GRADLE_PUBLISH_SECRET`: credentials for https://plugins.gradle.org/\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "CI/ghApiClient.py",
    "content": "#!/usr/bin/python\n\nimport os\nimport time\nimport urllib.request, urllib.error, urllib.parse\nimport http.client\nimport json\n\nGH_BASE_URL = \"https://api.github.com/\"\n\nGH_TOKEN = os.environ['GH_TOKEN']\nGH_AUTH = \"Bearer %s\" % GH_TOKEN\n\ndef readUrl(name):\n    try:\n        request = urllib.request.Request(GH_BASE_URL + name)\n        request.add_header(\"Authorization\", GH_AUTH)\n        content = urllib.request.urlopen(request).read()\n        jcont = json.loads(content)\n        return jcont\n    except urllib.error.HTTPError as e:\n        print(('HTTPError = ' + str(e.code)))\n        raise e\n    except urllib.error.URLError as e:\n        print(('URLError = ' + str(e.reason)))\n        raise e\n    except http.client.HTTPException as e:\n        print(('HTTPException = ' + str(e)))\n        raise e\n    except Exception:\n        import traceback\n        print(('generic exception: ' + traceback.format_exc()))\n        raise IOError\n\ndef postUrl(name, body):\n    global GH_BASE_URL\n    try:\n        time.sleep(0.05)\n        request = urllib.request.Request(GH_BASE_URL + name)\n        request.add_header(\"Authorization\", GH_AUTH)\n        request.add_header(\"Accept\", \"application/vnd.github.v3+json\")\n        data = body.encode('utf-8')\n        content = urllib.request.urlopen(request, data).read()\n        jcont = json.loads(content)\n        return jcont\n    except urllib.error.HTTPError as e:\n        print(('HTTPError = ' + str(e.code)))\n        print((str(e)))\n        raise e\n    except urllib.error.URLError as e:\n        print(('URLError = ' + str(e.reason)))\n        raise e\n    except http.client.HTTPException as e:\n        print(('HTTPException = ' + str(e)))\n        raise e\n    except Exception:\n        import traceback\n        print(('generic exception: ' + traceback.format_exc()))\n        raise IOError\n"
  },
  {
    "path": "CI/lastRelease.py",
    "content": "#!/usr/bin/python\n\nimport ghApiClient\n\ndef getLastReleaseTag():\n    content = ghApiClient.readUrl('repos/swagger-api/swagger-core/releases')\n    for l in content:\n        draft = l[\"draft\"]\n        tag = l[\"tag_name\"]\n        if str(draft) != 'True' and tag.startswith(\"v2\"):\n            return tag[1:]\n\n# main\ndef main():\n    result = getLastReleaseTag()\n    print (result)\n\n# here start main\nmain()\n"
  },
  {
    "path": "CI/post-release.sh",
    "content": "#!/bin/bash\n\nCUR=$(pwd)\nTMPDIR=\"$(dirname -- \"${0}\")\"\n\nSC_RELEASE_TAG=\"v$SC_VERSION\"\n\n#####################\n### deploy gradle plugin release\n#####################\ncd modules/swagger-gradle-plugin\n./gradlew publishPlugins -Pgradle.publish.key=\"${GRADLE_PUBLISH_KEY}\" -Pgradle.publish.secret=\"${GRADLE_PUBLISH_SECRET}\" --info\ncd ../..\n\n#####################\n### publish pre-prepared release (tag is created)\n#####################\npython $CUR/CI/publishRelease.py \"$SC_RELEASE_TAG\"\n\n#####################\n### update the version to next snapshot in maven project with set version\n#####################\n./mvnw versions:set -DnewVersion=\"${SC_NEXT_VERSION}-SNAPSHOT\"\n./mvnw versions:commit\n\ncd modules/swagger-project-jakarta\n../../mvnw versions:set -DnewVersion=\"${SC_NEXT_VERSION}-SNAPSHOT\"\n../../mvnw versions:commit\ncd ../..\n\n#####################\n### update all other versions in files around to the next snapshot or new release, including readme and gradle ###\n#####################\n\nsc_find=\"version=$SC_VERSION\"\nsc_replace=\"version=$SC_NEXT_VERSION-SNAPSHOT\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/modules/swagger-gradle-plugin/gradle.properties\n\nsc_find=\"io.swagger.core.v3:swagger-jaxrs2:$SC_VERSION\"\nsc_replace=\"io.swagger.core.v3:swagger-jaxrs2:$SC_NEXT_VERSION-SNAPSHOT\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/modules/swagger-gradle-plugin/src/main/java/io/swagger/v3/plugins/gradle/SwaggerPlugin.java\n\nsc_find=\"io.swagger.core.v3:swagger-jaxrs2:$SC_VERSION\"\nsc_replace=\"io.swagger.core.v3:swagger-jaxrs2:$SC_NEXT_VERSION-SNAPSHOT\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/SwaggerResolveTest.java\n\nsc_find=\"<version>$SC_VERSION<\\/version>\"\nsc_replace=\"<version>$SC_NEXT_VERSION-SNAPSHOT<\\/version>\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/modules/swagger-java17-support/pom.xml\nrm -f $CUR/modules/swagger-java17-support/pom.xml.versionsBackup\n\n#####################\n### Copy scripts to temp folder, as they are not available when checking out different branch or repo\n#####################\ncp -a $CUR/CI/update-v1-readme.sh $TMPDIR/update-v1-readme.sh\ncp -a $CUR/CI/update-wiki.sh $TMPDIR/update-wiki.sh\n"
  },
  {
    "path": "CI/pre-release.sh",
    "content": "#!/bin/bash\n\nCUR=$(pwd)\n\nexport SC_VERSION=`./mvnw -q -Dexec.executable=\"echo\" -Dexec.args='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}' --non-recursive build-helper:parse-version org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`\nexport SC_NEXT_VERSION=`./mvnw -q -Dexec.executable=\"echo\" -Dexec.args='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.nextIncrementalVersion}' --non-recursive build-helper:parse-version org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`\nSC_QUALIFIER=`./mvnw -q -Dexec.executable=\"echo\" -Dexec.args='${parsedVersion.qualifier}' --non-recursive build-helper:parse-version org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`\n#SC_LAST_RELEASE=`./mvnw -q -Dexec.executable=\"echo\" -Dexec.args='${releasedVersion.version}' --non-recursive org.codehaus.mojo:build-helper-maven-plugin:3.2.0:released-version org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`\nSC_LAST_RELEASE=`python $CUR/CI/lastRelease.py`\n\n\nSC_RELEASE_TAG=\"v$SC_VERSION\"\n\n\n#####################\n### build and test maven ###\n#####################\n./mvnw --no-transfer-progress -B install --file pom.xml\n\n#####################\n### build and test gradle ###\n#####################\ncd ./modules/swagger-gradle-plugin\n./gradlew build --info\ncd ../..\n"
  },
  {
    "path": "CI/prepare-javadocs.sh",
    "content": "#!/bin/bash\n\nCUR=$(pwd)\nTMPDIR=\"$(dirname -- \"${0}\")\"\n\nSC_RELEASE_TAG=\"v$SC_VERSION\"\n\n#####################\n### publish javadocs\n#####################\n\ncp -aR $CUR/modules/swagger-annotations/target/javadocprep/swagger-core/${SC_VERSION}/apidocs $TMPDIR\ncp -a $CUR/CI/publish-javadocs.sh $TMPDIR/publish-javadocs.sh\n\n"
  },
  {
    "path": "CI/prepare-release.sh",
    "content": "#!/bin/bash\n\nCUR=$(pwd)\n\nexport SC_VERSION=`./mvnw -q -Dexec.executable=\"echo\" -Dexec.args='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}' --non-recursive build-helper:parse-version org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`\nexport SC_NEXT_VERSION=`./mvnw -q -Dexec.executable=\"echo\" -Dexec.args='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.nextIncrementalVersion}' --non-recursive build-helper:parse-version org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`\nSC_QUALIFIER=`./mvnw -q -Dexec.executable=\"echo\" -Dexec.args='${parsedVersion.qualifier}' --non-recursive build-helper:parse-version org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`\n#SC_LAST_RELEASE=`./mvnw -q -Dexec.executable=\"echo\" -Dexec.args='${releasedVersion.version}' --non-recursive org.codehaus.mojo:build-helper-maven-plugin:3.2.0:released-version org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`\nSC_LAST_RELEASE=`python $CUR/CI/lastRelease.py`\n\n\n\nSC_RELEASE_TITLE=\"Swagger-core $SC_VERSION released!\"\nSC_RELEASE_TAG=\"v$SC_VERSION\"\n\n\n#####################\n### draft release Notes with next release after last release, with tag\n#####################\npython $CUR/CI/releaseNotes.py \"$SC_LAST_RELEASE\" \"$SC_RELEASE_TITLE\" \"$SC_RELEASE_TAG\"\n\n#####################\n### update the version to release in maven project with set version\n#####################\n./mvnw versions:set -DnewVersion=$SC_VERSION\n./mvnw versions:commit\n\ncd modules/swagger-project-jakarta\n../../mvnw versions:set -DnewVersion=$SC_VERSION\n../../mvnw versions:commit\ncd ../..\n\n\n#####################\n### update all other versions in files around to the new release, including readme and gradle ###\n#####################\nsc_find=\"currently $SC_VERSION-SNAPSHOT\"\nsc_replace=\"currently $SC_NEXT_VERSION-SNAPSHOT\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/README.md\n\nsc_find=\"$SC_LAST_RELEASE (\\*\\*current stable\\*\\*)\"\nsc_replace=\"$SC_LAST_RELEASE                     \"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/README.md\n\n# update readme with a line for the new release replacing the previous\nCURDATE=$(date +\"%Y-%m-%d\")\nsc_find=\"------------------------- | ------------ | -------------------------- | ----- | ----\"\nsc_add=\"$SC_VERSION (**current stable**)| $CURDATE   | 3.x           | [tag v$SC_VERSION](https:\\/\\/github.com\\/swagger-api\\/swagger-core\\/tree\\/v$SC_VERSION) | Supported\"\nsc_replace=\"$sc_find\\n$sc_add\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/README.md\n\nsc_find=\"\\\"io.swagger.core.v3.swagger-gradle-plugin\\\" version \\\"$SC_LAST_RELEASE\\\"\"\nsc_replace=\"\\\"io.swagger.core.v3.swagger-gradle-plugin\\\" version \\\"$SC_VERSION\\\"\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/modules/swagger-gradle-plugin/README.md\n\nsc_find=\"classpath \\\"io.swagger.core.v3:swagger-gradle-plugin:$SC_LAST_RELEASE\\\"\"\nsc_replace=\"classpath \\\"io.swagger.core.v3:swagger-gradle-plugin:$SC_VERSION\\\"\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/modules/swagger-gradle-plugin/README.md\n\nsc_find=\"version=$SC_VERSION\\-SNAPSHOT\"\nsc_replace=\"version=$SC_VERSION\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/modules/swagger-gradle-plugin/gradle.properties\n\nsc_find=\"io.swagger.core.v3:swagger-jaxrs2:$SC_VERSION-SNAPSHOT\"\nsc_replace=\"io.swagger.core.v3:swagger-jaxrs2:$SC_VERSION\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/modules/swagger-gradle-plugin/src/main/java/io/swagger/v3/plugins/gradle/SwaggerPlugin.java\n\nsc_find=\"io.swagger.core.v3:swagger-jaxrs2:$SC_VERSION-SNAPSHOT\"\nsc_replace=\"io.swagger.core.v3:swagger-jaxrs2:$SC_VERSION\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/SwaggerResolveTest.java\n\nsc_find=\"<version>$SC_LAST_RELEASE<\\/version>\"\nsc_replace=\"<version>$SC_VERSION<\\/version>\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/modules/swagger-maven-plugin/README.md\n\nsc_find=\"<version>$SC_LAST_RELEASE<\\/version>\"\nsc_replace=\"<version>$SC_VERSION<\\/version>\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/modules/swagger-java17-support/pom.xml\nrm -f $CUR/modules/swagger-java17-support/pom.xml.versionsBackup\n\n#####################\n### build and test maven ###\n#####################\n./mvnw --no-transfer-progress -B install --file pom.xml\n\n#####################\n### build and test gradle ###\n#####################\ncd ./modules/swagger-gradle-plugin\n./gradlew build --info\ncd ../..\n\n"
  },
  {
    "path": "CI/publish-javadocs.sh",
    "content": "#!/bin/bash\n\nCUR=$(pwd)\nTMPDIR=\"$(dirname -- \"${0}\")\"\n\nSC_RELEASE_TAG=\"v$SC_VERSION\"\n\n#####################\n### publish javadocs\n#####################\n\nmkdir -p $CUR/swagger-core/${SC_RELEASE_TAG}\ncp -aR $TMPDIR/apidocs $CUR/swagger-core/${SC_RELEASE_TAG}\ngit add -A\ngit commit -m \"apidocs for release ${SC_RELEASE_TAG}\"\ngit push -u origin gh-pages\n"
  },
  {
    "path": "CI/publishRelease.py",
    "content": "#!/usr/bin/python\n\nimport sys\nimport ghApiClient\n\ndef lastReleaseId(tag):\n    content = ghApiClient.readUrl('repos/swagger-api/swagger-core/releases')\n    for l in content:\n        draft = l[\"draft\"]\n        draft_tag = l[\"tag_name\"]\n        if str(draft) == 'True' and tag == draft_tag:\n            return l[\"id\"]\n\ndef publishRelease(tag):\n    id = lastReleaseId(tag)\n    payload = \"{\\\"tag_name\\\":\\\"\" + tag + \"\\\", \"\n    payload += \"\\\"draft\\\":\" + \"false\" + \", \"\n    payload += \"\\\"target_commitish\\\":\\\"\" + \"master\" + \"\\\"}\"\n    content = ghApiClient.postUrl('repos/swagger-api/swagger-core/releases/' + str(id), payload)\n    return content\n\n# main\ndef main(tag):\n    publishRelease (tag)\n\n# here start main\nmain(sys.argv[1])\n"
  },
  {
    "path": "CI/releaseNotes.py",
    "content": "#!/usr/bin/python\n\nimport sys\nimport json\nfrom datetime import datetime\nimport ghApiClient\n\ndef allPulls(releaseDate):\n\n    result = \"\"\n\n    baseurl = \"https://api.github.com/repos/swagger-api/swagger-core/pulls/\"\n    content = ghApiClient.readUrl('repos/swagger-api/swagger-core/pulls?state=closed&base=master&per_page=100')\n    for l in content:\n        stripped = l[\"url\"][len(baseurl):]\n        mergedAt = l[\"merged_at\"]\n        if mergedAt is not None:\n            if datetime.strptime(mergedAt, '%Y-%m-%dT%H:%M:%SZ') > releaseDate:\n                if not l['title'].startswith(\"bump snap\"):\n                    result += '\\n'\n                    result += \"* \" + l['title'] + \" (#\" + stripped + \")\"\n    return result\n\n\ndef lastReleaseDate(tag):\n    content = ghApiClient.readUrl('repos/swagger-api/swagger-core/releases/tags/' + tag)\n    publishedAt = content[\"published_at\"]\n    return datetime.strptime(publishedAt, '%Y-%m-%dT%H:%M:%SZ')\n\n\ndef addRelease(release_title, tag, content):\n    payload = \"{\\\"tag_name\\\":\\\"\" + tag + \"\\\", \"\n    payload += \"\\\"name\\\":\" + json.dumps(release_title) + \", \"\n    payload += \"\\\"body\\\":\" + json.dumps(content) + \", \"\n    payload += \"\\\"draft\\\":\" + \"true\" + \", \"\n    payload += \"\\\"prerelease\\\":\" + \"false\" + \", \"\n    payload += \"\\\"target_commitish\\\":\\\"\" + \"master\" + \"\\\"}\"\n    content = ghApiClient.postUrl('repos/swagger-api/swagger-core/releases', payload)\n    return content\n\ndef getReleases():\n    content = ghApiClient.readUrl('repos/swagger-api/swagger-core/releases')\n    return content\n\n# main\ndef main(last_release, release_title, tag):\n    result = allPulls(lastReleaseDate('v' + last_release))\n    addRelease (release_title, tag, result)\n\n# here start main\nmain(sys.argv[1], sys.argv[2], sys.argv[3])\n\n"
  },
  {
    "path": "CI/test.py",
    "content": "#!/usr/bin/python\n\nimport sys\nimport json\nfrom datetime import datetime\nimport ghApiClient\n\ndef allPulls(releaseDate):\n\n    result = \"\"\n\n    baseurl = \"https://api.github.com/repos/swagger-api/swagger-core/pulls/\"\n    content = ghApiClient.readUrl('repos/swagger-api/swagger-core/pulls?state=closed&base=master&per_page=100')\n    for l in content:\n        stripped = l[\"url\"][len(baseurl):]\n        mergedAt = l[\"merged_at\"]\n        if mergedAt is not None:\n            if datetime.strptime(mergedAt, '%Y-%m-%dT%H:%M:%SZ') > releaseDate:\n                if not l['title'].startswith(\"bump snap\"):\n                    result += '\\n'\n                    result += \"* \" + l['title'] + \" (#\" + stripped + \")\"\n    return result\n\n\ndef lastReleaseDate(tag):\n    content = ghApiClient.readUrl('repos/swagger-api/swagger-core/releases/tags/' + tag)\n    publishedAt = content[\"published_at\"]\n    return datetime.strptime(publishedAt, '%Y-%m-%dT%H:%M:%SZ')\n\n\ndef addRelease(release_title, tag, content):\n    payload = \"{\\\"tag_name\\\":\\\"\" + tag + \"\\\", \"\n    payload += \"\\\"name\\\":\" + json.dumps(release_title) + \", \"\n    payload += \"\\\"body\\\":\" + json.dumps(content) + \", \"\n    payload += \"\\\"draft\\\":\" + \"true\" + \", \"\n    payload += \"\\\"prerelease\\\":\" + \"false\" + \", \"\n    payload += \"\\\"target_commitish\\\":\\\"\" + \"master\" + \"\\\"}\"\n    content = ghApiClient.postUrl('repos/swagger-api/swagger-core/releases', payload)\n    return content\n\ndef getReleases():\n    content = ghApiClient.readUrl('repos/swagger-api/swagger-core/releases')\n    return content\n\n# main\ndef main(last_release, release_title, tag):\n    baseurl = \"https://api.github.com/repos/swagger-api/swagger-core/pulls/\"\n    payload = \"{\\\"tag_name\\\":\\\"\" + tag + \"\\\", \"\n    payload += \"\\\"name\\\":\" + json.dumps(release_title) + \", \"\n    payload += \"\\\"body\\\":\" + json.dumps(content) + \", \"\n    payload += \"\\\"draft\\\":\" + \"true\" + \", \"\n    payload += \"\\\"prerelease\\\":\" + \"false\" + \", \"\n    payload += \"\\\"target_commitish\\\":\\\"\" + \"master\" + \"\\\"}\"\n    content = ghApiClient.postUrl('repos/swagger-api/swagger-core/releases', payload)\n    result = allPulls(lastReleaseDate('v' + last_release))\n    addRelease (release_title, tag, result)\n\n# here start main\nmain(sys.argv[1], sys.argv[2], sys.argv[3])\n\n"
  },
  {
    "path": "CI/update-v1-readme.sh",
    "content": "#!/bin/bash\nSC_LAST_RELEASE=\"$1\"\nSC_VERSION=\"$2\"\n\nCUR=$(pwd)\n\n#####################\n### update v2 versions in readme\n#####################\nsc_find=\"$SC_LAST_RELEASE (\\*\\*current stable\\*\\*)\"\nsc_replace=\"$SC_LAST_RELEASE \"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/README.md\n\n# update readme with a line for the new release replacing the previous\nCURDATE=$(date +\"%Y-%m-%d\")\nsc_find=\"------------------------- | ------------ | -------------------------- | ----- | ----\"\nsc_add=\"$SC_VERSION (**current stable**)| $CURDATE | 3.x | [tag v$SC_VERSION](https:\\/\\/github.com\\/swagger-api\\/swagger-core\\/tree\\/v$SC_VERSION) | Supported\"\nsc_replace=\"$sc_find\\n$sc_add\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/README.md\n"
  },
  {
    "path": "CI/update-wiki.sh",
    "content": "#!/bin/bash\n\nCUR=$(pwd)\n\n#####################\n### update Wiki\n#####################\ncd wiki\nsc_find=\"$SC_LAST_RELEASE\\/\"\nsc_replace=\"$SC_VERSION\\/\"\nsed -i -e \"s/$sc_find/$sc_replace/g\" $CUR/wiki/Swagger-2.X---Annotations.md\ngit add -A\ngit commit -m \"update javadocs links to ${SC_VERSION}\"\ngit push -u origin master\ncd ..\n\n"
  },
  {
    "path": "LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright (c) 2015. SmartBear Software Inc.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "NOTICE",
    "content": "Swagger Core - ${pom.name}\nCopyright (c) 2015. SmartBear Software Inc.\nSwagger Core - ${pom.name}  is licensed under Apache 2.0 license.\nCopy of the Apache 2.0 license can be found in `LICENSE` file.\n"
  },
  {
    "path": "README.md",
    "content": "# Swagger Core <img src=\"https://raw.githubusercontent.com/swagger-api/swagger.io/wordpress/images/assets/SW-logo-clr.png\" height=\"50\" align=\"right\">\n\n**NOTE:** If you're looking for Swagger Core 1.5.X and OpenAPI 2.0, please refer to [1.5 branch](https://github.com/swagger-api/swagger-core/tree/1.5).\n\n**NOTE:** Since version 2.1.7, Swagger Core also supports the Jakarta namespace. There are a parallel set of artifacts with the `-jakarta` suffix, providing the same functionality as the unsuffixed (i.e.: `javax`) artifacts.\nPlease see the [Wiki](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Getting-started) for more details.\n\n**NOTE:** Since version 2.2.0 Swagger Core supports OpenAPI 3.1; see [this page](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---OpenAPI-3.1) for details\n\n![Build Test Deploy](https://github.com/swagger-api/swagger-core/workflows/Build%20Test%20Deploy%20master/badge.svg?branch=master)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.swagger.core.v3/swagger-project/badge.svg?style=plastic)](https://maven-badges.herokuapp.com/maven-central/io.swagger.core.v3/swagger-project)\n\nSwagger Core is a Java implementation of the OpenAPI Specification. Current version supports *JAX-RS2* (`javax` and `jakarta` namespaces).\n\n## Get started with Swagger Core!\nSee the guide on [getting started with Swagger Core](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Getting-started) to get started with adding Swagger to your API.\n\n## See the Wiki!\nThe [github wiki](https://github.com/swagger-api/swagger-core/wiki) contains documentation, samples, contributions, etc. Start there.\n\n## Compatibility\nThe OpenAPI Specification has undergone several revisions since initial creation in 2010.  The Swagger Core project has the following compatibilities with the OpenAPI Specification:\n\nSwagger core Version      | Release Date | OpenAPI Spec compatibility | Notes | Status\n------------------------- | ------------ | -------------------------- | ----- | ----\n2.2.45 (**current stable**)| 2026-03-09   | 3.x           | [tag v2.2.45](https://github.com/swagger-api/swagger-core/tree/v2.2.45) | Supported\n2.2.44                     | 2026-03-03   | 3.x           | [tag v2.2.44](https://github.com/swagger-api/swagger-core/tree/v2.2.44) | Supported\n2.2.43                     | 2026-02-17   | 3.x           | [tag v2.2.43](https://github.com/swagger-api/swagger-core/tree/v2.2.43) | Supported\n2.2.42                     | 2026-01-19   | 3.x           | [tag v2.2.42](https://github.com/swagger-api/swagger-core/tree/v2.2.42) | Supported\n2.2.41                     | 2025-11-24   | 3.x           | [tag v2.2.41](https://github.com/swagger-api/swagger-core/tree/v2.2.41) | Supported\n2.2.40                     | 2025-10-28   | 3.x           | [tag v2.2.40](https://github.com/swagger-api/swagger-core/tree/v2.2.40) | Supported\n2.2.39                     | 2025-10-13   | 3.x           | [tag v2.2.39](https://github.com/swagger-api/swagger-core/tree/v2.2.39) | Supported\n2.2.38                     | 2025-09-29   | 3.x           | [tag v2.2.38](https://github.com/swagger-api/swagger-core/tree/v2.2.38) | Supported\n2.2.37                     | 2025-09-16   | 3.x           | [tag v2.2.37](https://github.com/swagger-api/swagger-core/tree/v2.2.37) | Supported\n2.2.36                     | 2025-08-18   | 3.x           | [tag v2.2.36](https://github.com/swagger-api/swagger-core/tree/v2.2.36) | Supported\n2.2.35                     | 2025-07-31   | 3.x           | [tag v2.2.35](https://github.com/swagger-api/swagger-core/tree/v2.2.35) | Supported\n2.2.34                     | 2025-06-20   | 3.x           | [tag v2.2.34](https://github.com/swagger-api/swagger-core/tree/v2.2.34) | Supported\n2.2.33                     | 2025-06-12   | 3.x           | [tag v2.2.33](https://github.com/swagger-api/swagger-core/tree/v2.2.33) | Supported\n2.2.32                     | 2025-05-14   | 3.x           | [tag v2.2.32](https://github.com/swagger-api/swagger-core/tree/v2.2.32) | Supported\n2.2.31                     | 2025-05-13   | 3.x           | [tag v2.2.31](https://github.com/swagger-api/swagger-core/tree/v2.2.31) | Supported\n2.2.30                     | 2025-04-07   | 3.x           | [tag v2.2.30](https://github.com/swagger-api/swagger-core/tree/v2.2.30) | Supported\n2.2.29                     | 2025-03-10   | 3.x           | [tag v2.2.29](https://github.com/swagger-api/swagger-core/tree/v2.2.29) | Supported\n2.2.28                     | 2025-01-16   | 3.x           | [tag v2.2.28](https://github.com/swagger-api/swagger-core/tree/v2.2.28) | Supported\n2.2.27                     | 2024-12-11   | 3.x           | [tag v2.2.27](https://github.com/swagger-api/swagger-core/tree/v2.2.27) | Supported\n2.2.26                     | 2024-11-18   | 3.x           | [tag v2.2.26](https://github.com/swagger-api/swagger-core/tree/v2.2.26) | Supported\n2.2.25                     | 2024-10-02   | 3.x           | [tag v2.2.25](https://github.com/swagger-api/swagger-core/tree/v2.2.25) | Supported\n2.2.24                     | 2024-09-23   | 3.x           | [tag v2.2.24](https://github.com/swagger-api/swagger-core/tree/v2.2.24) | Supported\n2.2.23                     | 2024-08-28   | 3.x           | [tag v2.2.23](https://github.com/swagger-api/swagger-core/tree/v2.2.23) | Supported\n2.2.22                     | 2024-05-15   | 3.x           | [tag v2.2.22](https://github.com/swagger-api/swagger-core/tree/v2.2.22) | Supported\n2.2.21                     | 2024-03-20   | 3.x           | [tag v2.2.21](https://github.com/swagger-api/swagger-core/tree/v2.2.21) | Supported\n2.2.20                     | 2023-12-19   | 3.x           | [tag v2.2.20](https://github.com/swagger-api/swagger-core/tree/v2.2.20) | Supported\n2.2.19                     | 2023-11-10   | 3.x           | [tag v2.2.19](https://github.com/swagger-api/swagger-core/tree/v2.2.19) | Supported\n2.2.18                     | 2023-10-25   | 3.x           | [tag v2.2.18](https://github.com/swagger-api/swagger-core/tree/v2.2.18) | Supported\n2.2.17                     | 2023-10-12   | 3.x           | [tag v2.2.17](https://github.com/swagger-api/swagger-core/tree/v2.2.17) | Supported\n2.2.16                     | 2023-09-18   | 3.x           | [tag v2.2.16](https://github.com/swagger-api/swagger-core/tree/v2.2.16) | Supported\n2.2.15                     | 2023-07-08   | 3.x           | [tag v2.2.15](https://github.com/swagger-api/swagger-core/tree/v2.2.15) | Supported\n2.2.14                     | 2023-06-26   | 3.x           | [tag v2.2.14](https://github.com/swagger-api/swagger-core/tree/v2.2.14) | Supported\n2.2.13                     | 2023-06-24   | 3.x           | [tag v2.2.13](https://github.com/swagger-api/swagger-core/tree/v2.2.13) | Supported\n2.2.12                     | 2023-06-13   | 3.x           | [tag v2.2.12](https://github.com/swagger-api/swagger-core/tree/v2.2.12) | Supported\n2.2.11                     | 2023-06-01   | 3.x           | [tag v2.2.11](https://github.com/swagger-api/swagger-core/tree/v2.2.11) | Supported\n2.2.10                     | 2023-05-15   | 3.x           | [tag v2.2.10](https://github.com/swagger-api/swagger-core/tree/v2.2.10) | Supported\n2.2.9                     | 2023-03-20  | 3.x           | [tag v2.2.9](https://github.com/swagger-api/swagger-core/tree/v2.2.9)                                             | Supported\n2.2.8                     | 2023-01-06  | 3.x           | [tag v2.2.8](https://github.com/swagger-api/swagger-core/tree/v2.2.8)                                             | Supported\n2.2.7                     | 2022-11-15  | 3.0           | [tag v2.2.7](https://github.com/swagger-api/swagger-core/tree/v2.2.7)                                             | Supported\n2.2.6                     | 2022-11-02  | 3.0           | [tag v2.2.6](https://github.com/swagger-api/swagger-core/tree/v2.2.6)                                             | Supported\n2.2.5                     | 2022-11-02  | 3.0           | [tag v2.2.5](https://github.com/swagger-api/swagger-core/tree/v2.2.5)                                             | Supported\n2.2.4                     | 2022-10-16  | 3.0           | [tag v2.2.4](https://github.com/swagger-api/swagger-core/tree/v2.2.4)                                             | Supported\n2.2.3                     | 2022-09-27  | 3.0           | [tag v2.2.3](https://github.com/swagger-api/swagger-core/tree/v2.2.3)                                             | Supported\n2.2.2                     | 2022-07-20  | 3.0           | [tag v2.2.2](https://github.com/swagger-api/swagger-core/tree/v2.2.2)                                             | Supported\n2.2.1                     | 2022-06-15  | 3.0           | [tag v2.2.1](https://github.com/swagger-api/swagger-core/tree/v2.2.1)                                             | Supported\n2.2.0                     | 2022-04-04  | 3.0           | [tag v2.2.0](https://github.com/swagger-api/swagger-core/tree/v2.2.0)                                             | Supported\n2.1.13                     | 2022-02-07  | 3.0           | [tag v2.1.13](https://github.com/swagger-api/swagger-core/tree/v2.1.13)                                           | Supported\n2.1.12                     | 2021-12-23  | 3.0           | [tag v2.1.12](https://github.com/swagger-api/swagger-core/tree/v2.1.12)                                           | Supported\n2.1.11                     | 2021-09-29  | 3.0           | [tag v2.1.11](https://github.com/swagger-api/swagger-core/tree/v2.1.11)                                           | Supported\n2.1.10                     | 2021-06-28  | 3.0           | [tag v2.1.10](https://github.com/swagger-api/swagger-core/tree/v2.1.10)                                           | Supported\n2.1.9                     | 2021-04-20  | 3.0           | [tag v2.1.9](https://github.com/swagger-api/swagger-core/tree/v2.1.9)                                             | Supported\n2.1.8                     | 2021-04-18  | 3.0           | [tag v2.1.8](https://github.com/swagger-api/swagger-core/tree/v2.1.8)                                             | Supported\n2.1.7                     | 2021-02-18  | 3.0           | [tag v2.1.7](https://github.com/swagger-api/swagger-core/tree/v2.1.7)                                             | Supported\n2.1.6                     | 2020-12-04  | 3.0           | [tag v2.1.6](https://github.com/swagger-api/swagger-core/tree/v2.1.6)                                             | Supported\n2.1.5                     | 2020-10-01  | 3.0           | [tag v2.1.5](https://github.com/swagger-api/swagger-core/tree/v2.1.5)                                             | Supported\n2.1.4                     | 2020-07-24  | 3.0           | [tag v2.1.4](https://github.com/swagger-api/swagger-core/tree/v2.1.4)                                             | Supported\n2.1.3                     | 2020-06-27  | 3.0           | [tag v2.1.3](https://github.com/swagger-api/swagger-core/tree/v2.1.3)                                             | Supported\n2.1.2                     | 2020-04-01  | 3.0           | [tag v2.1.2](https://github.com/swagger-api/swagger-core/tree/v2.1.2)                                             | Supported\n2.1.1                     | 2020-01-02  | 3.0           | [tag v2.1.1](https://github.com/swagger-api/swagger-core/tree/v2.1.1)                                             | Supported\n2.1.0                     | 2019-11-16  | 3.0           | [tag v2.1.0](https://github.com/swagger-api/swagger-core/tree/v2.1.0)                                             | Supported\n2.0.10                    | 2019-10-11  | 3.0           | [tag v2.0.10](https://github.com/swagger-api/swagger-core/tree/v2.0.10)                                           | Supported\n2.0.9                     | 2019-08-22  | 3.0           | [tag v2.0.9](https://github.com/swagger-api/swagger-core/tree/v2.0.9)                                             | Supported\n2.0.8                     | 2019-04-24  | 3.0           | [tag v2.0.8](https://github.com/swagger-api/swagger-core/tree/v2.0.8)                                             | Supported\n2.0.7                     | 2019-02-18  | 3.0           | [tag v2.0.7](https://github.com/swagger-api/swagger-core/tree/v2.0.7)                                             | Supported\n2.0.6                     | 2018-11-27  | 3.0           | [tag v2.0.6](https://github.com/swagger-api/swagger-core/tree/v2.0.6)                                             | Supported\n2.0.5                     | 2018-09-19  | 3.0           | [tag v2.0.5](https://github.com/swagger-api/swagger-core/tree/v2.0.5)                                             | Supported\n2.0.4                     | 2018-09-05  | 3.0           | [tag v2.0.4](https://github.com/swagger-api/swagger-core/tree/v2.0.4)                                             | Supported\n2.0.3                     | 2018-08-09  | 3.0           | [tag v2.0.3](https://github.com/swagger-api/swagger-core/tree/v2.0.3)                                             | Supported\n1.6.14 (**current stable**)| 2024-03-19   | 2.0           | [tag v1.6.14](https://github.com/swagger-api/swagger-core/tree/v1.6.14)                                           | Supported\n1.6.13                    | 2024-01-26   | 2.0           | [tag v1.6.13](https://github.com/swagger-api/swagger-core/tree/v1.6.13)                                           | Supported\n1.6.12                    | 2023-10-14   | 2.0           | [tag v1.6.12](https://github.com/swagger-api/swagger-core/tree/v1.6.12)                                           | Supported\n1.6.11                    | 2023-05-15  | 2.0           | [tag v1.6.11](https://github.com/swagger-api/swagger-core/tree/v1.6.11)                                           | Supported\n1.6.10                    | 2023-03-21  | 2.0           | [tag v1.6.10](https://github.com/swagger-api/swagger-core/tree/v1.6.10)                                           | Supported\n1.6.9                     | 2022-11-15  | 2.0           | [tag v1.6.9](https://github.com/swagger-api/swagger-core/tree/v1.6.9)                                             | Supported\n1.6.8                     | 2022-10-16  | 2.0           | [tag v1.6.8](https://github.com/swagger-api/swagger-core/tree/v1.6.8)                                             | Supported\n1.6.7                     | 2022-09-27  | 2.0           | [tag v1.6.7](https://github.com/swagger-api/swagger-core/tree/v1.6.7)                                             | Supported\n1.6.6                     | 2022-04-04  | 2.0           | [tag v1.6.6](https://github.com/swagger-api/swagger-core/tree/v1.6.6)                                             | Supported\n1.6.5                     | 2022-02-07  | 2.0           | [tag v1.6.5](https://github.com/swagger-api/swagger-core/tree/v1.6.5)                                             | Supported\n1.6.4                     | 2021-12-23  | 2.0           | [tag v1.6.4](https://github.com/swagger-api/swagger-core/tree/v1.6.4)                                             | Supported\n1.6.3                     | 2021-09-29  | 2.0           | [tag v1.6.3](https://github.com/swagger-api/swagger-core/tree/v1.6.3)                                             | Supported\n1.6.2                     | 2020-07-01  | 2.0           | [tag v1.6.2](https://github.com/swagger-api/swagger-core/tree/v1.6.2)                                             | Supported\n1.6.1                     | 2020-04-01  | 2.0           | [tag v1.6.1](https://github.com/swagger-api/swagger-core/tree/v1.6.1)                                             | Supported\n1.6.0                     | 2019-11-16  | 2.0           | [tag v1.6.0](https://github.com/swagger-api/swagger-core/tree/v1.6.0)                                             | Supported\n1.5.24                    | 2019-10-11  | 2.0           | [tag v1.5.24](https://github.com/swagger-api/swagger-core/tree/v1.5.24)                                           | Supported\n1.5.23                    | 2019-08-22  | 2.0           | [tag v1.5.23](https://github.com/swagger-api/swagger-core/tree/v1.5.23)                                           | Supported\n1.5.22                    | 2019-02-18  | 2.0           | [tag v1.5.22](https://github.com/swagger-api/swagger-core/tree/v1.5.22)                                           | Supported\n1.5.21                    | 2018-08-09  | 2.0           | [tag v1.5.21](https://github.com/swagger-api/swagger-core/tree/v1.5.21)                                           | Supported\n1.5.20                    | 2018-05-23  | 2.0           | [tag v1.5.20](https://github.com/swagger-api/swagger-core/tree/v1.5.20)                                           | Supported\n2.0.2                     | 2018-05-23  | 3.0           | [tag v2.0.2](https://github.com/swagger-api/swagger-core/tree/v2.0.2)                                             | Supported\n2.0.1                     | 2018-04-16  | 3.0           | [tag v2.0.1](https://github.com/swagger-api/swagger-core/tree/v2.0.1)                                             | Supported\n1.5.19                    | 2018-04-16  | 2.0           | [tag v1.5.19](https://github.com/swagger-api/swagger-core/tree/v1.5.19)                                           | Supported\n2.0.0                     | 2018-03-20  | 3.0           | [tag v2.0.0](https://github.com/swagger-api/swagger-core/tree/v2.0.0)                                             | Supported\n2.0.0-rc4                 | 2018-01-22  | 3.0           | [tag v2.0.0-rc4](https://github.com/swagger-api/swagger-core/tree/v2.0.0-rc4)                                     | Supported\n2.0.0-rc3                 | 2017-11-21  | 3.0           | [tag v2.0.0-rc3](https://github.com/swagger-api/swagger-core/tree/v2.0.0-rc3)                                     | Supported\n2.0.0-rc2                 | 2017-09-29  | 3.0           | [tag v2.0.0-rc2](https://github.com/swagger-api/swagger-core/tree/v2.0.0-rc2)                                     | Supported\n2.0.0-rc1                 | 2017-08-17  | 3.0           | [tag v2.0.0-rc1](https://github.com/swagger-api/swagger-core/tree/v2.0.0-rc1)                                     | Supported\n1.5.18                    | 2018-01-22  | 2.0           | [tag v1.5.18](https://github.com/swagger-api/swagger-core/tree/v1.5.18)                                           | Supported\n1.5.17                    | 2017-11-21  | 2.0           | [tag v1.5.17](https://github.com/swagger-api/swagger-core/tree/v1.5.17)                                           | Supported\n1.5.16                    | 2017-07-15  | 2.0           | [tag v1.5.16](https://github.com/swagger-api/swagger-core/tree/v1.5.16)                                           | Supported\n1.3.12                    | 2014-12-23  | 1.2           | [tag v1.3.12](https://github.com/swagger-api/swagger-core/tree/v1.3.12)                                           | Supported\n1.2.4                     | 2013-06-19  | 1.1           | [tag swagger-project_2.10.0-1.2.4](https://github.com/swagger-api/swagger-core/tree/swagger-project_2.10.0-1.2.4) | Deprecated\n1.0.0                     | 2011-10-16  | 1.0           | [tag v1.0](https://github.com/swagger-api/swagger-core/tree/v1.0)                                                 | Deprecated\n\n\n### Change History\nIf you're interested in the change history of swagger and the Swagger Core framework, see [here](https://github.com/swagger-api/swagger-core/releases).\n\n### Prerequisites\nYou need the following installed and available in your $PATH:\n\n* Java 11\n* Apache maven 3.0.4 or greater\n* Jackson 2.4.5 or greater\n\n\n### To build from source (currently 2.2.46-SNAPSHOT)\n```\n# first time building locally\nmvn -N\n```\n\nSubsequent builds:\n```\nmvn install\n```\n\nThis will build the modules.\n\nOf course if you don't want to build locally you can grab artifacts from maven central:\n\n`https://repo1.maven.org/maven2/io/swagger/core/`\n\n## Sample Apps\nThe samples have moved to [a new repository](https://github.com/swagger-api/swagger-samples/tree/2.0) and contain various integrations and configurations.\n\n## Security contact\n\nPlease disclose any security-related issues or vulnerabilities by emailing [security@swagger.io](mailto:security@swagger.io), instead of using the public issue tracker.\n"
  },
  {
    "path": "modules/swagger-annotations/.gitignore",
    "content": "/bin/\n"
  },
  {
    "path": "modules/swagger-annotations/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <groupId>io.swagger.core.v3</groupId>\n        <artifactId>swagger-project</artifactId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../..</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-annotations</artifactId>\n    <name>swagger-annotations</name>\n    <description>swagger-annotations</description>\n    <build>\n        <sourceDirectory>src/main/java</sourceDirectory>\n        <defaultGoal>install</defaultGoal>\n        <plugins>\n            <plugin>\n                <groupId>biz.aQute.bnd</groupId>\n                <artifactId>bnd-maven-plugin</artifactId>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <configuration>\n                    <archive>\n                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>\n                        <manifestEntries>\n                            <Automatic-Module-Name>io.swagger.v3.oas.annotations</Automatic-Module-Name>\n                        </manifestEntries>\n                    </archive>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <profiles>\n        <profile>\n            <!-- this is used during release (see CI/CI.md file for details) to prepare javadocs for publishing to gh-pages -->\n            <id>release</id>\n            <build>\n                <plugins>\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-enforcer-plugin</artifactId>\n                        <version>${enforcer-plugin-version}</version>\n                        <executions>\n                            <execution>\n                                <id>enforce-no-snapshots</id>\n                                <goals>\n                                    <goal>enforce</goal>\n                                </goals>\n                                <configuration>\n                                    <rules>\n                                        <requireReleaseVersion>\n                                            <message>Publish javadocs for a SNAPSHOT is not allowed.</message>\n                                        </requireReleaseVersion>\n                                    </rules>\n                                    <fail>true</fail>\n                                </configuration>\n                            </execution>\n                        </executions>\n                    </plugin>\n                    <plugin>\n                        <artifactId>maven-resources-plugin</artifactId>\n                        <!-- keep 3.1.0 until root cause of error is identified. see https://issues.apache.org/jira/browse/MRESOURCES-265 -->\n                        <version>3.1.0</version>\n                        <executions>\n                            <execution>\n                                <id>copy-resources</id>\n                                <phase>deploy</phase>\n                                <goals>\n                                    <goal>copy-resources</goal>\n                                </goals>\n                                <configuration>\n                                    <outputDirectory>${project.build.directory}/javadocprep/swagger-core/${project.version}/apidocs</outputDirectory>\n                                    <resources>\n                                        <resource>\n                                            <directory>${project.build.directory}/apidocs</directory>\n                                            <filtering>true</filtering>\n                                        </resource>\n                                    </resources>\n                                </configuration>\n                            </execution>\n                        </executions>\n                    </plugin>\n                </plugins>\n            </build>\n        </profile>\n    </profiles>\n    <dependencies>\n        <dependency>\n            <groupId>jakarta.ws.rs</groupId>\n            <artifactId>jakarta.ws.rs-api</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.testng</groupId>\n            <artifactId>testng</artifactId>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/ExternalDocumentation.java",
    "content": "package io.swagger.v3.oas.annotations;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\n\n/**\n * The annotation may be used at method level or as field of {@link Operation} to add a reference to an external\n * resource for extended documentation of an <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#operation-object\">Operation (OpenAPI specification)</a>.\n * <p>It may also be used to add external documentation to {@link io.swagger.v3.oas.annotations.tags.Tag},\n * {@link io.swagger.v3.oas.annotations.headers.Header} or {@link io.swagger.v3.oas.annotations.media.Schema},\n * or as field of {@link OpenAPIDefinition}.</p>\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#external-documentation-object\">External Documentation (OpenAPI specification)</a>\n * @see OpenAPIDefinition\n **/\n@Target({METHOD, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface ExternalDocumentation {\n\n    /**\n     * A short description of the target documentation.\n     *\n     * @return the documentation description\n     **/\n    String description() default \"\";\n\n    /**\n     * The URL for the target documentation. Value must be in the format of a URL.\n     *\n     * @return the documentation URL\n     **/\n    String url() default \"\";\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Hidden.java",
    "content": "package io.swagger.v3.oas.annotations;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\n\n/**\n * Marks a given resource, class or bean type as hidden, skipping while reading / resolving\n **/\n@Target({METHOD, TYPE, FIELD, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\npublic @interface Hidden {\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/OpenAPI31.java",
    "content": "package io.swagger.v3.oas.annotations;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\n\n@Target({METHOD, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface OpenAPI31 {}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/OpenAPIDefinition.java",
    "content": "package io.swagger.v3.oas.annotations;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.info.Info;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.servers.Server;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.PACKAGE;\nimport static java.lang.annotation.ElementType.TYPE;\n\n/**\n * The annotation that may be used to populate OpenAPI Object fields info, tags, servers, security and externalDocs\n * If more than one class is annotated with {@link OpenAPIDefinition}, with the same fields defined, behaviour is inconsistent.\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#oas-object\">OpenAPI (OpenAPI specification)</a>\n */\n@Target({TYPE, PACKAGE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface OpenAPIDefinition {\n    /**\n     * Provides metadata about the API. The metadata MAY be used by tooling as required.\n     *\n     * @return the metadata about this API\n     */\n    Info info() default @Info;\n\n    /**\n     * A list of tags used by the specification with additional metadata.\n     * The order of the tags can be used to reflect on their order by the parsing tools.\n     *\n     * @return the tags used by the specification with any additional metadata\n     */\n    Tag[] tags() default {};\n\n    /**\n     * An array of Server Objects, which provide connectivity information to a target server.\n     * If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of /.\n     *\n     * @return the servers of this API\n     */\n    Server[] servers() default {};\n\n    /**\n     * A declaration of which security mechanisms can be used across the API.\n     *\n     * @return the array of servers used for this API\n     */\n    SecurityRequirement[] security() default {};\n\n    /**\n     * Any additional external documentation for the API\n     *\n     * @return the external documentation for this API.\n     */\n    ExternalDocumentation externalDocs() default @ExternalDocumentation;\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Operation.java",
    "content": "package io.swagger.v3.oas.annotations;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.servers.Server;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\n\n/**\n * The annotation may be used to define a resource method as an OpenAPI Operation, and/or to define additional\n * properties for the Operation.\n *\n * <p>Note: swagger-jaxrs2 reader engine includes by default also methods of scanned resources which are not annotated\n * with @Operation, as long as a jax-rs @Path is defined at class and/or method level, together with the http method\n * annotation (@GET, @POST, etc).</p>\n * <p>This behaviour is controlled by configuration property `scanAllResources` which defaults to true. By setting this\n * flag to false only @{@link Operation} annotated methods are considered.</p>\n *\n * <p>The following fields can also alternatively be defined at method level (as repeatable annotations in case of arrays),\n * in this case method level annotations take precedence over @{@link Operation} annotation fields:</p>\n *\n * <ul>\n * <li>tags: @{@link io.swagger.v3.oas.annotations.tags.Tag}</li>\n * <li>externalDocs: @{@link ExternalDocumentation}</li>\n * <li>parameters: @{@link Parameter}</li>\n * <li>responses: @{@link ApiResponse}</li>\n * <li>security: @{@link SecurityRequirement}</li>\n * <li>servers: @{@link Server}</li>\n * <li>extensions: @{@link Extension}</li>\n * <li>hidden: @{@link Hidden}</li>\n * </ul>\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#operation-object\">Operation (OpenAPI specification)</a>\n **/\n@Target({METHOD, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface Operation {\n    /**\n     * The HTTP method for this operation.\n     *\n     * @return the HTTP method of this operation\n     **/\n    String method() default \"\";\n\n    /**\n     * Tags can be used for logical grouping of operations by resources or any other qualifier.\n     *\n     * @return the list of tags associated with this operation\n     **/\n    String[] tags() default {};\n\n    /**\n     * Provides a brief description of this operation. Should be 120 characters or less for proper visibility in Swagger-UI.\n     *\n     * @return a summary of this operation\n     **/\n    String summary() default \"\";\n\n    /**\n     * A verbose description of the operation.\n     *\n     * @return a description of this operation\n     **/\n    String description() default \"\";\n\n    /**\n     * Request body associated to the operation.\n     *\n     * @return a request body.\n     */\n    RequestBody requestBody() default @RequestBody();\n\n    /**\n     * Additional external documentation for this operation.\n     *\n     * @return additional documentation about this operation\n     **/\n    ExternalDocumentation externalDocs() default @ExternalDocumentation();\n\n    /**\n     * The operationId is used by third-party tools to uniquely identify this operation.\n     *\n     * @return the ID of this operation\n     **/\n    String operationId() default \"\";\n\n    /**\n     * An optional array of parameters which will be added to any automatically detected parameters in the method itself.\n     *\n     * @return the list of parameters for this operation\n     **/\n    Parameter[] parameters() default {};\n\n    /**\n     * The list of possible responses as they are returned from executing this operation.\n     *\n     * @return the list of responses for this operation\n     **/\n    ApiResponse[] responses() default {};\n\n    /**\n     * Allows an operation to be marked as deprecated.  Alternatively use the @Deprecated annotation\n     *\n     * @return whether or not this operation is deprecated\n     **/\n    boolean deprecated() default false;\n\n    /**\n     * A declaration of which security mechanisms can be used for this operation.\n     *\n     * @return the array of security requirements for this Operation\n     */\n    SecurityRequirement[] security() default {};\n\n    /**\n     * An alternative server array to service this operation.\n     *\n     * @return the list of servers hosting this operation\n     **/\n    Server[] servers() default {};\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n    /**\n     * Allows this operation to be marked as hidden\n     *\n     * @return whether or not this operation is hidden\n     */\n    boolean hidden() default false;\n\n    /**\n     * Ignores JsonView annotations while resolving operations and types.\n     *\n     * @return whether or not to ignore JsonView annotations\n     */\n    boolean ignoreJsonView() default false;\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Parameter.java",
    "content": "package io.swagger.v3.oas.annotations;\n\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Repeatable;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\n\n/**\n * The annotation may be used on a method parameter to define it as a parameter for the operation, and/or to define\n * additional properties for the Parameter. It can also be used independently in {@link Operation#parameters()} or at\n * method level to add a parameter to the operation, even if not bound to any method parameter.\n *\n * <p>swagger-jaxrs2 reader engine considers this annotation along with JAX-RS annotations, parameter type and context\n * as input to resolve a method parameter into an OpenAPI Operation parameter.</p>\n *\n * <p>For method parameters bound to the request body, see {@link io.swagger.v3.oas.annotations.parameters.RequestBody}</p>\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#parameter-object\">Parameter (OpenAPI specification)</a>\n * @see io.swagger.v3.oas.annotations.parameters.RequestBody\n * @see Operation\n * @see Schema\n **/\n@Target({PARAMETER, METHOD, FIELD, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Repeatable(Parameters.class)\n@Inherited\npublic @interface Parameter {\n    /**\n     * The name of the parameter.\n     *\n     * @return the parameter's name\n     **/\n    String name() default \"\";\n\n    /**\n     * The location of the parameter.  Possible values are \"query\", \"header\", \"path\" or \"cookie\".  Ignored when empty string.\n     *\n     * @return the parameter's location\n     **/\n    ParameterIn in() default ParameterIn.DEFAULT;\n\n    /**\n     * Additional description data to provide on the purpose of the parameter\n     *\n     * @return the parameter's description\n     **/\n    String description() default \"\";\n\n    /**\n     * Determines whether this parameter is mandatory. If the parameter location is \"path\", this property is required and its value must be true. Otherwise, the property may be included and its default value is false.\n     *\n     * @return whether or not the parameter is required\n     **/\n    boolean required() default false;\n\n    /**\n     * Specifies that a parameter is deprecated and should be transitioned out of usage.\n     *\n     * @return whether or not the parameter is deprecated\n     **/\n    boolean deprecated() default false;\n\n    /**\n     * When true, allows sending an empty value.  If false, the parameter will be considered \\&quot;null\\&quot; if no value is present.  This may create validation errors when the parameter is required.\n     *\n     * @return whether or not the parameter allows empty values\n     **/\n    boolean allowEmptyValue() default false;\n\n    /**\n     * Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form.  Ignored if the properties content or array are specified.\n     *\n     * @return the style of the parameter\n     **/\n    ParameterStyle style() default ParameterStyle.DEFAULT;\n\n    /**\n     * When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When style is form, the default value is true. For all other styles, the default value is false.  Ignored if the properties content or array are specified.\n     *\n     * @return whether or not to expand individual array members\n     **/\n    Explode explode() default Explode.DEFAULT;\n\n    /**\n     * Determines whether the parameter value should allow reserved characters, as defined by RFC3986. This property only applies to parameters with an in value of query. The default value is false.  Ignored if the properties content or array are specified.\n     *\n     * @return whether or not the parameter allows reserved characters\n     **/\n    boolean allowReserved() default false;\n\n    /**\n     * The schema defining the type used for the parameter.  Ignored if the properties content or array are specified.\n     *\n     * @return the schema of the parameter\n     **/\n    Schema schema() default @Schema();\n\n    /**\n     * The schema of the array that defines this parameter.  Ignored if the property content is specified.\n     *\n     * @return the schema of the array\n     */\n    ArraySchema array() default @ArraySchema();\n\n    /**\n     * The representation of this parameter, for different media types.\n     *\n     * @return the content of the parameter\n     **/\n    Content[] content() default {};\n\n    /**\n     * Allows this parameter to be marked as hidden\n     *\n     * @return whether or not this parameter is hidden\n     */\n    boolean hidden() default false;\n\n    /**\n     * An array of examples  of the schema used to show the use of the associated schema.\n     *\n     * @return array of examples of the parameter\n     **/\n    ExampleObject[] examples() default {};\n\n    /**\n     * Provides an example of the schema.  When associated with a specific media type, the example string shall be parsed by the consumer to be treated as an object or an array.  Ignored if the properties examples, content or array are specified.\n     *\n     * @return an example of the parameter\n     **/\n    String example() default \"\";\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n    /**\n     * A reference to a parameter defined in components parameter.\n     *\n     * @since 2.0.3\n     * @return the reference\n     **/\n    String ref() default \"\";\n\n    Class<?>[] validationGroups() default {};\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Parameters.java",
    "content": "package io.swagger.v3.oas.annotations;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\n\n/**\n * Container for repeatable {@link Parameter} annotation\n *\n * @see Parameter\n */\n@Target({METHOD, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface Parameters {\n    /**\n     * An array of Parameters Objects for the operation\n     *\n     * @return the parameters\n     */\n    Parameter[] value() default {};\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/StringToClassMapItem.java",
    "content": "package io.swagger.v3.oas.annotations;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\n\n@Target({METHOD, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface StringToClassMapItem {\n    String key();\n    Class<?> value();\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Webhook.java",
    "content": "package io.swagger.v3.oas.annotations;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\n\n/**\n * The annotation may be used to define a method as an OpenAPI Webhook.\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#oas-webhooks\">Webhook (OpenAPI specification)</a>\n * @see io.swagger.v3.oas.annotations.OpenAPIDefinition\n **/\n@Target({METHOD, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\n@OpenAPI31\npublic @interface Webhook {\n    /**\n     * Provides the name related to this webhook.\n     * @return webhook name\n     */\n    String name();\n\n    /**\n     * Provides the operation related to this webhook.\n     * @return webhook operation\n     */\n    Operation operation();\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Webhooks.java",
    "content": "package io.swagger.v3.oas.annotations;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.TYPE;\n\n/**\n * Container for repeatable {@link Webhook} annotation\n *\n * @see Webhook\n */\n@Target({TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\n@OpenAPI31\npublic @interface Webhooks {\n\n    /**\n     * An array of Webhook annotations\n     *\n     * @return the array of the Webhook\n     **/\n    Webhook[] value() default {};\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/callbacks/Callback.java",
    "content": "package io.swagger.v3.oas.annotations.callbacks;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Repeatable;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\n\n/**\n * The annotation may be used at method level to add one ore more callbacks to the operation definition.\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#callback-object\">Callback (OpenAPI specification)</a>\n **/\n@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Repeatable(Callbacks.class)\n@Inherited\npublic @interface Callback {\n    /**\n     * The friendly name used to refer to this callback\n     *\n     * @return the name of the callback\n     **/\n    String name() default \"\";\n\n    /**\n     * An absolute URL which defines the destination which will be called with the supplied operation definition.\n     *\n     * @return the callback URL\n     */\n    String callbackUrlExpression() default \"\";\n\n    /**\n     * The array of operations that will be called out-of band\n     *\n     * @return the callback operations\n     **/\n    Operation[] operation() default {};\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n    /**\n     * A reference to a Callback defined in components Callbacks.\n     *\n     * @since 2.0.3\n     * @return the reference\n     **/\n    String ref() default \"\";\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/callbacks/Callbacks.java",
    "content": "package io.swagger.v3.oas.annotations.callbacks;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\n\n/**\n * Container for repeatable {@link Callback} annotation\n *\n * @see Callback\n */\n@Target({METHOD, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface Callbacks {\n    /**\n     * An array of Callback annotations which are a map of possible out-of band callbacks related to the parent operation\n     *\n     * @return the array of the callbacks\n     **/\n    Callback[] value() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/Explode.java",
    "content": "package io.swagger.v3.oas.annotations.enums;\n\npublic enum Explode {\n    DEFAULT, FALSE, TRUE;\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/ParameterIn.java",
    "content": "package io.swagger.v3.oas.annotations.enums;\n\npublic enum ParameterIn {\n    DEFAULT(\"\"),\n    HEADER(\"header\"),\n    QUERY(\"query\"),\n    PATH(\"path\"),\n    COOKIE(\"cookie\");\n\n    private String value;\n\n    ParameterIn(String value) {\n        this.value = value;\n    }\n\n    @Override\n    public String toString() {\n        return String.valueOf(value);\n    }\n}"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/ParameterStyle.java",
    "content": "package io.swagger.v3.oas.annotations.enums;\n\npublic enum ParameterStyle {\n    DEFAULT(\"\"),\n    MATRIX(\"matrix\"),\n    LABEL(\"label\"),\n    FORM(\"form\"),\n    SPACEDELIMITED(\"spaceDelimited\"),\n    PIPEDELIMITED(\"pipeDelimited\"),\n    DEEPOBJECT(\"deepObject\"),\n    SIMPLE(\"simple\");\n\n    private String value;\n\n    ParameterStyle(String value) {\n        this.value = value;\n    }\n\n    @Override\n    public String toString() {\n        return String.valueOf(value);\n    }\n}"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/SecuritySchemeIn.java",
    "content": "package io.swagger.v3.oas.annotations.enums;\n\npublic enum SecuritySchemeIn {\n    DEFAULT(\"\"),\n    HEADER(\"header\"),\n    QUERY(\"query\"),\n    COOKIE(\"cookie\");\n\n    private String value;\n\n    SecuritySchemeIn(String value) {\n        this.value = value;\n    }\n\n    @Override\n    public String toString() {\n        return String.valueOf(value);\n    }\n}"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/SecuritySchemeType.java",
    "content": "package io.swagger.v3.oas.annotations.enums;\n\npublic enum SecuritySchemeType {\n    DEFAULT(\"\"),\n    APIKEY(\"apiKey\"),\n    HTTP(\"http\"),\n    OPENIDCONNECT(\"openIdConnect\"),\n    MUTUALTLS(\"mutualTLS\"),\n    OAUTH2(\"oauth2\");\n\n    private String value;\n\n    SecuritySchemeType(String value) {\n        this.value = value;\n    }\n\n    @Override\n    public String toString() {\n        return String.valueOf(value);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/extensions/Extension.java",
    "content": "package io.swagger.v3.oas.annotations.extensions;\n\nimport java.lang.annotation.Repeatable;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\n\n/**\n * An optionally named list of extension properties.\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#specification-extensions\">Specification extensions (OpenAPI specification)</a>\n */\n@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Repeatable(Extensions.class)\npublic @interface Extension {\n\n    /**\n     * An option name for these extensions.\n     *\n     * @return an option name for these extensions - will be prefixed with \"x-\"\n     */\n    String name() default \"\";\n\n    /**\n     * The extension properties.\n     *\n     * @return the actual extension properties\n     * @see ExtensionProperty\n     */\n    ExtensionProperty[] properties();\n}"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/extensions/ExtensionProperty.java",
    "content": "package io.swagger.v3.oas.annotations.extensions;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * A name/value property within a OpenApi extension\n *\n * @see Extension\n */\n@Target(ElementType.ANNOTATION_TYPE)\n@Retention(RetentionPolicy.RUNTIME)\npublic @interface ExtensionProperty {\n\n    /**\n     * The name of the property.\n     *\n     * @return the name of the property\n     */\n    String name();\n\n    /**\n     * The value of the property.\n     *\n     * @return the value of the property\n     */\n    String value();\n\n    /**\n     * If set to true, field `value` will be parsed and serialized as JSON/YAML\n     *\n     * @return the value of `parseValue` annotation field\n     */\n    boolean parseValue() default false;\n}"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/extensions/Extensions.java",
    "content": "package io.swagger.v3.oas.annotations.extensions;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\n\n/**\n * Container for repeatable {@link Extension} annotation\n *\n * @see Extension\n */\n@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface Extensions {\n    /**\n     * An array of Extension annotations\n     *\n     * @return the array of the extensions\n     **/\n    Extension[] value() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/headers/Header.java",
    "content": "package io.swagger.v3.oas.annotations.headers;\n\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * The annotation may be used to add one or more headers to the definition of a response or as attribute of content\n * encoding by defining it as field {@link io.swagger.v3.oas.annotations.responses.ApiResponse#headers()} or {@link io.swagger.v3.oas.annotations.media.Content#encoding()}.\n * <p>Please note that request headers are defined as Header {@link io.swagger.v3.oas.annotations.Parameter}.</p>\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#header-object\">Header (OpenAPI specification)</a>\n * @see io.swagger.v3.oas.annotations.responses.ApiResponse\n * @see io.swagger.v3.oas.annotations.Parameter\n * @see io.swagger.v3.oas.annotations.media.Encoding\n **/\n@Target({})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface Header {\n    /**\n     * Required: The name of the header. The name is only used as the key to store this header in a map.\n     *\n     * @return the header's name\n     **/\n    String name();\n\n    /**\n     * Additional description data to provide on the purpose of the header\n     *\n     * @return the header's description\n     **/\n    String description() default \"\";\n\n    /**\n     * The schema defining the type used for the header. Ignored if the properties content or array are specified.\n     *\n     * @return the schema of the header\n     **/\n    Schema schema() default @Schema();\n\n    /**\n     * Determines whether this header is mandatory. The property may be included and its default value is false.\n     *\n     * @return whether or not the header is required\n     **/\n    boolean required() default false;\n\n    /**\n     * Specifies that a header is deprecated and should be transitioned out of usage.\n     *\n     * @return whether or not the header is deprecated\n     **/\n    boolean deprecated() default false;\n\n    /**\n     * A reference to a header defined in components headers.\n     *\n     * @since 2.0.3\n     * @return the reference\n     **/\n    String ref() default \"\";\n\n\n    /**\n     * When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When style is form, the default value is true. For all other styles, the default value is false.  Ignored if the properties content or array are specified.\n     *\n     * @return whether or not to expand individual array members\n     **/\n    Explode explode() default Explode.DEFAULT;\n\n    /**\n     * Allows this header to be marked as hidden\n     *\n     * @return whether or not this header is hidden\n     */\n    boolean hidden() default false;\n\n    /**\n     * Provides an example of the schema.  When associated with a specific media type, the example string shall be parsed by the consumer to be treated as an object or an array.  Ignored if the properties examples, content or array are specified.\n     *\n     * @return an example of the header\n     **/\n    String example() default \"\";\n\n    /**\n     * An array of examples  of the schema used to show the use of the associated schema.\n     *\n     * @return array of examples of the header\n     **/\n    ExampleObject[] examples() default {};\n\n    /**\n     * The schema of the array that defines this header.  Ignored if the property content is specified.\n     *\n     * @return the schema of the array\n     */\n    ArraySchema array() default @ArraySchema();\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/info/Contact.java",
    "content": "package io.swagger.v3.oas.annotations.info;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * The annotation may be used in {@link Info#contact()} to define a contact for the OpenAPI spec.\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#contact-object\">Contact (OpenAPI specification)</a>\n * @see io.swagger.v3.oas.annotations.OpenAPIDefinition\n * @see Info\n **/\n@Target({})\n@Retention(RetentionPolicy.RUNTIME)\npublic @interface Contact {\n    /**\n     * The identifying name of the contact person/organization.\n     *\n     * @return the name of the contact\n     **/\n    String name() default \"\";\n\n    /**\n     * The URL pointing to the contact information. Must be in the format of a URL.\n     *\n     * @return the URL of the contact\n     **/\n    String url() default \"\";\n\n    /**\n     * The email address of the contact person/organization. Must be in the format of an email address.\n     *\n     * @return the email address of the contact\n     **/\n    String email() default \"\";\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/info/Info.java",
    "content": "package io.swagger.v3.oas.annotations.info;\n\nimport io.swagger.v3.oas.annotations.OpenAPI31;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * The annotation may be used in {@link io.swagger.v3.oas.annotations.OpenAPIDefinition#info()} to populate the Info section of the OpenAPI document.\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#info-object\">Info (OpenAPI specification)</a>\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#info-object\">Info (OpenAPI specification)</a>\n * @see io.swagger.v3.oas.annotations.OpenAPIDefinition\n **/\n@Target({ElementType.ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface Info {\n    /**\n     * The title of the application.\n     *\n     * @return the application's title\n     **/\n    String title() default \"\";\n\n    /**\n     * A short description of the application. CommonMark syntax can be used for rich text representation.\n     *\n     * @return the application's description\n     **/\n    String description() default \"\";\n\n    /**\n     * A URL to the Terms of Service for the API. Must be in the format of a URL.\n     *\n     * @return the application's terms of service\n     **/\n    String termsOfService() default \"\";\n\n    /**\n     * The contact information for the exposed API.\n     *\n     * @return a contact for the application\n     **/\n    Contact contact() default @Contact();\n\n    /**\n     * The license information for the exposed API.\n     *\n     * @return the license of the application\n     **/\n    License license() default @License();\n\n    /**\n     * The version of the API definition.\n     *\n     * @return the application's version\n     **/\n    String version() default \"\";\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n    /**\n     * A short API summary.\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return API summary\n     **/\n    @OpenAPI31\n    String summary() default \"\";\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/info/License.java",
    "content": "package io.swagger.v3.oas.annotations.info;\n\nimport io.swagger.v3.oas.annotations.OpenAPI31;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * The annotation may be used in {@link Info#license()} to define a license for the OpenAPI spec.\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#license-object\">License (OpenAPI 3.0 pecification)</a>\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#license-object\">License (OpenAPI 3.1 specification)</a>\n * @see io.swagger.v3.oas.annotations.OpenAPIDefinition\n * @see Info\n **/\n@Target({})\n@Retention(RetentionPolicy.RUNTIME)\npublic @interface License {\n    /**\n     * The license name used for the API.\n     *\n     * @return the name of the license\n     **/\n    String name() default \"\";\n\n    /**\n     * A URL to the license used for the API. MUST be in the format of a URL.\n     *\n     * @return URL to the license\n     **/\n    String url() default \"\";\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n    /**\n     * An identifier for a License instance.\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return the identifier of the license\n     **/\n    @OpenAPI31\n    String identifier() default \"\";\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/links/Link.java",
    "content": "package io.swagger.v3.oas.annotations.links;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.servers.Server;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * The annotation may be applied in {@link io.swagger.v3.oas.annotations.responses.ApiResponse#links()} to add OpenAPI links to a response.\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#link-object\">Link (OpenAPI specification)</a>\n * @see io.swagger.v3.oas.annotations.responses.ApiResponse\n **/\n@Target({ElementType.ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface Link {\n    /**\n     * The name of this link.\n     *\n     * @return the link's name\n     **/\n    String name() default \"\";\n\n    /**\n     * A relative or absolute reference to an OAS operation. This field is mutually exclusive of the operationId field, and must point to an Operation Object. Relative operationRef values may be used to locate an existing Operation Object in the OpenAPI definition.  Ignored if the operationId property is specified.\n     *\n     * @return an operation reference\n     **/\n    String operationRef() default \"\";\n\n    /**\n     * The name of an existing, resolvable OAS operation, as defined with a unique operationId. This field is mutually exclusive of the operationRef field.\n     *\n     * @return an operation ID\n     **/\n    String operationId() default \"\";\n\n    /**\n     * Array of parameters to pass to an operation as specified with operationId or identified via operationRef.\n     *\n     * @return the list of parameters for this link\n     **/\n    LinkParameter[] parameters() default {};\n\n    /**\n     * A description of the link. CommonMark syntax may be used for rich text representation.\n     *\n     * @return the link's description\n     **/\n    String description() default \"\";\n\n    /**\n     * A literal value or {expression} to use as a request body when calling the target operation.\n     *\n     * @return the request body of this link\n     **/\n    String requestBody() default \"\";\n\n    /**\n     * An alternative server to service this operation.\n     *\n     * @return the server associated to this link\n     **/\n    Server server() default @Server;\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n    /**\n     * A reference to a link defined in components links.\n     *\n     * @since 2.0.3\n     * @return the reference\n     **/\n    String ref() default \"\";\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/links/LinkParameter.java",
    "content": "package io.swagger.v3.oas.annotations.links;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * Represents a parameter to pass to an operation as specified with operationId or identified via operationRef.\n **/\n@Target({})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface LinkParameter {\n    /**\n     * The name of this link parameter.\n     *\n     * @return the parameter's name\n     **/\n    String name() default \"\";\n\n    /**\n     * A constant or an expression to be evaluated and passed to the linked operation.\n     *\n     * @return the parameter's value\n     **/\n    String expression() default \"\";\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/ArraySchema.java",
    "content": "package io.swagger.v3.oas.annotations.media;\n\nimport io.swagger.v3.oas.annotations.OpenAPI31;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\n\n/**\n * The annotation may be used to define a schema of type \"array\" for a set of elements of the OpenAPI spec, and/or to define additional\n * properties for the schema. It is applicable e.g. to parameters, schema classes (aka \"models\"), properties of such\n * models, request and response content, header.\n *\n * <p>swagger-core resolver and swagger-jaxrs2 reader engine consider this annotation along with JAX-RS annotations,\n * element type and context as input to resolve the annotated element into an OpenAPI schema definition for such element.</p>\n *\n * <p>The annotation {@link Schema} shall be used for non array elements; {@link ArraySchema} and {@link Schema} cannot\n * coexist</p>\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#schema-object\">Schema (OpenAPI specification)</a>\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#schema-object\">Schema (OpenAPI specification)</a>\n * @see Schema\n **/\n@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface ArraySchema {\n\n    /**\n     * The schemas of the items in the array\n     *\n     * @since 2.2.12\n     *\n     * @deprecated since 2.2.21, use {@link #schema()} instead. Marked for removal in future versions.\n     * @return items\n     */\n    @Deprecated\n    Schema items() default @Schema;\n\n    /**\n     * The schema of the items in the array\n     *\n     * @return schema\n     */\n    Schema schema() default @Schema;\n\n    /**\n     * Allows to define the properties to be resolved into properties of the schema of type `array` (not the ones of the\n     * `items` of such schema which are defined in {@link #schema() schema}.\n     *\n     * @return arraySchema\n     *\n     * @since 2.0.2\n     */\n    Schema arraySchema() default @Schema;\n\n    /**\n     * sets the maximum number of items in an array.  Ignored if value is Integer.MIN_VALUE.\n     *\n     * @return integer representing maximum number of items in array\n     **/\n    int maxItems() default Integer.MIN_VALUE;\n\n    /**\n     * sets the minimum number of items in an array.  Ignored if value is Integer.MAX_VALUE.\n     *\n     * @return integer representing minimum number of items in array\n     **/\n    int minItems() default Integer.MAX_VALUE;\n\n    /**\n     * determines whether an array of items will be unique\n     *\n     * @return boolean - whether items in an array are unique or repeating\n     **/\n    boolean uniqueItems() default false;\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n    /**\n     * Specifies contains constrictions expressions.\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return contains expression.\n     */\n    @OpenAPI31\n    Schema contains() default @Schema;\n\n    /**\n     * Provides max contains related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return max contains\n     */\n    @OpenAPI31\n    int maxContains() default 0;\n\n    /**\n     * Provides min contains related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return min contains\n     */\n    @OpenAPI31\n    int minContains() default 0;\n\n    /**\n     * Provides unevaluted items to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return unevaluated items\n     */\n    @OpenAPI31\n    Schema unevaluatedItems() default @Schema;\n\n    /**\n     * Provides prefix items to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return prefixItems\n     */\n    @OpenAPI31\n    Schema[] prefixItems() default {};\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/Content.java",
    "content": "package io.swagger.v3.oas.annotations.media;\n\nimport io.swagger.v3.oas.annotations.OpenAPI31;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * The annotation may be used to define the content/media type  of a parameter, request or response, by defining it as\n * field {@link io.swagger.v3.oas.annotations.Parameter#content()}, {@link io.swagger.v3.oas.annotations.parameters.RequestBody#content()} or {@link io.swagger.v3.oas.annotations.responses.ApiResponse#content()}.\n * <p>If {@link Content#schema()} is defined, swagger-jaxrs2 reader engine will consider it along with\n * JAX-RS annotations, element type and context as input to resolve the annotated element into an OpenAPI schema\n * definition for such element.</p>\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#example-object\">Example (OpenAPI specification)</a>\n * @see Schema\n * @see io.swagger.v3.oas.annotations.Parameter\n * @see io.swagger.v3.oas.annotations.responses.ApiResponse\n * @see io.swagger.v3.oas.annotations.parameters.RequestBody\n **/\n@Target({ElementType.ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface Content {\n    /**\n     * The media type that this object applies to.\n     *\n     * @return the media type value\n     **/\n    String mediaType() default \"\";\n\n    /**\n     * An array of examples used to show the use of the associated schema.\n     *\n     * @return the list of examples\n     **/\n    ExampleObject[] examples() default {};\n\n    /**\n     * The schema defining the type used for the content.\n     *\n     * @return the schema of this media type\n     **/\n    Schema schema() default @Schema();\n\n    /**\n     * The schema properties defined for schema provided in @Schema\n     *\n     * @since 2.2.0\n     * @return the schema properties\n     */\n    SchemaProperty[] schemaProperties() default {};\n\n    /**\n     * The additionalProperties schema defined for schema provided in @Schema\n     * If the additionalProperties schema is an array, use additionalPropertiesArraySchema\n     *\n     * @since 2.2.0\n     * @return the additionalProperties schema\n     */\n    Schema additionalPropertiesSchema() default @Schema();\n\n    /**\n     * The additionalProperties array schema defined for schema provided in @Schema\n     * If the additionalProperties schema is not an array, use additionalPropertiesSchema\n     *\n     * @since 2.2.16\n     * @return the additionalProperties array schema\n     */\n    ArraySchema additionalPropertiesArraySchema() default @ArraySchema();\n\n    /**\n     * The schema of the array that defines the type used for the content.\n     *\n     * @return the schema of the array\n     */\n    ArraySchema array() default @ArraySchema();\n\n    /**\n     * An array of encodings\n     * The key, being the property name, MUST exist in the schema as a property.\n     *\n     * @return the array of encodings\n     */\n    Encoding[] encoding() default {};\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n    /**\n     * Subschemas to be applied for a given condition.\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return list of dependent schemas.\n     */\n    @OpenAPI31\n    DependentSchema[] dependentSchemas() default {};\n\n    /**\n     * Provides the content schema related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return content schema\n     */\n    @OpenAPI31\n    Schema contentSchema() default @Schema();\n\n    /**\n     * Provides property names related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return proeprty names\n     */\n    @OpenAPI31\n    Schema propertyNames() default @Schema();\n\n    /**\n     * Provides the if sub schema related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return if schema\n     */\n    @OpenAPI31\n    Schema _if() default @Schema();\n\n    /**\n     * Provides the then sub schema related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return then schema\n     */\n    @OpenAPI31\n    Schema _then() default @Schema();\n\n    /**\n     * Provides the else sub schema related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return else schema\n     */\n    @OpenAPI31\n    Schema _else() default @Schema();\n\n    /**\n     * Set schemas to validate according a given condition.\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return not schema to be validated\n     **/\n    Schema not() default @Schema();\n\n    /**\n     * Provides the oneOf sub schemas related to this schema.\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return oneOf sub schemas\n     **/\n    Schema[] oneOf() default {};\n\n    /**\n     * Provides the anyOf sub schemas related to this schema.\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return anyOf sub schemas\n     **/\n    Schema[] anyOf() default {};\n\n    /**\n     * Provides the allOf sub schemas related to this schema..\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return allOf sub schemas\n     **/\n    Schema[] allOf() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/DependentRequired.java",
    "content": "package io.swagger.v3.oas.annotations.media;\n\nimport io.swagger.v3.oas.annotations.OpenAPI31;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Repeatable;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\nimport static java.lang.annotation.ElementType.TYPE;\n\n/**\n * The annotation may be used to define dependent schemas for an Object Schema\n *\n * @see Schema\n *\n * @since 2.2.12 / OpenAPI 3.1\n **/\n@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\n@Repeatable(DependentRequiredMap.class)\n@OpenAPI31\npublic @interface DependentRequired {\n    /**\n     * The name.\n     *\n     * @return the name\n     **/\n    String name() default \"\";\n\n    /**\n     * The values of the dependent schema.\n     *\n     * @return the schema\n     **/\n    String[] value() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/DependentRequiredMap.java",
    "content": "package io.swagger.v3.oas.annotations.media;\n\nimport io.swagger.v3.oas.annotations.OpenAPI31;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\nimport static java.lang.annotation.ElementType.TYPE;\n\n/**\n * Container for repeatable {@link DependentRequired} annotation\n *\n * @since 2.2.12 / OpenAPI 3.1\n * @see DependentRequired\n */\n@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\n@OpenAPI31\npublic @interface DependentRequiredMap {\n    /**\n     * An array of DependentRequired annotations\n     *\n     * @return the array of the DependentRequired\n     **/\n    DependentRequired[] value() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/DependentSchema.java",
    "content": "package io.swagger.v3.oas.annotations.media;\n\nimport io.swagger.v3.oas.annotations.OpenAPI31;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Repeatable;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\nimport static java.lang.annotation.ElementType.TYPE;\n\n/**\n * The annotation may be used to define dependent schemas for an Object Schema\n *\n * @see Schema\n *\n * @since 2.2.12 / OpenAPI 3.1\n **/\n@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\n@Repeatable(DependentSchemas.class)\n@OpenAPI31\npublic @interface DependentSchema {\n    /**\n     * The name.\n     *\n     * @return the key of the dependent schema map item\n     **/\n    String name() default \"\";\n\n    /**\n     * The value (Schema) of the dependent schema map item.\n     * Alternative to `array()`. Applied when the schema is not of type \"array\".\n     * Use `array()` when schema is of type \"array\"\n     *\n     * @return the schema\n     **/\n    Schema schema() default @Schema();\n\n    /**\n     * The value (ArraySchema) of the dependent schema map item.\n     * Alternative to `schema()`. Applied when the schema is of type \"array\".\n     * Use `schema()` when schema is not of type \"array\"\n     *\n     * @return the value of the array schema\n     */\n    ArraySchema array() default @ArraySchema();\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/DependentSchemas.java",
    "content": "package io.swagger.v3.oas.annotations.media;\n\nimport io.swagger.v3.oas.annotations.OpenAPI31;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\nimport static java.lang.annotation.ElementType.TYPE;\n\n/**\n * Container for repeatable {@link DependentSchema} annotation\n *\n * @see DependentSchema\n */\n@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\n@OpenAPI31\npublic @interface DependentSchemas {\n    /**\n     * An array of DependentSchema annotations\n     *\n     * @return the array of the DependentSchema\n     **/\n    DependentSchema[] value() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/DiscriminatorMapping.java",
    "content": "package io.swagger.v3.oas.annotations.media;\n\nimport io.swagger.v3.oas.annotations.OpenAPI31;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * The annotation may be used in {@link Schema#discriminatorMapping()} to define an optional mapping definition\n * in scenarios involving composition / inheritance where the value of the discriminator field does not match the schema\n * name or implicit mapping is not possible.\n *\n * <p>Use {@link Schema#discriminatorProperty()} to define a discriminator property.</p>\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#discriminator-object\">Discriminator (OpenAPI specification)</a>\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#discriminator-object\">Discriminator (OpenAPI specification)</a>\n * @see Schema\n **/\n@Target({})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface DiscriminatorMapping {\n\n    /**\n     * The property value that will be mapped to a Schema\n     *\n     * @return the property value\n     **/\n    String value() default \"\";\n\n    /**\n     * The schema that is being mapped to a property value\n     *\n     * @return the Schema reference\n     **/\n    Class<?> schema() default Void.class;\n\n    /**\n     * The list of optional extensions\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return an optional array of extensions\n     */\n    @OpenAPI31\n    Extension[] extensions() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/Encoding.java",
    "content": "package io.swagger.v3.oas.annotations.media;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.headers.Header;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * The annotation may be used to add encoding details to the definition of a parameter, request or response content,\n * by defining it as field {@link Content#encoding()}\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#encoding-object\">Encoding (OpenAPI specification)</a>\n * @see Content\n **/\n@Target({})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface Encoding {\n\n    /**\n     * The name of this encoding object instance.\n     * This property is a key in encoding map of MediaType object and\n     * MUST exist in a schema as a property.\n     *\n     * @return name of the encoding\n     **/\n    String name() default \"\";\n\n    /**\n     * The Content-Type for encoding a specific property.\n     *\n     * @return content type of the encoding\n     **/\n    String contentType() default \"\";\n\n    /**\n     * Describes how a specific property value will be serialized depending on its type\n     *\n     * @return style of the encoding\n     **/\n    String style() default \"\";\n\n    /**\n     * When this is true, property values of type array or object generate separate parameters for each value of the array,\n     * or key-value-pair of the map.\n     *\n     * @return boolean\n     **/\n    boolean explode() default false;\n\n    /**\n     * Determines whether the parameter value SHOULD allow reserved characters,\n     * as defined by RFC3986 to be included without percent-encoding.\n     *\n     * @return boolean\n     **/\n    boolean allowReserved() default false;\n\n    /**\n     * An array of header objects\n     *\n     * @return array of headers\n     */\n    Header[] headers() default {};\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/ExampleObject.java",
    "content": "package io.swagger.v3.oas.annotations.media;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * The annotation may be used to add one or more examples to the definition of a parameter, request or response content,\n * by defining it as field {@link io.swagger.v3.oas.annotations.Parameter#examples()} or {@link Content#examples()}\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#example-object\">Example (OpenAPI specification)</a>\n **/\n@Target({ElementType.ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface ExampleObject {\n    /**\n     * A unique name to identify this particular example\n     *\n     * @return the name of the example\n     **/\n    String name() default \"\";\n\n    /**\n     * A brief summary of the purpose or context of the example\n     *\n     * @return a summary of the example\n     **/\n    String summary() default \"\";\n\n    /**\n     * A string representation of the example.  This is mutually exclusive with the externalValue property, and ignored if the externalValue property is specified.  If the media type associated with the example allows parsing into an object, it may be converted from a string\n     *\n     * @return the value of the example\n     **/\n    String value() default \"\";\n\n    /**\n     * A URL to point to an external document to be used as an example.  This is mutually exclusive with the value property.\n     *\n     * @return an external URL of the example\n     **/\n    String externalValue() default \"\";\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n    /**\n     * A reference to a example defined in components examples.\n     *\n     * @since 2.0.3\n     * @return the reference\n     **/\n    String ref() default \"\";\n\n    /**\n     * A description of the purpose or context of the example\n     *\n     * @since 2.1.0\n     * @return a description of the example\n     **/\n    String description() default \"\";\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/PatternProperties.java",
    "content": "package io.swagger.v3.oas.annotations.media;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\nimport static java.lang.annotation.ElementType.TYPE;\n\n/**\n * Container for repeatable {@link PatternProperty} annotation\n *\n * @see PatternProperty\n */\n@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface PatternProperties {\n    /**\n     * An array of PatternProperty annotations\n     *\n     * @return the array of the PatternProperty\n     **/\n    PatternProperty[] value() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/PatternProperty.java",
    "content": "package io.swagger.v3.oas.annotations.media;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Repeatable;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\nimport static java.lang.annotation.ElementType.TYPE;\n\n/**\n * The annotation may be used in OpenAPI 3.1 schemas / JSON Schema.\n *\n * @see <a target=\"_new\" href=\"https://tools.ietf.org/html/draft-bhutton-json-schema-00#section-10.3.2.2\">JSON Schema section 10.3.2.2</a>\n * @see Schema\n *\n * @since 2.1.8\n **/\n@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\n@Repeatable(PatternProperties.class)\npublic @interface PatternProperty {\n    /**\n     * The regex.\n     *\n     * @return the regex\n     **/\n    String regex() default \"\";\n\n    /**\n     * The schema to validate against for properties matching the regex.\n     *\n     * @return the schema\n     **/\n    Schema schema() default @Schema();\n\n    /**\n     * The schema of the array to validate against for properties matching the regex.\n     *\n     * @return the schema of the array\n     */\n    ArraySchema array() default @ArraySchema();\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/Schema.java",
    "content": "package io.swagger.v3.oas.annotations.media;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.OpenAPI31;\nimport io.swagger.v3.oas.annotations.StringToClassMapItem;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\n\n/**\n * The annotation may be used to define a Schema for a set of elements of the OpenAPI spec, and/or to define additional\n * properties for the schema. It is applicable e.g. to parameters, schema classes (aka \"models\"), properties of such\n * models, request and response content, header.\n *\n * <p>swagger-core resolver and swagger-jaxrs2 reader engine consider this annotation along with JAX-RS annotations,\n * element type and context as input to resolve the annotated element into an OpenAPI schema definition for such element.</p>\n * <p>The annotation may be used also to override partly (e.g. the name) or fully (e.g providing a completely different\n * representation) the schema of an element; for example if a specific class is provided as value of {@link Schema#implementation()},\n * it will override the element type</p>\n *\n * <p>The annotation {@link ArraySchema} shall be used for array elements; {@link ArraySchema} and {@link Schema} cannot\n * coexist</p>\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#schema-object\">Schema (OpenAPI specification)</a>\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#schema-object\">Schema (OpenAPI specification)</a>\n * @see ArraySchema\n **/\n@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface Schema {\n\n    String DEFAULT_SENTINEL = \"##default\";\n    /**\n     * Provides a java class as implementation for this schema.  When provided, additional information in the Schema annotation (except for type information) will augment the java class after introspection.\n     *\n     * @return a class that implements this schema\n     **/\n    Class<?> implementation() default Void.class;\n\n    /**\n     * Provides a java class to be used to disallow matching properties.\n     *\n     * @return a class with disallowed properties\n     **/\n    Class<?> not() default Void.class;\n\n    /**\n     * Provides an array of java class implementations which can be used to describe multiple acceptable schemas.  If more than one match the derived schemas, a validation error will occur.\n     *\n     * @return the list of possible classes for a single match\n     **/\n    Class<?>[] oneOf() default {};\n\n    /**\n     * Provides an array of java class implementations which can be used to describe multiple acceptable schemas.  If any match, the schema will be considered valid.\n     *\n     * @return the list of possible class matches\n     **/\n    Class<?>[] anyOf() default {};\n\n    /**\n     * Provides an array of java class implementations which can be used to describe multiple acceptable schemas.  If all match, the schema will be considered valid\n     *\n     * @return the list of classes to match\n     **/\n    Class<?>[] allOf() default {};\n\n    /**\n     * The name of the schema or property.\n     *\n     * @return the name of the schema\n     **/\n    String name() default \"\";\n\n    /**\n     * A title to explain the purpose of the schema.\n     *\n     * @return the title of the schema\n     **/\n    String title() default \"\";\n\n    /**\n     * Constrains a value such that when divided by the multipleOf, the remainder must be an integer.  Ignored if the value is 0.\n     *\n     * @return the multiplier constraint of the schema\n     **/\n    double multipleOf() default 0;\n\n    /**\n     * Sets the maximum numeric value for a property.  Ignored if the value is an empty string.\n     *\n     * @return the maximum value for this schema\n     **/\n    String maximum() default \"\";\n\n    /**\n     * if true, makes the maximum value exclusive, or a less-than criteria.\n     *\n     * @return the exclusive maximum value for this schema\n     **/\n    boolean exclusiveMaximum() default false;\n\n    /**\n     * Sets the minimum numeric value for a property.  Ignored if the value is an empty string or not a number.\n     *\n     * @return the minimum value for this schema\n     **/\n    String minimum() default \"\";\n\n    /**\n     * If true, makes the minimum value exclusive, or a greater-than criteria.\n     *\n     * @return the exclusive minimum value for this schema\n     **/\n    boolean exclusiveMinimum() default false;\n\n    /**\n     * Sets the maximum length of a string value.  Ignored if the value is negative.\n     *\n     * @return the maximum length of this schema\n     **/\n    int maxLength() default Integer.MAX_VALUE;\n\n    /**\n     * Sets the minimum length of a string value.  Ignored if the value is negative.\n     *\n     * @return the minimum length of this schema\n     **/\n    int minLength() default 0;\n\n    /**\n     * A pattern that the value must satisfy. Ignored if the value is an empty string.\n     *\n     * @return the pattern of this schema\n     **/\n    String pattern() default \"\";\n\n    /**\n     * Constrains the number of arbitrary properties when additionalProperties is defined.  Ignored if value is 0.\n     *\n     * @return the maximum number of properties for this schema\n     **/\n    int maxProperties() default 0;\n\n    /**\n     * Constrains the number of arbitrary properties when additionalProperties is defined.  Ignored if value is 0.\n     *\n     * @return the minimum number of properties for this schema\n     **/\n    int minProperties() default 0;\n\n    /**\n     * Allows multiple properties in an object to be marked as required.\n     *\n     * @return the list of required schema properties\n     **/\n    String[] requiredProperties() default {};\n\n    /**\n     * Mandates that the annotated item is required or not.\n     *\n     * @deprecated since 2.2.5, replaced by {@link #requiredMode()}\n     *\n     * @return whether this schema is required\n     **/\n    @Deprecated\n    boolean required() default false;\n\n    /**\n     * Allows to specify the required mode (RequiredMode.AUTO, REQUIRED, NOT_REQUIRED)\n     * RequiredMode.AUTO: the library decides using heuristics:\n     *   - Bean Validation / nullability annotations (@NotNull, @NonNull, @NotBlank, @NotEmpty) - required\n     *   - Optional - not required\n     *   - Primitive types (int, boolean, etc.) - not required unless annotated\n     *   - Other object fields without any constraints - not required\n     * RequiredMode.REQUIRED: will force the item to be considered as required regardless of heuristics.\n     * RequiredMode.NOT_REQUIRED: will force the item to be considered as not required regardless of heuristics.\n     *\n     * @since 2.2.5\n     * @return the requiredMode for this schema (property)\n     *\n     */\n    RequiredMode requiredMode() default RequiredMode.AUTO;\n\n    /**\n     * A description of the schema.\n     *\n     * @return the schema's description\n     **/\n    String description() default \"\";\n\n    /**\n     * Provides an optional override for the format.  If a consumer is unaware of the meaning of the format, they shall fall back to using the basic type without format.  For example, if \\&quot;type: integer, format: int128\\&quot; were used to designate a very large integer, most consumers will not understand how to handle it, and fall back to simply \\&quot;type: integer\\&quot;\n     *\n     * @return the schema's format\n     **/\n    String format() default \"\";\n\n    /**\n     * References a schema definition in an external OpenAPI document.\n     *\n     * @return a reference to this schema\n     **/\n    String ref() default \"\";\n\n    /**\n     * If true, designates a value as possibly null.\n     *\n     * @return whether or not this schema is nullable\n     **/\n    boolean nullable() default false;\n\n    /**\n     * Sets whether the value should only be read during a response but not read to during a request.\n     *\n     * @deprecated As of 2.0.0, replaced by {@link #accessMode()}\n     *\n     * @return whether or not this schema is read only\n     *\n     **/\n    @Deprecated\n    boolean readOnly() default false;\n\n    /**\n     * Sets whether a value should only be written to during a request but not returned during a response.\n     *\n     * @deprecated As of 2.0.0, replaced by {@link #accessMode()}\n     *\n     * @return whether or not this schema is write only\n     **/\n    @Deprecated\n    boolean writeOnly() default false;\n\n    /**\n     * Allows to specify the access mode (AccessMode.READ_ONLY, WRITE_ONLY, READ_WRITE)\n     *\n     * AccessMode.READ_ONLY: value will not be written to during a request but may be returned during a response.\n     * AccessMode.WRITE_ONLY: value will only be written to during a request but not returned during a response.\n     * AccessMode.READ_WRITE: value will be written to during a request and returned during a response.\n     *\n     * @return the accessMode for this schema (property)\n     *\n     */\n    AccessMode accessMode() default AccessMode.AUTO;\n\n    /**\n     * Provides an example of the schema.  When associated with a specific media type, the example string shall be parsed by the consumer to be treated as an object or an array.\n     *\n     * @return an example of this schema\n     **/\n    String example() default \"\";\n\n    /**\n     * Additional external documentation for this schema.\n     *\n     * @return additional schema documentation\n     **/\n    ExternalDocumentation externalDocs() default @ExternalDocumentation();\n\n    /**\n     * Specifies that a schema is deprecated and should be transitioned out of usage.\n     *\n     * @return whether or not this schema is deprecated\n     **/\n    boolean deprecated() default false;\n\n    /**\n     * Provides an override for the basic type of the schema.  Must be a valid type per the OpenAPI Specification.\n     *\n     * @return the type of this schema\n     **/\n    String type() default \"\";\n\n    /**\n     * Provides a list of allowable values.  This field map to the enum property in the OAS schema.\n     *\n     * @return a list of allowed schema values\n     */\n    String[] allowableValues() default {};\n\n    /**\n     * Provides a default value.\n     *\n     * @return the default value of this schema\n     */\n    String defaultValue() default DEFAULT_SENTINEL;\n\n    /**\n     * Provides a discriminator property value.\n     *\n     * @return the discriminator property\n     */\n    String discriminatorProperty() default \"\";\n\n    /**\n     * Provides discriminator mapping values.\n     *\n     * @return the discriminator mappings\n     */\n    DiscriminatorMapping[] discriminatorMapping() default {};\n\n    /**\n     * Allows schema to be marked as hidden.\n     *\n     * @return whether or not this schema is hidden\n     */\n    boolean hidden() default false;\n\n    /**\n     * Allows enums to be resolved as a reference to a scheme added to components section.\n     *\n     * @since 2.1.0\n     * @return whether or not this must be resolved as a reference\n     */\n    boolean enumAsRef() default false;\n\n    /**\n     * An array of the sub types inheriting from this model.\n     */\n    Class<?>[] subTypes() default {};\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n    /**\n     * List of optional items positionally defines before normal items.\n     * @return optional array of items\n     */\n    Class<?>[] prefixItems() default {};\n\n    /**\n     * List of schema types\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return array of types\n     */\n    @OpenAPI31\n    String[] types() default {};\n\n    /**\n     * @since 2.2.12 / OpenAPI 3.1\n     *\n     * OAS 3.1 version of `exclusiveMaximum`, accepting a numeric value\n     *\n     * @return the exclusive maximum value for this schema\n     **/\n    @OpenAPI31\n    int exclusiveMaximumValue() default 0;\n\n    /**\n     * Provides an exclusive minimum for a expressing exclusive range.\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return an exclusive minimum.\n     */\n    @OpenAPI31\n    int exclusiveMinimumValue() default 0;\n\n    /**\n     * Specifies contains constrictions expressions.\n     * @return contains expression.\n     */\n    @OpenAPI31\n    Class<?> contains() default Void.class;\n\n    /**\n     * Provides the $id related to this schema.\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return the $id of schema\n     */\n    @OpenAPI31\n    String $id() default \"\";\n\n    /**\n     * Provides Json Schema dialect where the schema is valid.\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return json schema dialect\n     */\n    @OpenAPI31\n    String $schema() default \"\";\n\n    /**\n     * Provides the $anchor related to schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return $anchor schema\n     */\n    @OpenAPI31\n    String $anchor() default \"\";\n\n    /**\n     * Provides the $vocabulary related to schema\n     *\n     * @since 2.2.14 / OpenAPI 3.1\n     * @return $vocabulary schema\n     */\n    @OpenAPI31\n    String $vocabulary() default \"\";\n\n    /**\n     * Provides the $dynamicAnchor related to schema\n     *\n     * @since 2.2.14 / OpenAPI 3.1\n     * @return $dynamicAnchor schema\n     */\n    @OpenAPI31\n    String $dynamicAnchor() default \"\";\n\n    /**\n     * Provides the $dynamicRef related to schema\n     *\n     * @since 2.2.32 / OpenAPI 3.1\n     * @return $dynamicRef schema\n     */\n    @OpenAPI31\n    String $dynamicRef() default \"\";\n\n    /**\n     * Provides the content encoding related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return content encoding\n     */\n    @OpenAPI31\n    String contentEncoding() default \"\";\n\n    /**\n     * Provides the content media type related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return content media type\n     */\n    @OpenAPI31\n    String contentMediaType() default \"\";\n\n    /**\n     * Provides the content schema related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return content schema\n     */\n    @OpenAPI31\n    Class<?> contentSchema() default Void.class;\n\n    /**\n     * Provides property names related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return property names\n     */\n    @OpenAPI31\n    Class<?> propertyNames() default Void.class;\n\n    /**\n     * Provides max contains related to this schema\n     * @return max contains\n     */\n    @OpenAPI31\n    int maxContains() default Integer.MAX_VALUE;\n\n    /**\n     * Provides min contains related to this schema\n     * @return min contains\n     */\n    @OpenAPI31\n    int minContains() default 0;\n\n    /**\n     * Provides a list of additional items\n     * @return additional items\n     */\n    Class<?> additionalItems() default Void.class;\n\n    /**\n     * Provides a list of unevaluated items\n     * @return unevaluated items\n     */\n    Class<?> unevaluatedItems() default Void.class;\n\n    /**\n     * Provides the if sub schema related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return if sub schema\n     */\n    @OpenAPI31\n    Class<?> _if() default Void.class;\n\n    /**\n     * Provides the else sub schema related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return else sub schema\n     */\n    @OpenAPI31\n    Class<?> _else() default Void.class;\n\n    /**\n     * Provides the then sub schema related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return then sub schema\n     */\n    @OpenAPI31\n    Class<?> then() default Void.class;\n\n    /**\n     * Provides $comment related to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return $comment related to schema\n     */\n    @OpenAPI31\n    String $comment() default \"\";\n\n    /**\n     * Provides a list of examples related to this schema\n     * @return list of examples\n     */\n    Class<?>[] exampleClasses() default {};\n\n    /**\n     * Allows to specify the additionalProperties value\n     *\n     * AdditionalPropertiesValue.TRUE: set to TRUE\n     * AdditionalPropertiesValue.FALSE: set to FALSE\n     * AdditionalPropertiesValue.USE_ADDITIONAL_PROPERTIES_ANNOTATION: resolve from @Content.additionalPropertiesSchema\n     * or @Schema.additionalPropertiesSchema\n     *\n     * @since 2.2.0\n     * @return the accessMode for this schema (property)\n     *\n     */\n    AdditionalPropertiesValue additionalProperties() default AdditionalPropertiesValue.USE_ADDITIONAL_PROPERTIES_ANNOTATION;\n\n    enum AccessMode {\n        AUTO,\n        READ_ONLY,\n        WRITE_ONLY,\n        READ_WRITE;\n    }\n\n    enum AdditionalPropertiesValue {\n        TRUE,\n        FALSE,\n        USE_ADDITIONAL_PROPERTIES_ANNOTATION;\n    }\n\n    enum RequiredMode {\n        AUTO,\n        REQUIRED,\n        NOT_REQUIRED;\n    }\n\n    enum SchemaResolution {\n        AUTO,\n        DEFAULT,\n        INLINE,\n        ALL_OF,\n        ALL_OF_REF;\n    }\n\n    /**\n     * Allows to specify the dependentRequired value\n     **\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return the list of DependentRequire annotations\n     *\n     */\n    @OpenAPI31\n    DependentRequired[] dependentRequiredMap() default {};\n\n    /**\n     * Allows to specify the dependentSchemas value providing a Class to be resolved into a Schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return the list of dependentSchemas annotations\n     *\n     */\n    @OpenAPI31\n    StringToClassMapItem[] dependentSchemas() default {};\n\n    /**\n     * Provides pattern properties to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return pattern properties\n     */\n    @OpenAPI31\n    StringToClassMapItem[] patternProperties() default {};\n\n    /**\n     * Provides properties related to this schema\n     *\n     * @return schema properties\n     */\n    StringToClassMapItem[] properties() default {};\n\n    /**\n     * Provides unevaluated properties to this schema\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return unevaluated properties\n     */\n    @OpenAPI31\n    Class<?> unevaluatedProperties() default Void.class;\n    Class<?> additionalPropertiesSchema() default Void.class;\n\n    /**\n     * Provides an array of examples of the schema.  When associated with a specific media type, the example string shall be parsed by the consumer to be treated as an object or an array.\n     *\n     * @return an array of examples of this schema\n     **/\n    @OpenAPI31\n    String[] examples() default {};\n\n    /**\n     * Provides value restricted to this schema.\n     *\n     * @since 2.2.12 / OpenAPI 3.1\n     * @return const value\n     */\n    @OpenAPI31\n    String _const() default \"\";\n\n    /**\n     * Allows to specify the schema resolution mode for object schemas\n     *\n     * SchemaResolution.DEFAULT: bundled into components/schemas, $ref with no siblings\n     * SchemaResolution.INLINE: inline schema, no $ref\n     * SchemaResolution.ALL_OF: bundled into components/schemas, $ref and any context annotation resolution into allOf\n     * SchemaResolution.ALL_OF_REF: bundled into components/schemas, $ref into allOf, context annotation resolution into root\n     *\n     * @return the schema resolution mode for this schema\n     *\n     */\n    SchemaResolution schemaResolution() default SchemaResolution.AUTO;\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/SchemaProperties.java",
    "content": "package io.swagger.v3.oas.annotations.media;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\nimport static java.lang.annotation.ElementType.TYPE;\n\n/**\n * Container for repeatable {@link SchemaProperty} annotation\n *\n * @see SchemaProperty\n */\n@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface SchemaProperties {\n    /**\n     * An array of SchemaProperty annotations\n     *\n     * @return the array of the SchemaProperty\n     **/\n    SchemaProperty[] value() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/SchemaProperty.java",
    "content": "package io.swagger.v3.oas.annotations.media;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Repeatable;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.FIELD;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\nimport static java.lang.annotation.ElementType.TYPE;\n\n/**\n * The annotation may be used to define properties for an Object Schema\n *\n * @see Schema\n *\n * @since 2.1.8\n **/\n@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\n@Repeatable(SchemaProperties.class)\npublic @interface SchemaProperty {\n    /**\n     * The name.\n     *\n     * @return the name\n     **/\n    String name() default \"\";\n\n    /**\n     * The schema of the property.\n     *\n     * @return the schema\n     **/\n    Schema schema() default @Schema();\n\n    /**\n     * The schema of the array.\n     *\n     * @return the schema of the array\n     */\n    ArraySchema array() default @ArraySchema();\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/parameters/RequestBody.java",
    "content": "package io.swagger.v3.oas.annotations.parameters;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.media.Content;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.PARAMETER;\n\n/**\n * The annotation may be used on a method parameter to define it as the Request Body of the operation, and/or to define\n * additional properties for such request body.\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#request-body-object\">Request Body (OpenAPI specification)</a>\n * @see io.swagger.v3.oas.annotations.Parameter\n * @see Content\n **/\n@Target({METHOD, PARAMETER, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface RequestBody {\n    /**\n     * A brief description of the request body.\n     *\n     * @return description of the request body\n     **/\n    String description() default \"\";\n\n    /**\n     * The content of the request body.\n     *\n     * @return array of content\n     **/\n    Content[] content() default {};\n\n    /**\n     * Determines if the request body is required in the request. Defaults to false.\n     *\n     * @return boolean\n     **/\n    boolean required() default false;\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n    /**\n     * A reference to a RequestBody defined in components RequestBodies.\n     *\n     * @since 2.0.3\n     * @return the reference\n     **/\n    String ref() default \"\";\n\n    /**\n     * Set to true to resolve the request body schema from parameter type\n     *\n     * @since 2.2.15\n     **/\n    boolean useParameterTypeSchema() default false;\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/parameters/ValidatedParameter.java",
    "content": "package io.swagger.v3.oas.annotations.parameters;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * Variant of JSR-303's jakarta.validation.Valid, supporting the\n * specification of validation groups.\n **/\n@Target({ElementType.PARAMETER})\n@Retention(RetentionPolicy.RUNTIME)\npublic @interface ValidatedParameter {\n    Class<?>[] value() default {};\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/responses/ApiResponse.java",
    "content": "package io.swagger.v3.oas.annotations.responses;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.headers.Header;\nimport io.swagger.v3.oas.annotations.links.Link;\nimport io.swagger.v3.oas.annotations.media.Content;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Repeatable;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.TYPE;\n\n/**\n * The annotation may be used at method level or as field of {@link io.swagger.v3.oas.annotations.Operation} to define one or more responses of the\n * Operation.\n *\n * <p>swagger-jaxrs2 reader engine considers this annotation along with method return type and context as input to\n * resolve the OpenAPI Operation responses.</p>\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#response-object\">Response (OpenAPI specification)</a>\n * @see io.swagger.v3.oas.annotations.Operation\n **/\n@Target({METHOD, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\n@Repeatable(ApiResponses.class)\npublic @interface ApiResponse {\n    /**\n     * A short description of the response.\n     *\n     * @return description of the response\n     **/\n    String description() default \"\";\n\n    /**\n     * The HTTP response code, or 'default', for the supplied response. May only have 1 default entry.\n     *\n     * @return response code\n     **/\n    String responseCode() default \"default\";\n\n    /**\n     * An array of response headers. Allows additional information to be included with response.\n     *\n     * @return array of headers\n     **/\n    Header[] headers() default {};\n\n    /**\n     * An array of operation links that can be followed from the response.\n     *\n     * @return array of links\n     **/\n    Link[] links() default {};\n\n    /**\n     * An array containing descriptions of potential response payloads, for different media types.\n     *\n     * @return array of content\n     **/\n    Content[] content() default {};\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n    /**\n     * A reference to a response defined in components responses.\n     *\n     * @since 2.0.3\n     * @return the reference\n     **/\n    String ref() default \"\";\n\n    /**\n     * Set to true to resolve the response schema from method return type\n     *\n     * @since 2.2.0\n     **/\n    boolean useReturnTypeSchema() default false;\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/responses/ApiResponses.java",
    "content": "package io.swagger.v3.oas.annotations.responses;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\nimport static java.lang.annotation.ElementType.TYPE;\n\n/**\n * Container for repeatable {@link ApiResponse} annotation\n *\n * @see ApiResponse\n */\n@Target({METHOD, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface ApiResponses {\n    /**\n     * An array of ApiResponse annotations\n     *\n     * @return the array of the ApiResponse\n     **/\n    ApiResponse[] value() default {};\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/responses/FailedApiResponse.java",
    "content": "package io.swagger.v3.oas.annotations.responses;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.media.Content;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * A meta-annotation that bundles common error response definitions for API operations.\n * <p>\n * Includes default definitions for:\n * <ul>\n *   <li>400 Bad Request</li>\n *   <li>401 Unauthorized</li>\n *   <li>403 Forbidden</li>\n *   <li>404 Not Found</li>\n *   <li>429 Too Many Requests</li>\n *   <li>500 Internal Server Error</li>\n *   <li>503 Service Unavailable</li>\n * </ul>\n * Can be used at type level to apply to all operations in a controller,\n * or at method level for individual operations.\n *\n * @see ApiResponse\n * @see ApiResponses\n * @since 2.2.32\n */\n\n@Target({ElementType.METHOD, ElementType.TYPE, ElementType.ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@ApiResponse(responseCode = \"400\", description = \"Bad Request\", content = @Content)\n@ApiResponse(responseCode = \"401\", description = \"Unauthorized\", content = @Content)\n@ApiResponse(responseCode = \"403\", description = \"Forbidden\", content = @Content)\n@ApiResponse(responseCode = \"404\", description = \"Not Found\", content = @Content)\n@ApiResponse(responseCode = \"429\", description = \"Too Many Requests\", content = @Content)\n@ApiResponse(responseCode = \"500\", description = \"Internal Server Error\", content = @Content)\n@ApiResponse(responseCode = \"503\", description = \"Service Unavailable\", content = @Content)\npublic @interface FailedApiResponse {\n    /**\n     * A reference to a response definition in components responses.\n     *\n     * @return the reference\n     * @since 2.2.32\n     */\n    String ref() default \"\";\n\n    /**\n     * The list of optional extensions.\n     *\n     * @return an optional array of extensions\n     * @since 2.2.32\n     */\n    Extension[] extensions() default {};\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/OAuthFlow.java",
    "content": "package io.swagger.v3.oas.annotations.security;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * Configuration details for a supported OAuth Flow.\n **/\n@Target({})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface OAuthFlow {\n    /**\n     * The authorization URL to be used for this flow. This must be in the form of a URL.  Applies to oauth2 (\"implicit\", \"authorizationCode\") type.\n     *\n     * @return the authorization url\n     **/\n    String authorizationUrl() default \"\";\n\n    /**\n     * The token URL to be used for this flow. This must be in the form of a URL.  Applies to oauth2 (\"password\", \"clientCredentials\", \"authorizationCode\") type.\n     *\n     * @return the token url\n     **/\n    String tokenUrl() default \"\";\n\n    /**\n     * The URL to be used for obtaining refresh tokens. This must be in the form of a URL.  Applies to oauth2 type.\n     *\n     * @return the refresh url\n     **/\n    String refreshUrl() default \"\";\n\n    /**\n     * The available scopes for the OAuth2 security scheme.  Applies to oauth2 type.\n     *\n     * @return array of scopes\n     **/\n    OAuthScope[] scopes() default {};\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/OAuthFlows.java",
    "content": "package io.swagger.v3.oas.annotations.security;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * Allows configuration of the supported OAuth Flows.\n **/\n@Target({})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface OAuthFlows {\n    /**\n     * Configuration for the OAuth Implicit flow.\n     *\n     * @return OAuthFlow implicit\n     **/\n    OAuthFlow implicit() default @OAuthFlow();\n\n    /**\n     * Configuration for the OAuth Resource Owner Password flow.\n     *\n     * @return OAuthFlow password\n     **/\n    OAuthFlow password() default @OAuthFlow();\n\n    /**\n     * Configuration for the OAuth Client Credentials flow.\n     *\n     * @return OAuthFlow clientCredentials\n     **/\n    OAuthFlow clientCredentials() default @OAuthFlow();\n\n    /**\n     * Configuration for the OAuth Authorization Code flow.\n     *\n     * @return OAuthFloe authorizationCode\n     **/\n    OAuthFlow authorizationCode() default @OAuthFlow();\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/OAuthScope.java",
    "content": "package io.swagger.v3.oas.annotations.security;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * Represents an OAuth scope.\n **/\n@Target({})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface OAuthScope {\n    /**\n     * Name of the scope.\n     *\n     * @return String name\n     */\n    String name() default \"\";\n\n    /**\n     * Short description of the scope.\n     *\n     * @return String description\n     */\n    String description() default \"\";\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecurityRequirement.java",
    "content": "package io.swagger.v3.oas.annotations.security;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Repeatable;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\n\n/**\n * The annotation may be applied at class or method level, or in {@link io.swagger.v3.oas.annotations.Operation#security()} to define security requirements for the\n * single operation (when applied at method level) or for all operations of a class (when applied at class level).\n * <p>It can also be used in {@link io.swagger.v3.oas.annotations.OpenAPIDefinition#security()} to define spec level security.</p>\n * <p>{@link SecurityRequirement#combine()} can be used to define multiple security requirements at the same time, requiring each one of them.\n * If only one of multiple security schemes is required, use multiple {@link SecurityRequirement} annotations.</p>\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#security-requirement-object\">Security Requirement (OpenAPI specification)</a>\n * @see io.swagger.v3.oas.annotations.OpenAPIDefinition\n * @see io.swagger.v3.oas.annotations.Operation\n **/\n@Target({METHOD, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Repeatable(SecurityRequirements.class)\n@Inherited\npublic @interface SecurityRequirement {\n    /**\n     * This name must correspond to a declared SecurityRequirement.\n     * <p>Exactly one of this and {@link #combine()} must be set.</p>\n     *\n     * @return String name\n     */\n    String name() default \"\";\n\n    /**\n     * If the security scheme is of type \"oauth2\" or \"openIdConnect\", then the value is a list of scope names required for the execution.\n     * For other security scheme types, the array must be empty.\n     *\n     * @return String array of scopes\n     */\n    String[] scopes() default {};\n\n    /**\n     * If multiple requirements apply at the same time, use this value instead of {@link #name()} and {@link #scopes()}.\n     * If any one of multiple security schemes is required, use multiple {@link SecurityRequirement} annotations instead.\n     * <p>Exactly one of this and {@link #name()} must be set.</p>\n     *\n     * @return SecurityRequirementEntry array of requirements\n     */\n    SecurityRequirementEntry[] combine() default {};\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecurityRequirementEntry.java",
    "content": "package io.swagger.v3.oas.annotations.security;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * The annotation may be applied in {@link SecurityRequirement#combine()} to define combined security requirements for the\n * single operation.\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#security-requirement-object\">Security Requirement (OpenAPI specification)</a>\n * @see io.swagger.v3.oas.annotations.security.SecurityRequirement\n **/\n@Target({ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\npublic @interface SecurityRequirementEntry {\n    /**\n     * This name must correspond to a declared SecurityRequirement.\n     *\n     * @return String name\n     */\n    String name();\n\n    /**\n     * If the security scheme is of type \"oauth2\" or \"openIdConnect\", then the value is a list of scope names required for the execution.\n     * For other security scheme types, the array must be empty.\n     *\n     * @return String array of scopes\n     */\n    String[] scopes() default {};\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecurityRequirements.java",
    "content": "package io.swagger.v3.oas.annotations.security;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\n\n/**\n * Container for repeatable {@link SecurityRequirement} annotation\n *\n * @see SecurityRequirement\n */\n@Target({METHOD, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface SecurityRequirements {\n    /**\n     * An array of SecurityRequirement annotations\n     *\n     * @return the array of the SecurityRequirement\n     **/\n    SecurityRequirement[] value() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecurityScheme.java",
    "content": "package io.swagger.v3.oas.annotations.security;\n\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeType;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Repeatable;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\n\n/**\n * The annotation may be used at class level (also on multiple classes) to add securitySchemes to spec\n * components section.\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#security-scheme-object\">Security Scheme (OpenAPI specification)</a>\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#components-object\">Components (OpenAPI specification)</a>\n **/\n@Target({TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Repeatable(SecuritySchemes.class)\n@Inherited\npublic @interface SecurityScheme {\n    /**\n     * The type of the security scheme. Valid values are \"apiKey\", \"http\", \"oauth2\", \"openIdConnect\".\n     *\n     * @return String type\n     **/\n    SecuritySchemeType type();\n\n    /**\n     * The name identifying this security scheme\n     *\n     * @return String name\n     **/\n    String name() default \"\";\n\n    /**\n     * A short description for security scheme. CommonMark syntax can be used for rich text representation.\n     *\n     * @return String description\n     **/\n    String description() default \"\";\n\n    /**\n     * The name of the header or query parameter to be used. Applies to apiKey type.\n     * Maps to \"name\" property of <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#security-scheme-object\">Security Scheme (OpenAPI specification)</a>\n     *\n     * @return String paramName\n     **/\n    String paramName() default \"\";\n\n    /**\n     * The location of the API key. Valid values are \"query\" or \"header\".  Applies to apiKey type.\n     *\n     * @return String in\n     **/\n    SecuritySchemeIn in() default SecuritySchemeIn.DEFAULT;\n\n    /**\n     * The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC 7235.  Applies to http type.\n     *\n     * @return String scheme\n     **/\n    String scheme() default \"\";\n\n    /**\n     * A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an\n     * authorization server, so this information is primarily for documentation purposes.  Applies to http (\"bearer\") type.\n     *\n     * @return String bearerFormat\n     **/\n    String bearerFormat() default \"\";\n\n    /**\n     * Required. An object containing configuration information for the flow types supported.  Applies to oauth2 type.\n     *\n     * @return OAuthFlows flows\n     **/\n    OAuthFlows flows() default @OAuthFlows;\n\n    /**\n     * Required. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL.  Applies to openIdConnect.\n     *\n     * @return String openIdConnectUrl\n     **/\n    String openIdConnectUrl() default \"\";\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n    /**\n     * A reference to a SecurityScheme defined in components securitySchemes.\n     *\n     * @since 2.0.3\n     * @return the reference\n     **/\n    String ref() default \"\";\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecuritySchemes.java",
    "content": "package io.swagger.v3.oas.annotations.security;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\n\n/**\n * Container for repeatable {@link SecurityScheme} annotation\n *\n * @see SecurityScheme\n */\n@Target({TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface SecuritySchemes {\n    /**\n     * An array of SecurityScheme annotations\n     *\n     * @return the array of the SecurityScheme\n     **/\n    SecurityScheme[] value() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/servers/Server.java",
    "content": "package io.swagger.v3.oas.annotations.servers;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Repeatable;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\n\n/**\n * The annotation may be applied at class or method level, or in {@link io.swagger.v3.oas.annotations.Operation#servers()} to define servers for the\n * single operation (when applied at method level) or for all operations of a class (when applied at class level).\n * <p>It can also be used in {@link io.swagger.v3.oas.annotations.OpenAPIDefinition#servers()} to define spec level servers.</p>\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#server-object\">Server (OpenAPI specification)</a>\n * @see io.swagger.v3.oas.annotations.OpenAPIDefinition\n * @see io.swagger.v3.oas.annotations.Operation\n **/\n@Target({METHOD, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Repeatable(Servers.class)\n@Inherited\npublic @interface Server {\n    /**\n     * Required. A URL to the target host.\n     * This URL supports Server Variables and may be relative, to indicate that the host location is relative to the location where the\n     * OpenAPI definition is being served. Variable substitutions will be made when a variable is named in {brackets}.\n     *\n     * @return String url\n     **/\n    String url() default \"\";\n\n    /**\n     * An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.\n     *\n     * @return String description\n     **/\n    String description() default \"\";\n\n    /**\n     * An array of variables used for substitution in the server's URL template.\n     *\n     * @return array of ServerVariables\n     **/\n    ServerVariable[] variables() default {};\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/servers/ServerVariable.java",
    "content": "package io.swagger.v3.oas.annotations.servers;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * An object representing a Server Variable for server URL template substitution.\n **/\n@Target({})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface ServerVariable {\n    /**\n     * Required.  The name of this variable.\n     *\n     * @return String name\n     **/\n    String name();\n\n    /**\n     * An array of allowable values for this variable.  This field map to the enum property in the OAS schema.\n     *\n     * @return String array of allowableValues\n     **/\n    String[] allowableValues() default \"\";\n\n    /**\n     * Required.  The default value of this variable.\n     *\n     * @return String defaultValue\n     **/\n    String defaultValue();\n\n    /**\n     * An optional description for the server variable.\n     *\n     * @return String description\n     **/\n    String description() default \"\";\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/servers/Servers.java",
    "content": "package io.swagger.v3.oas.annotations.servers;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\n\n/**\n * Container for repeatable {@link Server} annotation\n *\n * @see Server\n */\n@Target({METHOD, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface Servers {\n    /**\n     * An array of Server Objects which is used to provide connectivity information to a target server.\n     *\n     * @return the servers used for this API\n     */\n    Server[] value() default {};\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/tags/Tag.java",
    "content": "package io.swagger.v3.oas.annotations.tags;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Repeatable;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\n\n/**\n * The annotation may be applied at class or method level, or in {@link io.swagger.v3.oas.annotations.Operation#tags()} to define tags for the\n * single operation (when applied at method level) or for all operations of a class (when applied at class level).\n * <p>It can also be used in {@link io.swagger.v3.oas.annotations.OpenAPIDefinition#tags()} to define spec level tags.</p>\n * <p>When applied at method or class level, if only a name is provided, the tag will be added to operation only;\n * if additional fields are also defined, like description or externalDocs, the Tag will also be added to openAPI.tags\n * field</p>\n *\n * @see <a target=\"_new\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#tag-object\">Tag (OpenAPI specification)</a>\n * @see io.swagger.v3.oas.annotations.OpenAPIDefinition\n **/\n@Target({METHOD, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Repeatable(Tags.class)\n@Inherited\npublic @interface Tag {\n\n    /**\n     * The name of this tag.\n     *\n     * @return the name of this tag\n     */\n    String name();\n\n    /**\n     * A short description for this tag.\n     *\n     * @return the description of this tag\n     */\n    String description() default \"\";\n\n    /**\n     * Additional external documentation for this tag.\n     *\n     * @return the external documentation for this tag\n     */\n    ExternalDocumentation externalDocs() default @ExternalDocumentation();\n\n    /**\n     * The list of optional extensions\n     *\n     * @return an optional array of extensions\n     */\n    Extension[] extensions() default {};\n}\n"
  },
  {
    "path": "modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/tags/Tags.java",
    "content": "package io.swagger.v3.oas.annotations.tags;\n\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;\nimport static java.lang.annotation.ElementType.TYPE;\nimport static java.lang.annotation.ElementType.METHOD;\n\n/**\n * Container for repeatable {@link Tag} annotation\n *\n * @see Tag\n */\n@Target({METHOD, TYPE, ANNOTATION_TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\npublic @interface Tags {\n    /**\n     * An array of Tag annotation objects which hold metadata for the API\n     *\n     * @return array of Tags\n     */\n    Tag[] value() default {};\n\n}\n"
  },
  {
    "path": "modules/swagger-core/pom.xml",
    "content": "<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <parent>\n        <groupId>io.swagger.core.v3</groupId>\n        <artifactId>swagger-project</artifactId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../..</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-core</artifactId>\n    <name>swagger-core</name>\n    <description>swagger-core</description>\n    <build>\n        <sourceDirectory>src/main/java</sourceDirectory>\n        <defaultGoal>install</defaultGoal>\n        <plugins>\n            <plugin>\n                <groupId>biz.aQute.bnd</groupId>\n                <artifactId>bnd-maven-plugin</artifactId>\n                <configuration>\n                    <bnd>\n                        Import-Package: \\\n                        javax.validation.constraints;version=\"[1.1,3)\", \\\n                        javax.xml.bind.annotation;version=\"[2.2,3)\", \\\n                        *\n                    </bnd>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <version>3.3.0</version>\n                <executions>\n                    <execution>\n                        <id>default-jar</id>\n                        <configuration>\n                            <archive>\n                                <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>\n                                <manifestEntries>\n                                    <Automatic-Module-Name>io.swagger.v3.core</Automatic-Module-Name>\n                                </manifestEntries>\n                            </archive>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <goals>\n                            <goal>test-jar</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>jakarta.xml.bind</groupId>\n            <artifactId>jakarta.xml.bind-api</artifactId>\n            <version>2.3.3</version>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.commons</groupId>\n            <artifactId>commons-lang3</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-api</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.core</groupId>\n            <artifactId>jackson-annotations</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.core</groupId>\n            <artifactId>jackson-databind</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.dataformat</groupId>\n            <artifactId>jackson-dataformat-yaml</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.datatype</groupId>\n            <artifactId>jackson-datatype-jsr310</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-annotations</artifactId>\n            <version>${project.parent.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.yaml</groupId>\n            <artifactId>snakeyaml</artifactId>\n            <version>${snakeyaml-version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-models</artifactId>\n            <version>${project.parent.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>joda-time</groupId>\n            <artifactId>joda-time</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>com.google.guava</groupId>\n            <artifactId>guava</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.joda</groupId>\n            <artifactId>joda-convert</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-classic</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-core</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>jakarta.validation</groupId>\n            <artifactId>jakarta.validation-api</artifactId>\n            <version>${validation-api-version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.testng</groupId>\n            <artifactId>testng</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>commons-io</groupId>\n            <artifactId>commons-io</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>jakarta.ws.rs</groupId>\n            <artifactId>jakarta.ws.rs-api</artifactId>\n            <version>${jakarta-ws-rs-api-version}</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>jakarta.inject</groupId>\n            <artifactId>jakarta.inject-api</artifactId>\n            <version>1.0.5</version>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n    <properties>\n        <!-- TODO increase coverage -->\n        <validation-api-version>2.0.2</validation-api-version>\n        <jakarta-ws-rs-api-version>2.1.6</jakarta-ws-rs-api-version>\n        <coverage.complexity.minimum>0.60</coverage.complexity.minimum>\n        <coverage.line.minimum>0.0</coverage.line.minimum>\n        <coverage.missed.classes>3</coverage.missed.classes>\n    </properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/converter/AnnotatedType.java",
    "content": "package io.swagger.v3.core.converter;\n\nimport com.fasterxml.jackson.annotation.JsonView;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Type;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Comparator;\nimport java.util.List;\nimport java.util.Objects;\nimport java.util.function.Function;\nimport java.util.stream.Collectors;\n\npublic class AnnotatedType {\n    private Type type;\n    private String name;\n    private Schema parent;\n    private Function<AnnotatedType, Schema> jsonUnwrappedHandler;\n    private boolean skipOverride;\n    private boolean schemaProperty;\n    private Annotation[] ctxAnnotations;\n    private boolean resolveAsRef;\n    private boolean resolveEnumAsRef;\n    private JsonView jsonViewAnnotation;\n    private boolean includePropertiesWithoutJSONView = true;\n    private boolean skipSchemaName;\n    private boolean skipJsonIdentity;\n    private String propertyName;\n    private boolean isSubtype;\n\n    private Components components;\n\n    public AnnotatedType() {\n    }\n\n    public AnnotatedType(Type type) {\n        this.type = type;\n    }\n\n    public boolean isSkipOverride() {\n        return skipOverride;\n    }\n\n    public void setSkipOverride(boolean skipOverride) {\n        this.skipOverride = skipOverride;\n    }\n\n    public AnnotatedType skipOverride(boolean skipOverride) {\n        this.skipOverride = skipOverride;\n        return this;\n    }\n\n    public boolean isSkipJsonIdentity() {\n        return skipJsonIdentity;\n    }\n\n    public void setSkipJsonIdentity(boolean skipJsonIdentity) {\n        this.skipJsonIdentity = skipJsonIdentity;\n    }\n\n    public AnnotatedType skipJsonIdentity(boolean skipJsonIdentity) {\n        this.skipJsonIdentity = skipJsonIdentity;\n        return this;\n    }\n\n    public boolean isSkipSchemaName() {\n        return skipSchemaName;\n    }\n\n    public void setSkipSchemaName(boolean skipSchemaName) {\n        this.skipSchemaName = skipSchemaName;\n    }\n\n    public AnnotatedType skipSchemaName(boolean skipSchemaName) {\n        this.skipSchemaName = skipSchemaName;\n        return this;\n    }\n\n    public boolean isResolveAsRef() {\n        return resolveAsRef;\n    }\n\n    public void setResolveAsRef(boolean resolveAsRef) {\n        this.resolveAsRef = resolveAsRef;\n    }\n\n    public AnnotatedType resolveAsRef(boolean resolveAsRef) {\n        this.resolveAsRef = resolveAsRef;\n        return this;\n    }\n\n    public boolean isResolveEnumAsRef() {\n        return resolveEnumAsRef;\n    }\n\n    public void setResolveEnumAsRef(boolean resolveEnumAsRef) {\n        this.resolveEnumAsRef = resolveEnumAsRef;\n    }\n\n    public AnnotatedType resolveEnumAsRef(boolean resolveEnumAsRef) {\n        this.resolveEnumAsRef = resolveEnumAsRef;\n        return this;\n    }\n\n    public boolean isSchemaProperty() {\n        return schemaProperty;\n    }\n\n    public void setSchemaProperty(boolean schemaProperty) {\n        this.schemaProperty = schemaProperty;\n    }\n\n    public AnnotatedType schemaProperty(boolean schemaProperty) {\n        this.schemaProperty = schemaProperty;\n        return this;\n    }\n\n    public Function<AnnotatedType, Schema> getJsonUnwrappedHandler() {\n        return jsonUnwrappedHandler;\n    }\n\n    public void setJsonUnwrappedHandler(Function<AnnotatedType, Schema> jsonUnwrappedHandler) {\n        this.jsonUnwrappedHandler = jsonUnwrappedHandler;\n    }\n\n    public AnnotatedType jsonUnwrappedHandler(Function<AnnotatedType, Schema> jsonUnwrappedHandler) {\n        this.jsonUnwrappedHandler = jsonUnwrappedHandler;\n        return this;\n    }\n\n    public Schema getParent() {\n        return parent;\n    }\n\n    public void setParent(Schema parent) {\n        this.parent = parent;\n    }\n\n    public AnnotatedType parent(Schema parent) {\n        this.parent = parent;\n        return this;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public AnnotatedType name(String name) {\n        this.name = name;\n        return this;\n    }\n\n    public Annotation[] getCtxAnnotations() {\n        return ctxAnnotations == null ? null : Arrays.copyOf(ctxAnnotations, ctxAnnotations.length);\n    }\n\n    public void setCtxAnnotations(Annotation[] ctxAnnotations) {\n        this.ctxAnnotations = ctxAnnotations == null ? null : Arrays.copyOf(ctxAnnotations, ctxAnnotations.length);\n    }\n\n    public AnnotatedType ctxAnnotations(Annotation[] ctxAnnotations) {\n        setCtxAnnotations(ctxAnnotations);\n        return this;\n    }\n\n    public Components getComponents() {\n        return components;\n    }\n\n    public void setComponents(Components components) {\n        this.components = components;\n    }\n\n    public AnnotatedType components(Components components) {\n        setComponents(components);\n        return this;\n    }\n\n    public Type getType() {\n        return type;\n    }\n\n    public void setType(Type type) {\n        this.type = type;\n    }\n\n    public AnnotatedType type(Type type) {\n        setType(type);\n        return this;\n    }\n\n    public JsonView getJsonViewAnnotation() {\n        return jsonViewAnnotation;\n    }\n\n    public void setJsonViewAnnotation(JsonView jsonViewAnnotation) {\n        this.jsonViewAnnotation = jsonViewAnnotation;\n    }\n\n    public AnnotatedType jsonViewAnnotation(JsonView jsonViewAnnotation) {\n        this.jsonViewAnnotation = jsonViewAnnotation;\n        return this;\n    }\n\n    public boolean isIncludePropertiesWithoutJSONView() {\n        return includePropertiesWithoutJSONView;\n    }\n\n    public void setIncludePropertiesWithoutJSONView(boolean includePropertiesWithoutJSONView) {\n        this.includePropertiesWithoutJSONView = includePropertiesWithoutJSONView;\n    }\n\n    public AnnotatedType includePropertiesWithoutJSONView(boolean includePropertiesWithoutJSONView) {\n        this.includePropertiesWithoutJSONView = includePropertiesWithoutJSONView;\n        return this;\n    }\n\n    /**\n     * @since 2.0.4\n     */\n    public String getPropertyName() {\n        return propertyName;\n    }\n\n    /**\n     * @since 2.0.4\n     */\n    public void setPropertyName(String propertyName) {\n        this.propertyName = propertyName;\n    }\n\n    /**\n     * @since 2.0.4\n     */\n    public AnnotatedType propertyName(String propertyName) {\n        this.propertyName = propertyName;\n        return this;\n    }\n\n    public boolean isSubtype() {\n        return isSubtype;\n    }\n\n    public void setSubtype(boolean isSubtype) {\n        this.isSubtype = isSubtype;\n    }\n\n    public AnnotatedType subtype(boolean isSubtype) {\n        this.isSubtype = isSubtype;\n        return this;\n    }\n\n    private List<Annotation> getProcessedAnnotations(Annotation[] annotations) {\n        if (annotations == null || annotations.length == 0) {\n            return new ArrayList<>();\n        }\n        return Arrays.stream(annotations)\n                .filter(a -> {\n                    String pkg = a.annotationType().getPackage().getName();\n                    return !pkg.startsWith(\"java.\") && !pkg.startsWith(\"jdk.\") && !pkg.startsWith(\"sun.\");\n                })\n                .sorted(Comparator.comparing(a -> a.annotationType().getName()))\n                .collect(Collectors.toList());\n    }\n\n    @Override\n    public boolean equals(Object o) {\n        if (this == o) return true;\n        if (!(o instanceof AnnotatedType)) return false;\n        AnnotatedType that = (AnnotatedType) o;\n        List<Annotation> thisAnnotatinons = getProcessedAnnotations(this.ctxAnnotations);\n        List<Annotation> thatAnnotatinons = getProcessedAnnotations(that.ctxAnnotations);\n        return  includePropertiesWithoutJSONView == that.includePropertiesWithoutJSONView &&\n                schemaProperty == that.schemaProperty &&\n                isSubtype == that.isSubtype &&\n                Objects.equals(type, that.type) &&\n                Objects.equals(thisAnnotatinons, thatAnnotatinons) &&\n                Objects.equals(jsonViewAnnotation, that.jsonViewAnnotation) &&\n                (!schemaProperty || Objects.equals(propertyName, that.propertyName));\n    }\n\n    @Override\n    public int hashCode() {\n        List<Annotation> processedAnnotations = getProcessedAnnotations(this.ctxAnnotations);\n        return Objects.hash(type, jsonViewAnnotation, includePropertiesWithoutJSONView, processedAnnotations, schemaProperty, isSubtype, schemaProperty ? propertyName : null);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/converter/ModelConverter.java",
    "content": "package io.swagger.v3.core.converter;\n\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.Iterator;\n\npublic interface ModelConverter {\n\n    /**\n     * @param type\n     * @param context\n     * @param chain   the chain of model converters to try if this implementation cannot process\n     * @return null if this ModelConverter cannot convert the given Type\n     */\n    Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator<ModelConverter> chain);\n\n    default boolean isOpenapi31() {\n        return false;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/converter/ModelConverterContext.java",
    "content": "package io.swagger.v3.core.converter;\n\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.lang.reflect.Type;\nimport java.util.Iterator;\nimport java.util.Map;\n\npublic interface ModelConverterContext {\n\n    /**\n     * needs to be called whenever a Model is defined which can be referenced from another\n     * Model or Property\n     *\n     * @param name  the name of the model\n     * @param model the Model\n     */\n    void defineModel(String name, Schema model);\n\n    /**\n     * needs to be called whenever a Schema is defined which can be referenced from another\n     * Model or Property\n     *\n     * @param name     the name of the model\n     * @param model    the Model\n     * @param type     the AnnotatedType\n     * @param prevName the (optional) previous name\n     */\n    void defineModel(String name, Schema model, AnnotatedType type, String prevName);\n\n    /**\n     * needs to be called whenever a Schema is defined which can be referenced from another\n     * Model or Property\n     *\n     * @param name     the name of the model\n     * @param model    the Model\n     * @param type     the Type\n     * @param prevName the (optional) previous name\n     */\n    void defineModel(String name, Schema model, Type type, String prevName);\n\n    /**\n     * @param type The Schema\n     * @return a Model representation of the Class. Any referenced models will be defined already.\n     */\n    Schema resolve(AnnotatedType type);\n\n    Map<String, Schema> getDefinedModels();\n\n    /**\n     * @return an Iterator of ModelConverters.  This iterator is not reused\n     */\n    public Iterator<ModelConverter> getConverters();\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/converter/ModelConverterContextImpl.java",
    "content": "package io.swagger.v3.core.converter;\n\nimport io.swagger.v3.core.util.ReferenceTypeUtils;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.apache.commons.lang3.StringUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.lang.reflect.Type;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.TreeMap;\n\npublic class ModelConverterContextImpl implements ModelConverterContext {\n    private static final Logger LOGGER = LoggerFactory.getLogger(ModelConverterContextImpl.class);\n\n    private final List<ModelConverter> converters;\n    private final Map<String, Schema> modelByName;\n    private final HashMap<AnnotatedType, Schema> modelByType;\n    private final Set<AnnotatedType> processedTypes;\n\n    public ModelConverterContextImpl(List<ModelConverter> converters) {\n        this.converters = converters;\n        modelByName = new TreeMap<>();\n        modelByType = new HashMap<>();\n        processedTypes = new HashSet<>();\n    }\n\n    public ModelConverterContextImpl(ModelConverter converter) {\n        this(new ArrayList<ModelConverter>());\n        converters.add(converter);\n    }\n\n    @Override\n    public Iterator<ModelConverter> getConverters() {\n        return converters.iterator();\n    }\n\n    @Override\n    public void defineModel(String name, Schema model) {\n        AnnotatedType aType = null;\n        defineModel(name, model, aType, null);\n    }\n\n    @Override\n    public void defineModel(String name, Schema model, Type type, String prevName) {\n        defineModel(name, model, new AnnotatedType().type(type), prevName);\n    }\n    @Override\n    public void defineModel(String name, Schema model, AnnotatedType type, String prevName) {\n        if (LOGGER.isTraceEnabled()) {\n            LOGGER.trace(String.format(\"defineModel %s %s\", name, model));\n        }\n        modelByName.put(name, model);\n\n        if (StringUtils.isNotBlank(prevName) && !prevName.equals(name)) {\n            modelByName.remove(prevName);\n        }\n\n        if (type != null && type.getType() != null) {\n            modelByType.put(type, model);\n        }\n    }\n\n    @Override\n    public Map<String, Schema> getDefinedModels() {\n        return Collections.unmodifiableMap(modelByName);\n    }\n\n    @Override\n    public Schema resolve(AnnotatedType type) {\n\n        AnnotatedType aType = ReferenceTypeUtils.unwrapReference(type);\n        if (aType != null) {\n            return resolve(aType);\n        }\n\n        if (processedTypes.contains(type)) {\n            return modelByType.get(type);\n        } else {\n            processedTypes.add(type);\n        }\n        if (LOGGER.isDebugEnabled()) {\n            LOGGER.debug(String.format(\"resolve %s\", type.getType()));\n        }\n        Iterator<ModelConverter> converters = this.getConverters();\n        Schema resolved = null;\n        if (converters.hasNext()) {\n            ModelConverter converter = converters.next();\n            LOGGER.trace(\"trying extension {}\", converter);\n            resolved = converter.resolve(type, this, converters);\n        }\n        if (resolved != null) {\n            modelByType.put(type, resolved);\n\n            Schema resolvedImpl = resolved;\n            if (resolvedImpl.getName() != null) {\n                modelByName.put(resolvedImpl.getName(), resolved);\n            }\n        } else {\n            processedTypes.remove(type);\n        }\n\n        return resolved;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/converter/ModelConverters.java",
    "content": "package io.swagger.v3.core.converter;\n\nimport com.fasterxml.jackson.databind.type.TypeFactory;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.util.Configuration;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.lang.reflect.Type;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Map.Entry;\nimport java.util.ServiceLoader;\nimport java.util.Set;\nimport java.util.concurrent.CopyOnWriteArrayList;\n\npublic class ModelConverters {\n    private static ModelConverters SINGLETON = null;\n    private static ModelConverters SINGLETON31 = null;\n    static Logger LOGGER = LoggerFactory.getLogger(ModelConverters.class);\n    private final List<ModelConverter> converters;\n    private final Set<String> skippedPackages = new HashSet<>();\n    private final Set<String> skippedClasses = new HashSet<>();\n\n    public ModelConverters() {\n        converters = new CopyOnWriteArrayList<>();\n        converters.add(new ModelResolver(Json.mapper()));\n    }\n\n    public ModelConverters(boolean openapi31) {\n        converters = new CopyOnWriteArrayList<>();\n        if (openapi31) {\n            converters.add(new ModelResolver(Json31.mapper()).openapi31(true));\n        } else {\n            converters.add(new ModelResolver(Json.mapper()));\n        }\n    }\n\n    public ModelConverters(boolean openapi31, Schema.SchemaResolution schemaResolution) {\n        converters = new CopyOnWriteArrayList<>();\n        if (openapi31) {\n            converters.add(new ModelResolver(Json31.mapper()).openapi31(true).schemaResolution(schemaResolution));\n        } else {\n            converters.add(new ModelResolver(Json.mapper()).schemaResolution(schemaResolution));\n        }\n    }\n\n    public ModelConverters(Configuration configuration) {\n        converters = new CopyOnWriteArrayList<>();\n        boolean openapi31 =configuration != null && configuration.isOpenAPI31() != null && configuration.isOpenAPI31();\n        if (openapi31) {\n            converters.add(new ModelResolver(Json31.mapper()).configuration(configuration));\n        } else {\n            converters.add(new ModelResolver(Json.mapper()).configuration(configuration));\n        }\n    }\n\n    public Set<String> getSkippedPackages() {\n        return skippedPackages;\n    }\n\n    public static ModelConverters getInstance(boolean openapi31) {\n        if (openapi31) {\n            if (SINGLETON31 == null) {\n                SINGLETON31 = new ModelConverters(openapi31);\n                init(SINGLETON31);\n            }\n            return SINGLETON31;\n        }\n        if (SINGLETON == null) {\n            SINGLETON = new ModelConverters(openapi31);\n            init(SINGLETON);\n        }\n        return SINGLETON;\n    }\n\n    public static void reset() {\n        synchronized (ModelConverters.class) {\n            SINGLETON = null;\n            SINGLETON31 = null;\n        }\n    }\n\n    public static ModelConverters getInstance(boolean openapi31, Schema.SchemaResolution schemaResolution) {\n        synchronized (ModelConverters.class) {\n            if (openapi31) {\n                if (SINGLETON31 == null) {\n                    boolean applySchemaResolution = Boolean.parseBoolean(System.getProperty(Schema.APPLY_SCHEMA_RESOLUTION_PROPERTY, \"false\")) || Boolean.parseBoolean(System.getenv(Schema.APPLY_SCHEMA_RESOLUTION_PROPERTY));\n                    SINGLETON31 = new ModelConverters(openapi31, applySchemaResolution ? schemaResolution : Schema.SchemaResolution.DEFAULT);\n                    init(SINGLETON31);\n                }\n                return SINGLETON31;\n            }\n            if (SINGLETON == null) {\n                SINGLETON = new ModelConverters(openapi31, schemaResolution);\n                init(SINGLETON);\n            }\n            return SINGLETON;\n        }\n    }\n\n    public static ModelConverters getInstance(Configuration configuration) {\n        synchronized (ModelConverters.class) {\n            boolean openapi31 = configuration != null && configuration.isOpenAPI31() != null && configuration.isOpenAPI31();\n            if (openapi31) {\n                if (SINGLETON31 == null) {\n                    boolean applySchemaResolution = Boolean.parseBoolean(System.getProperty(Schema.APPLY_SCHEMA_RESOLUTION_PROPERTY, \"false\")) || Boolean.parseBoolean(System.getenv(Schema.APPLY_SCHEMA_RESOLUTION_PROPERTY));\n                    if (!applySchemaResolution) {\n                        configuration.schemaResolution(Schema.SchemaResolution.DEFAULT);\n                    }\n                    SINGLETON31 = new ModelConverters(configuration);\n                    init(SINGLETON31);\n                }\n                return SINGLETON31;\n            }\n            if (SINGLETON == null) {\n                SINGLETON = new ModelConverters(configuration);\n                init(SINGLETON);\n            }\n            return SINGLETON;\n        }\n    }\n\n    private static void init(ModelConverters converter) {\n        converter.addPackageToSkip(\"java.lang\");\n        converter.addPackageToSkip(\"groovy.lang\");\n\n        ServiceLoader<ModelConverter> loader = ServiceLoader.load(ModelConverter.class);\n        Iterator<ModelConverter> itr = loader.iterator();\n        while (itr.hasNext()) {\n            ModelConverter ext = itr.next();\n            if (ext == null) {\n                LOGGER.error(\"failed to load extension {}\", ext);\n            } else {\n                converter.addConverter(ext);\n                LOGGER.debug(\"adding ModelConverter: {}\", ext);\n            }\n        }\n\n    }\n    public static ModelConverters getInstance() {\n        return getInstance(false);\n    }\n\n\n    public void addConverter(ModelConverter converter) {\n        converters.add(0, converter);\n    }\n\n    public void removeConverter(ModelConverter converter) {\n        converters.remove(converter);\n    }\n\n    public List<ModelConverter> getConverters() {\n        return Collections.unmodifiableList(converters);\n    }\n\n    public void addPackageToSkip(String pkg) {\n        this.skippedPackages.add(pkg);\n    }\n\n    public void addClassToSkip(String cls) {\n        LOGGER.warn(\"skipping class {}\", cls);\n        this.skippedClasses.add(cls);\n    }\n\n    public Map<String, Schema> read(Type type) {\n        return read(new AnnotatedType().type(type));\n    }\n\n    public Map<String, Schema> read(AnnotatedType type) {\n        Map<String, Schema> modelMap = new HashMap<>();\n        if (shouldProcess(type.getType())) {\n            ModelConverterContextImpl context = new ModelConverterContextImpl(\n                    converters);\n            Schema resolve = context.resolve(type);\n            for (Entry<String, Schema> entry : context.getDefinedModels()\n                    .entrySet()) {\n                if (entry.getValue().equals(resolve)) {\n                    modelMap.put(entry.getKey(), entry.getValue());\n                }\n            }\n        }\n        return modelMap;\n    }\n\n    public Map<String, Schema> readAll(Type type) {\n        return readAll(new AnnotatedType().type(type));\n    }\n\n    public Map<String, Schema> readAll(AnnotatedType type) {\n        if (shouldProcess(type.getType())) {\n            ModelConverterContextImpl context = new ModelConverterContextImpl(\n                    converters);\n\n            LOGGER.debug(\"ModelConverters readAll from {}\", type);\n            context.resolve(type);\n            return context.getDefinedModels();\n        }\n        return new HashMap<>();\n    }\n\n    public ResolvedSchema readAllAsResolvedSchema(Type type) {\n        return readAllAsResolvedSchema(new AnnotatedType().type(type));\n    }\n    public ResolvedSchema readAllAsResolvedSchema(AnnotatedType type) {\n        if (shouldProcess(type.getType())) {\n            return resolveAsResolvedSchema(type);\n        }\n        return null;\n    }\n\n    public ResolvedSchema resolveAsResolvedSchema(AnnotatedType type) {\n        ModelConverterContextImpl context = new ModelConverterContextImpl(\n                converters);\n\n        ResolvedSchema resolvedSchema = new ResolvedSchema();\n        resolvedSchema.schema = context.resolve(type);\n        resolvedSchema.referencedSchemas = context.getDefinedModels();\n\n        return resolvedSchema;\n    }\n\n    public boolean isRegisteredAsSkippedClass(String className) {\n        return skippedClasses.contains(className);\n    }\n\n    private boolean shouldProcess(Type type) {\n        final Class<?> cls = TypeFactory.defaultInstance().constructType(type).getRawClass();\n        if (cls.isPrimitive()) {\n            return false;\n        }\n        String className = cls.getName();\n        for (String packageName : skippedPackages) {\n            if (className.startsWith(packageName)) {\n                return false;\n            }\n        }\n        return !skippedClasses.contains(className);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/converter/ResolvedSchema.java",
    "content": "package io.swagger.v3.core.converter;\n\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.Map;\n\npublic class ResolvedSchema {\n    public Schema schema;\n    public Map<String, Schema> referencedSchemas;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/filter/AbstractSpecFilter.java",
    "content": "package io.swagger.v3.core.filter;\n\nimport io.swagger.v3.core.model.ApiDescription;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\npublic abstract class AbstractSpecFilter implements OpenAPISpecFilter {\n\n    @Override\n    public Optional<OpenAPI> filterOpenAPI(OpenAPI openAPI, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        return Optional.of(openAPI);\n    }\n\n    @Override\n    public Optional<PathItem> filterPathItem(PathItem pathItem, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        return Optional.of(pathItem);\n    }\n\n    @Override\n    public Optional<Operation> filterOperation(Operation operation, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        return Optional.of(operation);\n    }\n\n    @Override\n    public Optional<Parameter> filterParameter(Parameter parameter, Operation operation, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        return Optional.of(parameter);\n    }\n\n    @Override\n    public Optional<RequestBody> filterRequestBody(RequestBody requestBody, Operation operation, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        return Optional.of(requestBody);\n    }\n\n    @Override\n    public Optional<ApiResponse> filterResponse(ApiResponse response, Operation operation, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        return Optional.of(response);\n    }\n\n    @Override\n    public Optional<Schema> filterSchema(Schema schema, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        return Optional.of(schema);\n    }\n\n    @Override\n    public Optional<Schema> filterSchemaProperty(Schema property, Schema schema, String propName, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        return Optional.of(property);\n    }\n\n    @Override\n    public boolean isRemovingUnreferencedDefinitions() {\n        return false;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/filter/OpenAPI31SpecFilter.java",
    "content": "package io.swagger.v3.core.filter;\n\nimport io.swagger.v3.core.util.OpenAPI30To31;\nimport io.swagger.v3.core.util.OpenAPISchema2JsonSchema;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\npublic class OpenAPI31SpecFilter extends AbstractSpecFilter {\n\n    private OpenAPI30To31 openAPI30To31 = new OpenAPI30To31();\n    private OpenAPISchema2JsonSchema schema2JsonSchema = new OpenAPISchema2JsonSchema();\n\n    @Override\n    public Optional<OpenAPI> filterOpenAPI(OpenAPI openAPI, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        openAPI30To31.process(openAPI);\n        return Optional.of(openAPI);\n    }\n\n    @Override\n    public Optional<Schema> filterSchema(Schema schema, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        schema2JsonSchema.process(schema);\n        return Optional.of(schema);\n    }\n\n    @Override\n    public boolean isOpenAPI31Filter() {\n        return true;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/filter/OpenAPISpecFilter.java",
    "content": "package io.swagger.v3.core.filter;\n\nimport io.swagger.v3.core.model.ApiDescription;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\npublic interface OpenAPISpecFilter {\n\n    Optional<OpenAPI> filterOpenAPI(\n            OpenAPI openAPI,\n            Map<String, List<String>> params,\n            Map<String, String> cookies,\n            Map<String, List<String>> headers);\n\n    Optional<PathItem> filterPathItem(\n            PathItem pathItem,\n            ApiDescription api,\n            Map<String, List<String>> params,\n            Map<String, String> cookies,\n            Map<String, List<String>> headers);\n\n    Optional<Operation> filterOperation(\n            Operation operation,\n            ApiDescription api,\n            Map<String, List<String>> params,\n            Map<String, String> cookies,\n            Map<String, List<String>> headers);\n\n    Optional<Parameter> filterParameter(\n            Parameter parameter,\n            Operation operation,\n            ApiDescription api,\n            Map<String, List<String>> params,\n            Map<String, String> cookies,\n            Map<String, List<String>> headers);\n\n    Optional<RequestBody> filterRequestBody(\n            RequestBody requestBody,\n            Operation operation,\n            ApiDescription api,\n            Map<String, List<String>> params,\n            Map<String, String> cookies,\n            Map<String, List<String>> headers);\n\n    Optional<ApiResponse> filterResponse(\n            ApiResponse response,\n            Operation operation,\n            ApiDescription api,\n            Map<String, List<String>> params,\n            Map<String, String> cookies,\n            Map<String, List<String>> headers);\n\n    Optional<Schema> filterSchema(\n            Schema schema,\n            Map<String, List<String>> params,\n            Map<String, String> cookies,\n            Map<String, List<String>> headers);\n\n    Optional<Schema> filterSchemaProperty(\n            Schema property,\n            Schema schema,\n            String propName,\n            Map<String, List<String>> params,\n            Map<String, String> cookies,\n            Map<String, List<String>> headers);\n\n    boolean isRemovingUnreferencedDefinitions();\n\n    default boolean isOpenAPI31Filter() {\n        return false;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/filter/SpecFilter.java",
    "content": "package io.swagger.v3.core.filter;\n\nimport io.swagger.v3.core.model.ApiDescription;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.core.util.RefUtils;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.Paths;\nimport io.swagger.v3.oas.models.callbacks.Callback;\nimport io.swagger.v3.oas.models.headers.Header;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.Content;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.tags.Tag;\nimport org.apache.commons.lang3.StringUtils;\n\nimport java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.HashSet;\nimport java.util.LinkedHashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.Set;\nimport java.util.TreeSet;\nimport java.util.stream.Collectors;\n\npublic class SpecFilter {\n\n    public OpenAPI filter(OpenAPI openAPI, OpenAPISpecFilter filter, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        OpenAPI filteredOpenAPI = filterOpenAPI(filter, openAPI, params, cookies, headers);\n        if (filteredOpenAPI == null) {\n            return filteredOpenAPI;\n        }\n\n        OpenAPI clone = new OpenAPI();\n        clone.info(filteredOpenAPI.getInfo());\n        clone.openapi(filteredOpenAPI.getOpenapi());\n        clone.jsonSchemaDialect(filteredOpenAPI.getJsonSchemaDialect());\n        clone.setSpecVersion(filteredOpenAPI.getSpecVersion());\n        clone.setExtensions(filteredOpenAPI.getExtensions());\n        clone.setExternalDocs(filteredOpenAPI.getExternalDocs());\n        clone.setSecurity(filteredOpenAPI.getSecurity());\n        clone.setServers(filteredOpenAPI.getServers());\n        clone.tags(filteredOpenAPI.getTags() == null ? null : new ArrayList<>(openAPI.getTags()));\n\n        final Set<String> allowedTags = new HashSet<>();\n        final Set<String> filteredTags = new HashSet<>();\n\n        Paths clonedPaths = new Paths();\n        if (filteredOpenAPI.getPaths() != null) {\n            for (String resourcePath : filteredOpenAPI.getPaths().keySet()) {\n                PathItem pathItem = filteredOpenAPI.getPaths().get(resourcePath);\n\n                PathItem filteredPathItem = filterPathItem(filter, pathItem, resourcePath, params, cookies, headers);\n                PathItem clonedPathItem = cloneFilteredPathItem(filter,filteredPathItem, resourcePath, params, cookies, headers, allowedTags, filteredTags);\n\n                if (clonedPathItem != null) {\n                    if (!clonedPathItem.readOperations().isEmpty()) {\n                        clonedPaths.addPathItem(resourcePath, clonedPathItem);\n                    }\n                }\n            }\n            clone.paths(clonedPaths);\n        }\n\n        filteredTags.removeAll(allowedTags);\n\n        final List<Tag> tags = clone.getTags();\n        if (tags != null && !filteredTags.isEmpty()) {\n            tags.removeIf(tag -> filteredTags.contains(tag.getName()));\n            if (clone.getTags().isEmpty()) {\n                clone.setTags(null);\n            }\n        }\n\n        if (filteredOpenAPI.getWebhooks() != null) {\n            for (String resourcePath : filteredOpenAPI.getWebhooks().keySet()) {\n                PathItem pathItem = filteredOpenAPI.getWebhooks().get(resourcePath);\n\n                PathItem filteredPathItem = filterPathItem(filter, pathItem, resourcePath, params, cookies, headers);\n                PathItem clonedPathItem = cloneFilteredPathItem(filter,filteredPathItem, resourcePath, params, cookies, headers, allowedTags, filteredTags);\n\n                if (clonedPathItem != null) {\n                    if (!clonedPathItem.readOperations().isEmpty()) {\n                        clone.addWebhooks(resourcePath, clonedPathItem);\n                    }\n                }\n            }\n        }\n\n        if (filteredOpenAPI.getComponents() != null) {\n            clone.components(new Components());\n            clone.getComponents().setSchemas(filterComponentsSchema(filter, filteredOpenAPI.getComponents().getSchemas(), params, cookies, headers));\n            clone.getComponents().setSecuritySchemes(filteredOpenAPI.getComponents().getSecuritySchemes());\n            clone.getComponents().setCallbacks(filteredOpenAPI.getComponents().getCallbacks());\n            clone.getComponents().setExamples(filteredOpenAPI.getComponents().getExamples());\n            clone.getComponents().setExtensions(filteredOpenAPI.getComponents().getExtensions());\n            clone.getComponents().setHeaders(filteredOpenAPI.getComponents().getHeaders());\n            clone.getComponents().setLinks(filteredOpenAPI.getComponents().getLinks());\n            clone.getComponents().setParameters(filteredOpenAPI.getComponents().getParameters());\n            clone.getComponents().setRequestBodies(filteredOpenAPI.getComponents().getRequestBodies());\n            clone.getComponents().setResponses(filteredOpenAPI.getComponents().getResponses());\n            clone.getComponents().setPathItems(filteredOpenAPI.getComponents().getPathItems());\n        }\n\n        if (filter.isRemovingUnreferencedDefinitions()) {\n            clone = removeBrokenReferenceDefinitions(clone);\n        }\n\n        return clone;\n    }\n\n    protected OpenAPI filterOpenAPI(OpenAPISpecFilter filter, OpenAPI openAPI, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (openAPI != null) {\n            Optional<OpenAPI> filteredOpenAPI = filter.filterOpenAPI(openAPI, params, cookies, headers);\n            if (filteredOpenAPI.isPresent()) {\n                return filteredOpenAPI.get();\n            }\n        }\n        return null;\n    }\n\n    protected Operation filterOperation(OpenAPISpecFilter filter, Operation operation, String resourcePath, String key, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (operation != null) {\n            ApiDescription description = new ApiDescription(resourcePath, key);\n            Optional<Operation> filteredOperation = filter.filterOperation(operation, description, params, cookies, headers);\n            if (filteredOperation.isPresent()) {\n                List<Parameter> filteredParameters = new ArrayList<>();\n                Operation filteredOperationGet = filteredOperation.get();\n\n                Operation clone = new Operation();\n                clone.setCallbacks(filteredOperationGet.getCallbacks());\n                clone.setDeprecated(filteredOperationGet.getDeprecated());\n                clone.setDescription(filteredOperationGet.getDescription());\n                clone.setExtensions(filteredOperationGet.getExtensions());\n                clone.setExternalDocs(filteredOperationGet.getExternalDocs());\n                clone.setOperationId(filteredOperationGet.getOperationId());\n                clone.setSecurity(filteredOperationGet.getSecurity());\n                clone.setServers(filteredOperationGet.getServers());\n                clone.setSummary(filteredOperationGet.getSummary());\n                clone.setTags(filteredOperationGet.getTags());\n\n                List<Parameter> parameters = filteredOperationGet.getParameters();\n                if (parameters != null) {\n                    for (Parameter parameter : parameters) {\n                        Parameter filteredParameter = filterParameter(filter, operation, parameter, resourcePath, key, params, cookies, headers);\n                        if (filteredParameter != null) {\n                            filteredParameters.add(filteredParameter);\n                        }\n                    }\n                    clone.setParameters(filteredParameters);\n                }\n\n                RequestBody requestBody = filteredOperation.get().getRequestBody();\n                if (requestBody != null) {\n                    RequestBody filteredRequestBody = filterRequestBody(filter, operation, requestBody, resourcePath, key, params, cookies, headers);\n                    clone.setRequestBody(filteredRequestBody);\n\n                }\n\n                ApiResponses responses = filteredOperation.get().getResponses();\n                ApiResponses clonedResponses = responses;\n                if (responses != null) {\n                    responses.forEach((responseKey, response) -> {\n                        ApiResponse filteredResponse = filterResponse(filter, operation, response, resourcePath, key, params, cookies, headers);\n                        if (filteredResponse != null) {\n                            clonedResponses.addApiResponse(responseKey, filteredResponse);\n                        }\n                    });\n                    clone.setResponses(clonedResponses);\n                }\n\n                return clone;\n            }\n        }\n        return null;\n    }\n\n    protected PathItem filterPathItem(OpenAPISpecFilter filter, PathItem pathItem, String resourcePath, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        ApiDescription description = new ApiDescription(resourcePath, null);\n        Optional<PathItem> filteredPathItem = filter.filterPathItem(pathItem, description, params, cookies, headers);\n        if (filteredPathItem.isPresent()) {\n            return filteredPathItem.get();\n        }\n        return null;\n    }\n\n    protected Parameter filterParameter(OpenAPISpecFilter filter, Operation operation, Parameter parameter, String resourcePath, String key, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (parameter != null) {\n            ApiDescription description = new ApiDescription(resourcePath, key);\n            Optional<Parameter> filteredParameter = filter.filterParameter(parameter, operation, description, params, cookies, headers);\n            if (filteredParameter.isPresent()) {\n                return filteredParameter.get();\n            }\n        }\n        return null;\n\n    }\n\n    protected RequestBody filterRequestBody(OpenAPISpecFilter filter, Operation operation, RequestBody requestBody, String resourcePath, String key, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (requestBody != null) {\n            ApiDescription description = new ApiDescription(resourcePath, key);\n            Optional<RequestBody> filteredRequestBody = filter.filterRequestBody(requestBody, operation, description, params, cookies, headers);\n            if (filteredRequestBody.isPresent()) {\n                return filteredRequestBody.get();\n            }\n        }\n        return null;\n\n    }\n\n    protected ApiResponse filterResponse(OpenAPISpecFilter filter, Operation operation, ApiResponse response, String resourcePath, String key, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (response != null) {\n            ApiDescription description = new ApiDescription(resourcePath, key);\n            Optional<ApiResponse> filteredResponse = filter.filterResponse(response, operation, description, params, cookies, headers);\n            if (filteredResponse.isPresent()) {\n                return filteredResponse.get();\n            }\n        }\n        return null;\n\n    }\n\n    protected Map<String, Schema> filterComponentsSchema(OpenAPISpecFilter filter, Map<String, Schema> schemasMap, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (schemasMap == null) {\n            return null;\n        }\n        Map<String, Schema> clonedComponentsSchema = new LinkedHashMap<>();\n\n        for (Map.Entry<String, Schema> entry : schemasMap.entrySet()) {\n            String key = entry.getKey();\n            Schema definition = entry.getValue();\n            Optional<Schema> filteredDefinition = filter.filterSchema(definition, params, cookies, headers);\n            if (filteredDefinition.isPresent()) {\n                Map<String, Schema> clonedProperties = new LinkedHashMap<>();\n                if (filteredDefinition.get().getProperties() != null) {\n                    for (Object propName : filteredDefinition.get().getProperties().keySet()) {\n                        Schema property = (Schema) filteredDefinition.get().getProperties().get(propName);\n                        if (property != null) {\n                            Optional<Schema> filteredProperty = filter.filterSchemaProperty(property, definition, (String) propName, params, cookies, headers);\n                            if (filteredProperty.isPresent()) {\n                                clonedProperties.put((String) propName, filteredProperty.get());\n                            }\n                        }\n                    }\n                }\n\n                Map<String, Schema> clonedPatternProperties = new LinkedHashMap<>();\n                if (filteredDefinition.get().getPatternProperties() != null) {\n                    for (Object propName : filteredDefinition.get().getPatternProperties().keySet()) {\n                        Schema property = (Schema) filteredDefinition.get().getPatternProperties().get(propName);\n                        if (property != null) {\n                            Optional<Schema> filteredProperty = filter.filterSchemaProperty(property, definition, (String) propName, params, cookies, headers);\n                            if (filteredProperty.isPresent()) {\n                                clonedPatternProperties.put((String) propName, filteredProperty.get());\n                            }\n                        }\n                    }\n                }\n\n                try {\n                    // TODO solve this, and generally handle clone and passing references\n                    Schema clonedModel;\n                    if (filter.isOpenAPI31Filter())  {\n                        clonedModel = Json31.mapper().readValue(Json31.pretty(definition), Schema.class);\n                    } else {\n                        clonedModel = Json.mapper().readValue(Json.pretty(definition), Schema.class);\n                    }\n                    if (clonedModel.getProperties() != null) {\n                        clonedModel.getProperties().clear();\n                    }\n                    if (!clonedProperties.isEmpty()) {\n                        clonedModel.setProperties(clonedProperties);\n                    }\n                    if(clonedModel.getPatternProperties() != null) {\n                        clonedModel.getPatternProperties().clear();\n                    }\n                    if(!clonedPatternProperties.isEmpty()) {\n                        clonedModel.setPatternProperties(clonedPatternProperties);\n                    }\n                    clonedComponentsSchema.put(key, clonedModel);\n\n                } catch (IOException e) {\n                }\n            }\n        }\n        return clonedComponentsSchema;\n    }\n\n    private void addSchemaRef(Schema schema, Set<String> referencedDefinitions) {\n\n        if (schema == null) {\n            return;\n        }\n        if (!StringUtils.isBlank(schema.get$ref())) {\n            referencedDefinitions.add(schema.get$ref());\n            return;\n        }\n        if (schema.getDiscriminator() != null && schema.getDiscriminator().getMapping() != null) {\n            for (Map.Entry<String, String> mapping: schema.getDiscriminator().getMapping().entrySet()) {\n                referencedDefinitions.add(mapping.getValue());\n            }\n        }\n\n        if (schema.getProperties() != null) {\n            for (Object propName : schema.getProperties().keySet()) {\n                Schema property = (Schema) schema.getProperties().get(propName);\n                addSchemaRef(property, referencedDefinitions);\n            }\n        }\n\n        if (schema.getAdditionalProperties() instanceof Schema) {\n            addSchemaRef((Schema)schema.getAdditionalProperties(), referencedDefinitions);\n        }\n\n        if (schema.getPatternProperties() != null) {\n            for (Object propName : schema.getPatternProperties().keySet()) {\n                Schema property = (Schema) schema.getPatternProperties().get(propName);\n                addSchemaRef(property, referencedDefinitions);\n            }\n        }\n\n        if (schema.getPropertyNames() != null) {\n            addSchemaRef(schema.getPropertyNames(), referencedDefinitions);\n        }\n\n        if (schema instanceof ArraySchema &&\n                ((ArraySchema) schema).getItems() != null) {\n            addSchemaRef(((ArraySchema) schema).getItems(), referencedDefinitions);\n        } else if (schema.getTypes() != null && schema.getTypes().contains(\"array\") && schema.getItems() != null) {\n            addSchemaRef(schema.getItems(), referencedDefinitions);\n        } else {\n            List<Schema> allOf = schema.getAllOf();\n            List<Schema> anyOf = schema.getAnyOf();\n            List<Schema> oneOf = schema.getOneOf();\n\n            if (allOf != null) {\n                for (Schema ref : allOf) {\n                    addSchemaRef(ref, referencedDefinitions);\n                }\n            }\n            if (anyOf != null) {\n                for (Schema ref : anyOf) {\n                    addSchemaRef(ref, referencedDefinitions);\n                }\n            }\n            if (oneOf != null) {\n                for (Schema ref : oneOf) {\n                    addSchemaRef(ref, referencedDefinitions);\n                }\n            }\n        }\n    }\n\n    private void addContentSchemaRef(Content content, Set<String> referencedDefinitions) {\n        if (content != null) {\n            for (MediaType mediaType : content.values()) {\n                addSchemaRef(mediaType.getSchema(), referencedDefinitions);\n            }\n        }\n    }\n\n    private void addPathItemSchemaRef(PathItem pathItem, Set<String> referencedDefinitions) {\n        if (pathItem.getParameters() != null) {\n            for (Parameter parameter : pathItem.getParameters()) {\n                addSchemaRef(parameter.getSchema(), referencedDefinitions);\n                addContentSchemaRef(parameter.getContent(), referencedDefinitions);\n            }\n        }\n        Map<PathItem.HttpMethod, Operation> ops = pathItem.readOperationsMap();\n        for (Operation op : ops.values()) {\n            if (op.getRequestBody() != null) {\n                addRequestBodySchemaRef(op.getRequestBody(), referencedDefinitions);\n            }\n            if (op.getResponses() != null) {\n                for (String keyResponses : op.getResponses().keySet()) {\n                    ApiResponse response = op.getResponses().get(keyResponses);\n                    addApiResponseSchemaRef(response, referencedDefinitions);\n                }\n            }\n            if (op.getParameters() != null) {\n                for (Parameter parameter : op.getParameters()) {\n                    addParameterSchemaRef(parameter, referencedDefinitions);\n                }\n            }\n            if (op.getCallbacks() != null) {\n                for (String keyCallback : op.getCallbacks().keySet()) {\n                    Callback callback = op.getCallbacks().get(keyCallback);\n                    addCallbackSchemaRef(callback, referencedDefinitions);\n                }\n            }\n        }\n    }\n\n    private void addApiResponseSchemaRef(ApiResponse response, Set<String> referencedDefinitions) {\n        if (response.getHeaders() != null) {\n            for (String keyHeaders : response.getHeaders().keySet()) {\n                Header header = response.getHeaders().get(keyHeaders);\n                addHeaderSchemaRef(header, referencedDefinitions);\n            }\n        }\n        addContentSchemaRef(response.getContent(), referencedDefinitions);\n    }\n\n    private void addRequestBodySchemaRef(RequestBody requestBody, Set<String> referencedDefinitions) {\n            addContentSchemaRef(requestBody.getContent(), referencedDefinitions);\n    }\n\n    private void addParameterSchemaRef(Parameter parameter, Set<String> referencedDefinitions) {\n        addSchemaRef(parameter.getSchema(), referencedDefinitions);\n        addContentSchemaRef(parameter.getContent(), referencedDefinitions);\n    }\n\n    private void addHeaderSchemaRef(Header header, Set<String> referencedDefinitions) {\n        addSchemaRef(header.getSchema(), referencedDefinitions);\n        addContentSchemaRef(header.getContent(), referencedDefinitions);\n    }\n\n    private void addCallbackSchemaRef(Callback callback, Set<String> referencedDefinitions){\n        for (PathItem callbackPathItem : callback.values()) {\n            addPathItemSchemaRef(callbackPathItem, referencedDefinitions);\n        }\n    }\n\n    private void addComponentsSchemaRef(Components components, Set<String> referencedDefinitions){\n\n        if (components.getResponses() != null){\n            for (String resourcePath : components.getResponses().keySet()) {\n                ApiResponse apiResponse = components.getResponses().get(resourcePath);\n                addApiResponseSchemaRef(apiResponse, referencedDefinitions);\n            }\n        }\n        if (components.getRequestBodies() != null){\n            for (String requestBody : components.getRequestBodies().keySet()) {\n                RequestBody requestBody1 = components.getRequestBodies().get(requestBody);\n                addRequestBodySchemaRef(requestBody1, referencedDefinitions);\n            }\n        }\n        if (components.getParameters() != null){\n            for (String parameter : components.getParameters().keySet()) {\n                Parameter resourceParam = components.getParameters().get(parameter);\n                addParameterSchemaRef(resourceParam, referencedDefinitions);\n            }\n        }\n        if (components.getHeaders() != null){\n            for (String header : components.getHeaders().keySet()) {\n                Header resourceHeader = components.getHeaders().get(header);\n                addHeaderSchemaRef(resourceHeader, referencedDefinitions);\n            }\n        }\n        if (components.getCallbacks() != null){\n            for (String callback : components.getCallbacks().keySet()){\n                Callback resourceCallback = components.getCallbacks().get(callback);\n                addCallbackSchemaRef(resourceCallback, referencedDefinitions);\n            }\n        }\n        if (components.getPathItems() != null){\n            for (String resourcePath : components.getPathItems().keySet()){\n                PathItem pathItem = components.getPathItems().get(resourcePath);\n                addPathItemSchemaRef(pathItem, referencedDefinitions);\n            }\n        }\n    }\n\n    protected OpenAPI removeBrokenReferenceDefinitions(OpenAPI openApi) {\n\n        if (openApi == null || openApi.getComponents() == null || openApi.getComponents().getSchemas() == null) {\n            return openApi;\n        }\n        Set<String> referencedDefinitions = new TreeSet<>();\n\n        if (openApi.getPaths() != null) {\n            for (String resourcePath : openApi.getPaths().keySet()) {\n                PathItem pathItem = openApi.getPaths().get(resourcePath);\n                addPathItemSchemaRef(pathItem, referencedDefinitions);\n            }\n        }\n        if (openApi.getWebhooks() != null){\n            for (String resourcePath : openApi.getWebhooks().keySet()) {\n                PathItem pathItem = openApi.getWebhooks().get(resourcePath);\n                addPathItemSchemaRef(pathItem, referencedDefinitions);\n            }\n        }\n        if (openApi.getComponents() != null){\n            Components components = openApi.getComponents();\n            addComponentsSchemaRef(components, referencedDefinitions);\n        }\n\n        referencedDefinitions.addAll(resolveAllNestedRefs(referencedDefinitions, referencedDefinitions, openApi));\n        openApi.getComponents()\n                .getSchemas()\n                .keySet()\n                .retainAll(referencedDefinitions.stream()\n                        .map(s -> (String) RefUtils.extractSimpleName(s).getLeft())\n                        .collect(Collectors.toSet()));\n        return openApi;\n    }\n\n    protected Set<String> resolveAllNestedRefs(Set<String> refs, Set<String> accumulatedRefs, OpenAPI openApi) {\n        Set<String> justDiscoveredReferencedDefinitions = new TreeSet<>();\n        for (String ref : refs) {\n            locateReferencedDefinitions(ref, justDiscoveredReferencedDefinitions, openApi);\n        }\n        // Base case - no new references have been discovered. Halt discovery to avoid infinite loops\n        if (accumulatedRefs.containsAll(justDiscoveredReferencedDefinitions)) {\n            return Collections.emptySet();\n        } else {\n            // Remove all refs that have already been discovered.\n            justDiscoveredReferencedDefinitions.removeAll(accumulatedRefs);\n            accumulatedRefs.addAll(justDiscoveredReferencedDefinitions);\n            return resolveAllNestedRefs(justDiscoveredReferencedDefinitions, accumulatedRefs, openApi);\n        }\n    }\n\n    protected void locateReferencedDefinitions(String ref, Set<String> nestedReferencedDefinitions, OpenAPI openAPI) {\n        nestedReferencedDefinitions.add(ref);\n        String simpleName = (String) RefUtils.extractSimpleName(ref).getLeft();\n        Schema model = openAPI.getComponents().getSchemas().get(simpleName);\n        if (model != null) {\n            addSchemaRef(model, nestedReferencedDefinitions);\n        }\n    }\n\n    private PathItem cloneFilteredPathItem(OpenAPISpecFilter filter, PathItem filteredPathItem, String resourcePath, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers, Set<String> allowedTags, Set<String> filteredTags) {\n        if (filteredPathItem == null) {\n            return null;\n        }\n        PathItem clonedPathItem = new PathItem();\n        clonedPathItem.set$ref(filteredPathItem.get$ref());\n        clonedPathItem.setDescription(filteredPathItem.getDescription());\n        clonedPathItem.setSummary(filteredPathItem.getSummary());\n        clonedPathItem.setExtensions(filteredPathItem.getExtensions());\n        clonedPathItem.setParameters(filteredPathItem.getParameters());\n        clonedPathItem.setServers(filteredPathItem.getServers());\n\n        Map<PathItem.HttpMethod, Operation> ops = filteredPathItem.readOperationsMap();\n\n        for (Map.Entry<PathItem.HttpMethod, Operation> entry : ops.entrySet()) {\n            PathItem.HttpMethod key = entry.getKey();\n            Operation op = entry.getValue();\n            final List<String> opTagsBeforeFilter;\n            if (op.getTags() != null) {\n                opTagsBeforeFilter = new ArrayList<>(op.getTags());\n            } else {\n                opTagsBeforeFilter = new ArrayList<>();\n            }\n            op = filterOperation(filter, op, resourcePath, key.toString(), params, cookies, headers);\n            clonedPathItem.operation(key, op);\n            if (op == null) {\n                filteredTags.addAll(opTagsBeforeFilter);\n            } else {\n                if (op.getTags() != null) {\n                    opTagsBeforeFilter.removeAll(op.getTags());\n                    allowedTags.addAll(op.getTags());\n                }\n                filteredTags.addAll(opTagsBeforeFilter);\n            }\n        }\n        return clonedPathItem;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/AbstractModelConverter.java",
    "content": "package io.swagger.v3.core.jackson;\n\nimport com.fasterxml.jackson.core.Version;\nimport com.fasterxml.jackson.databind.AnnotationIntrospector;\nimport com.fasterxml.jackson.databind.BeanDescription;\nimport com.fasterxml.jackson.databind.JavaType;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.PropertyName;\nimport com.fasterxml.jackson.databind.jsontype.NamedType;\nimport com.fasterxml.jackson.databind.module.SimpleModule;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.core.converter.ModelConverterContext;\nimport io.swagger.v3.core.util.ReflectionUtils;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.Iterator;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.concurrent.ConcurrentHashMap;\n\npublic abstract class AbstractModelConverter implements ModelConverter {\n    protected final ObjectMapper _mapper;\n    protected final TypeNameResolver _typeNameResolver;\n    /**\n     * Minor optimization: no need to keep on resolving same types over and over\n     * again.\n     */\n    protected Map<JavaType, String> _resolvedTypeNames = new ConcurrentHashMap<>();\n\n    protected AbstractModelConverter(ObjectMapper mapper) {\n        this (mapper, TypeNameResolver.std);\n    }\n\n    protected AbstractModelConverter(ObjectMapper mapper, TypeNameResolver typeNameResolver) {\n        mapper.registerModule(\n                new SimpleModule(\"swagger\", Version.unknownVersion()) {\n                    @Override\n                    public void setupModule(SetupContext context) {\n                        context.insertAnnotationIntrospector(new SwaggerAnnotationIntrospector());\n                    }\n                });\n        _mapper = mapper;\n        _typeNameResolver = typeNameResolver;\n    }\n\n    @Override\n    public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator<ModelConverter> chain) {\n        if (chain.hasNext()) {\n            return chain.next().resolve(type, context, chain);\n        } else {\n            return null;\n        }\n    }\n\n    /**\n     * Retrieves the current AnnotationIntrospector from the ObjectMapper's serialization configuration.\n     * We do not cache the value of _intr because users can load jackson modules later,\n     * and we want to use their annotation inspection.\n     * \n     * @return the current AnnotationIntrospector\n     */\n    protected AnnotationIntrospector _intr() {\n        return _mapper.getSerializationConfig().getAnnotationIntrospector();\n    }\n\n    protected String _typeName(JavaType type) {\n        return _typeName(type, null);\n    }\n\n    protected String _typeName(JavaType type, BeanDescription beanDesc) {\n        String name = _resolvedTypeNames.get(type);\n        if (name != null) {\n            return name;\n        }\n        name = _findTypeName(type, beanDesc);\n        _resolvedTypeNames.put(type, name);\n        return name;\n    }\n\n    protected String _findTypeName(JavaType type, BeanDescription beanDesc) {\n        // First, handle container types; they require recursion\n        if (type.isArrayType()) {\n            return \"Array\";\n        }\n\n        if (type.isMapLikeType() && ReflectionUtils.isSystemType(type)) {\n            return \"Map\";\n        }\n\n        if (type.isContainerType() && ReflectionUtils.isSystemType(type)) {\n            if (Set.class.isAssignableFrom(type.getRawClass())) {\n                return \"Set\";\n            }\n            return \"List\";\n        }\n        if (beanDesc == null) {\n            beanDesc = _mapper.getSerializationConfig().introspectClassAnnotations(type);\n        }\n\n        PropertyName rootName = _intr().findRootName(beanDesc.getClassInfo());\n        if (rootName != null && rootName.hasSimpleName()) {\n            return rootName.getSimpleName();\n        }\n        return _typeNameResolver.nameForType(type);\n    }\n\n    protected String _typeQName(JavaType type) {\n        return type.getRawClass().getName();\n    }\n\n    protected String _subTypeName(NamedType type) {\n        return type.getType().getName();\n    }\n\n    protected boolean _isSetType(Class<?> cls) {\n        if (cls != null) {\n\n            if (java.util.Set.class.equals(cls)) {\n                return true;\n            } else {\n                for (Class<?> a : cls.getInterfaces()) {\n                    // this is dirty and ugly and needs to be extended into a scala model converter.  But to avoid bringing in scala runtime...\n                    if (java.util.Set.class.equals(a) || \"interface scala.collection.Set\".equals(a.toString())) {\n                        return true;\n                    }\n                }\n            }\n        }\n        return false;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/ApiResponsesSerializer.java",
    "content": "package io.swagger.v3.core.jackson;\n\nimport com.fasterxml.jackson.core.JsonGenerator;\nimport com.fasterxml.jackson.databind.JsonSerializer;\nimport com.fasterxml.jackson.databind.SerializerProvider;\n\nimport io.swagger.v3.oas.models.responses.ApiResponses;\n\nimport java.io.IOException;\nimport java.util.Map;\nimport java.util.Map.Entry;\n\npublic class ApiResponsesSerializer extends JsonSerializer<ApiResponses> {\n\n    @Override\n    public void serialize(\n            ApiResponses value, JsonGenerator jgen, SerializerProvider provider)\n            throws IOException {\n\n        if (value != null && value.getExtensions() != null && !value.getExtensions().isEmpty()) {\n            jgen.writeStartObject();\n\n            if (!value.isEmpty()) {\n                for (Entry<String, io.swagger.v3.oas.models.responses.ApiResponse> entry: value.entrySet()) {\n                    jgen.writeObjectField(entry.getKey() , entry.getValue());\n                }\n            }\n            for (Map.Entry<String, Object> entry: value.getExtensions().entrySet()) {\n                jgen.writeObjectField(entry.getKey(), entry.getValue());\n            }\n            jgen.writeEndObject();\n        } else {\n            provider.defaultSerializeValue(value, jgen);\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/CallbackSerializer.java",
    "content": "package io.swagger.v3.core.jackson;\n\nimport com.fasterxml.jackson.core.JsonGenerator;\nimport com.fasterxml.jackson.databind.JsonSerializer;\nimport com.fasterxml.jackson.databind.SerializerProvider;\n\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.callbacks.Callback;\nimport org.apache.commons.lang3.StringUtils;\n\nimport java.io.IOException;\nimport java.util.Map.Entry;\n\npublic class CallbackSerializer extends JsonSerializer<Callback> {\n\n    @Override\n    public void serialize(\n            Callback value, JsonGenerator jgen, SerializerProvider provider)\n            throws IOException {\n\n        // has extensions\n        if (value != null && value.getExtensions() != null && !value.getExtensions().isEmpty()) {\n            jgen.writeStartObject();\n\n            // not a ref\n            if (StringUtils.isBlank(value.get$ref())) {\n                if (!value.isEmpty()) {\n                    // write map\n                    for (Entry<String, PathItem> entry: value.entrySet()) {\n                        jgen.writeObjectField(entry.getKey() , entry.getValue());\n                    }\n                }\n            } else { // handle ref schema serialization skipping all other props ...\n                jgen.writeStringField(\"$ref\", value.get$ref());\n            }\n            for (String ext: value.getExtensions().keySet()) {\n                jgen.writeObjectField(ext , value.getExtensions().get(ext));\n            }\n            jgen.writeEndObject();\n        } else {\n            if (value == null || StringUtils.isBlank(value.get$ref())) {\n                provider.defaultSerializeValue(value, jgen);\n            } else { // handle ref schema serialization skipping all other props\n                jgen.writeStartObject();\n                jgen.writeStringField(\"$ref\", value.get$ref());\n                jgen.writeEndObject();\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/ExampleSerializer.java",
    "content": "package io.swagger.v3.core.jackson;\n\nimport com.fasterxml.jackson.core.JsonGenerator;\nimport com.fasterxml.jackson.databind.JsonMappingException;\nimport com.fasterxml.jackson.databind.JsonSerializer;\nimport com.fasterxml.jackson.databind.SerializerProvider;\nimport com.fasterxml.jackson.databind.ser.ResolvableSerializer;\nimport io.swagger.v3.oas.models.examples.Example;\n\nimport java.io.IOException;\n\npublic class ExampleSerializer extends JsonSerializer<Example> implements ResolvableSerializer {\n\n    private JsonSerializer<Object> defaultSerializer;\n\n    public ExampleSerializer(JsonSerializer<Object> serializer) {\n        defaultSerializer = serializer;\n    }\n\n    @Override\n    public void resolve(SerializerProvider serializerProvider) throws JsonMappingException {\n        if (defaultSerializer instanceof ResolvableSerializer) {\n            ((ResolvableSerializer) defaultSerializer).resolve(serializerProvider);\n        }\n    }\n\n    @Override\n    public void serialize(\n            Example example, JsonGenerator jgen, SerializerProvider provider)\n            throws IOException {\n\n            if (example.getValueSetFlag() && example.getValue() == null) {\n                jgen.writeStartObject();\n                defaultSerializer.unwrappingSerializer(null).serialize(example, jgen, provider);\n                jgen.writeNullField(\"value\");\n                jgen.writeEndObject();\n            } else {\n                defaultSerializer.serialize(example, jgen, provider);\n            }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/JAXBAnnotationsHelper.java",
    "content": "package io.swagger.v3.core.jackson;\n\nimport com.fasterxml.jackson.databind.introspect.Annotated;\nimport io.swagger.v3.core.util.AnnotationsUtils;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.MapSchema;\nimport io.swagger.v3.oas.models.media.ObjectSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.XML;\nimport org.apache.commons.lang3.StringUtils;\n\nimport javax.xml.bind.annotation.XmlAttribute;\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlElementWrapper;\nimport java.lang.annotation.Annotation;\n\n/**\n * The <code>JAXBAnnotationsHelper</code> class defines helper methods for\n * applying JAXB annotations to property definitions.\n */\nclass JAXBAnnotationsHelper {\n    public static final String JAXB_DEFAULT = \"##default\";\n\n    private JAXBAnnotationsHelper() {\n    }\n\n    /**\n     * Applies annotations to property's {@link XML} definition.\n     *\n     * @param member   annotations provider\n     * @param property property instance to be updated\n     */\n    public static void apply(Annotated member, Annotation[] annotations, Schema property) {\n\n        XmlElementWrapper wrapper = member.getAnnotation(XmlElementWrapper.class);\n        if (wrapper == null) {\n            wrapper = AnnotationsUtils.getAnnotation(XmlElementWrapper.class, annotations);\n        }\n        XmlAttribute attr = member.getAnnotation(XmlAttribute.class);\n        if (attr == null) {\n            attr = AnnotationsUtils.getAnnotation(XmlAttribute.class, annotations);\n        }\n        XmlElement elem = member.getAnnotation(XmlElement.class);\n        if (elem == null) {\n            elem = AnnotationsUtils.getAnnotation(XmlElement.class, annotations);\n        }\n\n        if (wrapper != null) {\n            applyElement(wrapper, property);\n        } else if (elem != null) {\n            applyElement(elem, property);\n        } else if (attr != null && isAttributeAllowed(property)) {\n            applyAttribute(attr, property);\n        }\n    }\n\n    /**\n     * Puts definitions for XML wrapper.\n     *\n     * @param wrapper   XmlElementWrapper\n     * @param property property instance to be updated\n     */\n    private static void applyElement(XmlElementWrapper wrapper, Schema property) {\n        if (wrapper != null) {\n            final XML xml = getXml(property);\n            xml.setWrapped(true);\n            // No need to set the xml name if the name provided by xmlelementwrapper annotation is ##default or equal to the property name | https://github.com/swagger-api/swagger-core/pull/2050\n            if (!JAXB_DEFAULT.equals(wrapper.name()) && !wrapper.name().isEmpty() && !wrapper.name().equals(property.getName())) {\n                xml.setName(wrapper.name());\n            }\n        }\n    }\n\n    /**\n     * Puts definitions for XML element.\n     *\n     * @param element   XmlElement\n     * @param property property instance to be updated\n     */\n    private static void applyElement(XmlElement element, Schema property) {\n        if (element != null) {\n            setName(element.namespace(), element.name(), property);\n        }\n    }\n\n    /**\n     * Puts definitions for XML attribute.\n     *\n     * @param attribute   XmlAttribute\n     * @param property property instance to be updated\n     */\n    private static void applyAttribute(XmlAttribute attribute, Schema property) {\n        if (attribute != null) {\n            final XML xml = getXml(property);\n            xml.setAttribute(true);\n            setName(attribute.namespace(), attribute.name(), property);\n        }\n    }\n\n    private static XML getXml(Schema property) {\n        final XML existing = property.getXml();\n        if (existing != null) {\n            return existing;\n        }\n        final XML created = new XML();\n        property.setXml(created);\n        return created;\n    }\n\n    /**\n     * Puts name space and name for XML node or attribute.\n     *\n     * @param ns       name space\n     * @param name     name\n     * @param property property instance to be updated\n     * @return <code>true</code> if name space and name have been set\n     */\n    private static boolean setName(String ns, String name, Schema property) {\n        boolean apply = false;\n        final String cleanName = StringUtils.trimToNull(name);\n        final String useName;\n        if (!isEmpty(cleanName) && !cleanName.equals(property.getName())) {\n            useName = cleanName;\n            apply = true;\n        } else {\n            useName = null;\n        }\n        final String cleanNS = StringUtils.trimToNull(ns);\n        final String useNS;\n        if (!isEmpty(cleanNS)) {\n            useNS = cleanNS;\n            apply = true;\n        } else {\n            useNS = null;\n        }\n        // Set everything or nothing\n        if (apply) {\n            getXml(property).name(useName).namespace(useNS);\n        }\n        return apply;\n    }\n\n    /**\n     * Checks whether the passed property can be represented as node attribute.\n     *\n     * @param property property instance to be checked\n     * @return <code>true</code> if the passed property can be represented as\n     * node attribute\n     */\n    private static boolean isAttributeAllowed(Schema property) {\n        for (Class<?> item : new Class<?>[]{ArraySchema.class, MapSchema.class, ObjectSchema.class}) {\n            if (item.isInstance(property)) {\n                return false;\n            }\n        }\n        return StringUtils.isBlank(property.get$ref());\n    }\n\n    private static boolean isEmpty(String name) {\n        return StringUtils.isEmpty(name) || JAXB_DEFAULT.equals(name);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/MediaTypeSerializer.java",
    "content": "package io.swagger.v3.core.jackson;\n\nimport com.fasterxml.jackson.core.JsonGenerator;\nimport com.fasterxml.jackson.databind.JsonMappingException;\nimport com.fasterxml.jackson.databind.JsonSerializer;\nimport com.fasterxml.jackson.databind.SerializerProvider;\nimport com.fasterxml.jackson.databind.ser.ResolvableSerializer;\nimport io.swagger.v3.oas.models.media.MediaType;\n\nimport java.io.IOException;\n\npublic class MediaTypeSerializer extends JsonSerializer<MediaType> implements ResolvableSerializer {\n\n    private JsonSerializer<Object> defaultSerializer;\n\n    public MediaTypeSerializer(JsonSerializer<Object> serializer) {\n        defaultSerializer = serializer;\n    }\n\n    @Override\n    public void resolve(SerializerProvider serializerProvider) throws JsonMappingException {\n        if (defaultSerializer instanceof ResolvableSerializer) {\n            ((ResolvableSerializer) defaultSerializer).resolve(serializerProvider);\n        }\n    }\n\n    @Override\n    public void serialize(\n            MediaType value, JsonGenerator jgen, SerializerProvider provider)\n            throws IOException {\n\n        if (value.getExampleSetFlag() && value.getExample() == null) {\n            jgen.writeStartObject();\n            defaultSerializer.unwrappingSerializer(null).serialize(value, jgen, provider);\n            jgen.writeNullField(\"example\");\n            jgen.writeEndObject();\n        } else {\n            defaultSerializer.serialize(value, jgen, provider);\n        }\n    }\n}\n\n\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/ModelResolver.java",
    "content": "package io.swagger.v3.core.jackson;\n\nimport com.fasterxml.jackson.annotation.JsonIdentityInfo;\nimport com.fasterxml.jackson.annotation.JsonIdentityReference;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport com.fasterxml.jackson.annotation.JsonTypeName;\nimport com.fasterxml.jackson.annotation.JsonUnwrapped;\nimport com.fasterxml.jackson.annotation.JsonValue;\nimport com.fasterxml.jackson.annotation.JsonView;\nimport com.fasterxml.jackson.annotation.ObjectIdGenerator;\nimport com.fasterxml.jackson.annotation.ObjectIdGenerators;\nimport com.fasterxml.jackson.databind.AnnotationIntrospector;\nimport com.fasterxml.jackson.databind.BeanDescription;\nimport com.fasterxml.jackson.databind.JavaType;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.PropertyMetadata;\nimport com.fasterxml.jackson.databind.SerializationFeature;\nimport com.fasterxml.jackson.databind.annotation.JsonSerialize;\nimport com.fasterxml.jackson.databind.introspect.Annotated;\nimport com.fasterxml.jackson.databind.introspect.AnnotatedClass;\nimport com.fasterxml.jackson.databind.introspect.AnnotatedField;\nimport com.fasterxml.jackson.databind.introspect.AnnotatedMember;\nimport com.fasterxml.jackson.databind.introspect.AnnotatedMethod;\nimport com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition;\nimport com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder;\nimport com.fasterxml.jackson.databind.jsontype.NamedType;\nimport com.fasterxml.jackson.databind.util.Annotations;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.core.converter.ModelConverterContext;\nimport io.swagger.v3.core.util.*;\nimport io.swagger.v3.oas.annotations.Hidden;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.StringToClassMapItem;\nimport io.swagger.v3.oas.annotations.media.DependentRequired;\nimport io.swagger.v3.oas.annotations.media.DependentSchema;\nimport io.swagger.v3.oas.annotations.media.DependentSchemas;\nimport io.swagger.v3.oas.annotations.media.DiscriminatorMapping;\nimport io.swagger.v3.oas.annotations.media.PatternProperties;\nimport io.swagger.v3.oas.annotations.media.PatternProperty;\nimport io.swagger.v3.oas.annotations.media.SchemaProperties;\nimport io.swagger.v3.oas.annotations.media.SchemaProperty;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.ExternalDocumentation;\nimport io.swagger.v3.oas.models.SpecVersion;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.ComposedSchema;\nimport io.swagger.v3.oas.models.media.Discriminator;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.JsonSchema;\nimport io.swagger.v3.oas.models.media.MapSchema;\nimport io.swagger.v3.oas.models.media.ObjectSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport io.swagger.v3.oas.models.media.UUIDSchema;\nimport io.swagger.v3.oas.models.media.XML;\nimport javax.validation.constraints.Email;\nimport org.apache.commons.lang3.StringUtils;\nimport org.apache.commons.lang3.math.NumberUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport javax.validation.constraints.DecimalMax;\nimport javax.validation.constraints.DecimalMin;\nimport javax.validation.constraints.Max;\nimport javax.validation.constraints.Min;\nimport javax.validation.constraints.NotBlank;\nimport javax.validation.constraints.NotEmpty;\nimport javax.validation.constraints.NotNull;\nimport javax.validation.constraints.Pattern;\nimport javax.validation.constraints.Size;\nimport javax.xml.bind.annotation.XmlAccessType;\nimport javax.xml.bind.annotation.XmlAccessorType;\nimport javax.xml.bind.annotation.XmlAttribute;\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlElementRef;\nimport javax.xml.bind.annotation.XmlElementRefs;\nimport javax.xml.bind.annotation.XmlRootElement;\nimport javax.xml.bind.annotation.XmlSchema;\nimport java.io.IOException;\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.AnnotatedParameterizedType;\nimport java.lang.reflect.Field;\nimport java.lang.reflect.InvocationTargetException;\nimport java.lang.reflect.Method;\nimport java.lang.reflect.Type;\nimport java.math.BigDecimal;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Iterator;\nimport java.util.LinkedHashMap;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.Set;\nimport java.util.Objects;\nimport java.util.stream.Collectors;\nimport java.util.stream.Stream;\n\nimport static io.swagger.v3.core.jackson.JAXBAnnotationsHelper.JAXB_DEFAULT;\nimport static io.swagger.v3.core.util.RefUtils.constructRef;\nimport static io.swagger.v3.core.util.SiblingAnnotationFilter.filterSiblingAnnotations;\nimport static io.swagger.v3.core.util.ValidationAnnotationsUtils.*;\nimport static io.swagger.v3.oas.annotations.media.Schema.DEFAULT_SENTINEL;\n\npublic class ModelResolver extends AbstractModelConverter implements ModelConverter {\n\n    Logger LOGGER = LoggerFactory.getLogger(ModelResolver.class);\n    public static List<String> NOT_NULL_ANNOTATIONS = Arrays.asList(\"NotNull\", \"NonNull\", \"NotBlank\", \"NotEmpty\");\n    public static List<String> NULLABLE_ANNOTATIONS = Arrays.asList(\"Nullable\");\n\n    public static final String SET_PROPERTY_OF_COMPOSED_MODEL_AS_SIBLING = \"composed-model-properties-as-sibiling\";\n    public static final String SET_PROPERTY_OF_ENUMS_AS_REF = \"enums-as-ref\";\n\n    public static boolean composedModelPropertiesAsSibling = System.getProperty(SET_PROPERTY_OF_COMPOSED_MODEL_AS_SIBLING) != null;\n\n    private static final int SCHEMA_COMPONENT_PREFIX = \"#/components/schemas/\".length();\n\n    /**\n     * Allows all enums to be resolved as a reference to a scheme added to the components section.\n     */\n    public static boolean enumsAsRef = System.getProperty(SET_PROPERTY_OF_ENUMS_AS_REF) != null;\n\n    private boolean openapi31;\n\n    private Schema.SchemaResolution schemaResolution = Schema.SchemaResolution.DEFAULT;\n\n    protected Configuration configuration = new Configuration();\n\n    protected ValidatorProcessor validatorProcessor;\n\n    protected Set<AnnotatedType> typesBeingResolved = new HashSet<>();\n\n    public ModelResolver(ObjectMapper mapper) {\n        super(mapper);\n    }\n    public ModelResolver(ObjectMapper mapper, TypeNameResolver typeNameResolver) {\n        super(mapper, typeNameResolver);\n    }\n\n    public ObjectMapper objectMapper() {\n        return _mapper;\n    }\n\n    @Override\n    public Schema resolve(AnnotatedType annotatedType, ModelConverterContext context, Iterator<ModelConverter> next) {\n        boolean implicitObject = false;\n        boolean isPrimitive = false;\n        Schema model = null;\n        List<String> requiredProps = new ArrayList<>();\n\n        if (annotatedType == null) {\n            return null;\n        }\n        if (this.shouldIgnoreClass(annotatedType.getType())) {\n            return null;\n        }\n\n        final JavaType type;\n        if (annotatedType.getType() instanceof JavaType) {\n            type = (JavaType) annotatedType.getType();\n        } else {\n            type = _mapper.constructType(annotatedType.getType());\n        }\n\n        final Annotation resolvedSchemaOrArrayAnnotation = AnnotationsUtils.mergeSchemaAnnotations(annotatedType.getCtxAnnotations(), type);\n        final io.swagger.v3.oas.annotations.media.Schema resolvedSchemaAnnotation =\n                resolvedSchemaOrArrayAnnotation == null ?\n                        null :\n                        resolvedSchemaOrArrayAnnotation instanceof io.swagger.v3.oas.annotations.media.ArraySchema ?\n                                ((io.swagger.v3.oas.annotations.media.ArraySchema) resolvedSchemaOrArrayAnnotation).schema() :\n                                (io.swagger.v3.oas.annotations.media.Schema) resolvedSchemaOrArrayAnnotation;\n\n        final io.swagger.v3.oas.annotations.media.ArraySchema resolvedArrayAnnotation =\n                resolvedSchemaOrArrayAnnotation == null ?\n                        null :\n                        resolvedSchemaOrArrayAnnotation instanceof io.swagger.v3.oas.annotations.media.ArraySchema ?\n                                (io.swagger.v3.oas.annotations.media.ArraySchema) resolvedSchemaOrArrayAnnotation :\n                                null;\n\n        final BeanDescription beanDesc;\n        {\n            BeanDescription recurBeanDesc = _mapper.getSerializationConfig().introspect(type);\n\n            HashSet<String> visited = new HashSet<>();\n            JsonSerialize jsonSerialize = recurBeanDesc.getClassAnnotations().get(JsonSerialize.class);\n            while (jsonSerialize != null && !Void.class.equals(jsonSerialize.as())) {\n                String asName = jsonSerialize.as().getName();\n                if (visited.contains(asName)) break;\n                visited.add(asName);\n\n                recurBeanDesc = _mapper.getSerializationConfig().introspect(\n                        _mapper.constructType(jsonSerialize.as())\n                );\n                jsonSerialize = recurBeanDesc.getClassAnnotations().get(JsonSerialize.class);\n            }\n            beanDesc = recurBeanDesc;\n        }\n\n\n        String name = annotatedType.getName();\n        if (StringUtils.isBlank(name)) {\n            // allow override of name from annotation\n            if (!annotatedType.isSkipSchemaName() && resolvedSchemaAnnotation != null && !resolvedSchemaAnnotation.name().isEmpty()) {\n                name = resolvedSchemaAnnotation.name();\n            }\n            if (StringUtils.isBlank(name) && (type.isEnumType() || !ReflectionUtils.isSystemType(type))) {\n                name = _typeName(type, beanDesc);\n            }\n        }\n\n        name = decorateModelName(annotatedType, name);\n\n        // if we have a ref, for OAS 3.0 we don't consider anything else, while for OAS 3.1 we store the ref and add it later\n        String schemaRefFromAnnotation = null;\n        if (resolvedSchemaAnnotation != null &&\n                StringUtils.isNotEmpty(resolvedSchemaAnnotation.ref())) {\n            if (resolvedArrayAnnotation == null) {\n                schemaRefFromAnnotation = resolvedSchemaAnnotation.ref();\n                if (!openapi31) {\n                    return new Schema().$ref(resolvedSchemaAnnotation.ref()).name(name);\n                }\n            } else {\n                ArraySchema schema = new ArraySchema();\n                if (openapi31) {\n                    schema.specVersion(SpecVersion.V31);\n                }\n                resolveArraySchema(annotatedType, schema, resolvedArrayAnnotation);\n                Schema itemsSchema = openapi31 ? new JsonSchema() : new Schema();\n                return schema.items(itemsSchema.$ref(resolvedSchemaAnnotation.ref()).name(name));\n            }\n        }\n\n        if (!annotatedType.isSkipOverride() && resolvedSchemaAnnotation != null && !Void.class.equals(resolvedSchemaAnnotation.implementation())) {\n            Class<?> cls = resolvedSchemaAnnotation.implementation();\n\n            LOGGER.debug(\"overriding datatype from {} to {}\", type, cls.getName());\n\n            Annotation[] ctxAnnotation = null;\n            if (resolvedArrayAnnotation != null && annotatedType.getCtxAnnotations() != null) {\n                List<Annotation> annList = new ArrayList<>();\n                for (Annotation a: annotatedType.getCtxAnnotations()) {\n                    if (!(a instanceof ArraySchema)) {\n                        annList.add(a);\n                    }\n                }\n                annList.add(resolvedSchemaAnnotation);\n                ctxAnnotation = annList.toArray(new Annotation[annList.size()]);\n            } else {\n                ctxAnnotation = annotatedType.getCtxAnnotations();\n            }\n\n            AnnotatedType aType = new AnnotatedType()\n                    .type(cls)\n                    .ctxAnnotations(ctxAnnotation)\n                    .parent(annotatedType.getParent())\n                    .name(annotatedType.getName())\n                    .resolveAsRef(annotatedType.isResolveAsRef())\n                    .jsonViewAnnotation(annotatedType.getJsonViewAnnotation())\n                    .propertyName(annotatedType.getPropertyName())\n                    .components(annotatedType.getComponents())\n                    .skipOverride(true);\n            if (resolvedArrayAnnotation != null) {\n                ArraySchema schema = new ArraySchema();\n                if (openapi31) {\n                    schema.specVersion(SpecVersion.V31);\n                }\n                resolveArraySchema(annotatedType, schema, resolvedArrayAnnotation);\n                Schema innerSchema = null;\n\n                Schema primitive = PrimitiveType.createProperty(cls, openapi31);\n                if (primitive != null) {\n                    innerSchema = primitive;\n                } else {\n                    innerSchema = context.resolve(aType);\n                    if (innerSchema != null && isObjectSchema(innerSchema) && StringUtils.isNotBlank(innerSchema.getName())) {\n                        // create a reference for the items\n                        if (context.getDefinedModels().containsKey(innerSchema.getName())) {\n                            String ref = constructRef(innerSchema.getName());\n                            innerSchema = openapi31 ? new JsonSchema() : new Schema();\n                            innerSchema.$ref(ref);\n                        }\n                    } else if (innerSchema != null && innerSchema.get$ref() != null) {\n                        String ref = StringUtils.isNotEmpty(innerSchema.get$ref()) ? innerSchema.get$ref() : innerSchema.getName();\n                        innerSchema = openapi31 ? new JsonSchema() : new Schema();\n                        innerSchema.$ref(ref);\n                    }\n                }\n                schema.setItems(innerSchema);\n                return schema;\n            } else {\n                Schema implSchema = context.resolve(aType);\n                if (implSchema != null && aType.isResolveAsRef() && isObjectSchema(implSchema) && StringUtils.isNotBlank(implSchema.getName())) {\n                    // create a reference for the items\n                    if (context.getDefinedModels().containsKey(implSchema.getName())) {\n                        String ref = constructRef(implSchema.getName());\n                        implSchema = openapi31 ? new JsonSchema() : new Schema();\n                        implSchema.$ref(ref);\n                    }\n                } else if (implSchema != null && implSchema.get$ref() != null) {\n                    String ref = StringUtils.isNotEmpty(implSchema.get$ref()) ? implSchema.get$ref() : implSchema.getName();\n                    implSchema = openapi31 ? new JsonSchema() : new Schema();\n                    implSchema.$ref(ref);\n                }\n                return implSchema;\n            }\n        }\n\n        if (model == null && !annotatedType.isSkipOverride() && resolvedSchemaAnnotation != null &&\n                StringUtils.isNotEmpty(resolvedSchemaAnnotation.type()) &&\n                !resolvedSchemaAnnotation.type().equals(\"object\")) {\n            PrimitiveType primitiveType = PrimitiveType.fromTypeAndFormat(resolvedSchemaAnnotation.type(), resolvedSchemaAnnotation.format());\n            if (primitiveType == null) {\n                primitiveType = PrimitiveType.fromType(type);\n            }\n            if (primitiveType == null) {\n                primitiveType = PrimitiveType.fromName(resolvedSchemaAnnotation.type());\n            }\n            if (primitiveType != null) {\n                Schema primitive = openapi31 ? primitiveType.createProperty31() : primitiveType.createProperty();\n                model = primitive;\n                isPrimitive = true;\n\n            }\n        }\n\n        if (model == null && type.isEnumType()) {\n            @SuppressWarnings(\"unchecked\")\n            Class<Enum<?>> rawEnumClass = (Class<Enum<?>>) type.getRawClass();\n            model = _createSchemaForEnum(rawEnumClass);\n            isPrimitive = true;\n        }\n        if (model == null) {\n            if (resolvedSchemaAnnotation != null && StringUtils.isEmpty(resolvedSchemaAnnotation.type())) {\n                PrimitiveType primitiveType = PrimitiveType.fromTypeAndFormat(type, resolvedSchemaAnnotation.format());\n                if (primitiveType != null) {\n                    model = openapi31 ? primitiveType.createProperty31() : primitiveType.createProperty();\n                    isPrimitive = true;\n                }\n            }\n\n            if (model == null) {\n                PrimitiveType primitiveType = PrimitiveType.fromType(type);\n                if (primitiveType != null) {\n                    model = openapi31 ? primitiveType.createProperty31() : primitiveType.createProperty();\n                    isPrimitive = true;\n                }\n            }\n        }\n\n        if (!annotatedType.isSkipJsonIdentity()) {\n            JsonIdentityInfo jsonIdentityInfo = AnnotationsUtils.getAnnotation(JsonIdentityInfo.class, annotatedType.getCtxAnnotations());\n            if (jsonIdentityInfo == null) {\n                jsonIdentityInfo = type.getRawClass().getAnnotation(JsonIdentityInfo.class);\n            }\n            if (model == null && jsonIdentityInfo != null) {\n                JsonIdentityReference jsonIdentityReference = AnnotationsUtils.getAnnotation(JsonIdentityReference.class, annotatedType.getCtxAnnotations());\n                if (jsonIdentityReference == null) {\n                    jsonIdentityReference = type.getRawClass().getAnnotation(JsonIdentityReference.class);\n                }\n                model = new GeneratorWrapper().processJsonIdentity(annotatedType, context, _mapper, jsonIdentityInfo, jsonIdentityReference);\n                if (model != null) {\n                    return model;\n                }\n            }\n        }\n\n        if (model == null && annotatedType.getJsonUnwrappedHandler() != null) {\n            model = annotatedType.getJsonUnwrappedHandler().apply(annotatedType);\n            if (model == null) {\n                return null;\n            }\n        }\n\n        if (\"Object\".equals(name)) {\n            Schema schema = openapi31 ? new JsonSchema() : new Schema();\n            if (schemaRefFromAnnotation != null) {\n                schema.raw$ref(schemaRefFromAnnotation);\n            }\n            return schema;\n        }\n\n        List<Class<?>> composedSchemaReferencedClasses = getComposedSchemaReferencedClasses(type.getRawClass(), annotatedType.getCtxAnnotations(), resolvedSchemaAnnotation);\n        boolean hasCompositionKeywords = composedSchemaReferencedClasses != null;\n\n        if (isPrimitive) {\n            XML xml = resolveXml(beanDesc.getClassInfo(), annotatedType.getCtxAnnotations(), resolvedSchemaAnnotation);\n            if (xml != null) {\n                model.xml(xml);\n            }\n            if (!type.isEnumType()){\n                applyBeanValidatorAnnotations(model, annotatedType.getCtxAnnotations(), null, false);\n            }\n            resolveSchemaMembers(model, annotatedType, context, next);\n            if (resolvedArrayAnnotation != null) {\n                ArraySchema schema = new ArraySchema();\n                if (openapi31) {\n                    schema.specVersion(SpecVersion.V31);\n                }\n                resolveArraySchema(annotatedType, schema, resolvedArrayAnnotation);\n                schema.setItems(model);\n                return schema;\n            }\n            if (type.isEnumType() && shouldResolveEnumAsRef(resolvedSchemaAnnotation, annotatedType.isResolveEnumAsRef())) {\n                // Store off the ref and add the enum as a top-level model\n                context.defineModel(name, model, annotatedType, null);\n                // Return the model as a ref only property\n                model = openapi31 ? new JsonSchema() : new Schema();\n                model.$ref(Components.COMPONENTS_SCHEMAS_REF + name);\n            }\n            if (!hasCompositionKeywords) {\n                if (schemaRefFromAnnotation != null && model != null) {\n                    model.raw$ref(schemaRefFromAnnotation);\n                }\n                return model;\n            }\n        }\n\n        /**\n         * --Preventing parent/child hierarchy creation loops - Comment 1--\n         * Creating a parent model will result in the creation of child models. Creating a child model will result in\n         * the creation of a parent model, as per the second If statement following this comment.\n         *\n         * By checking whether a model has already been resolved (as implemented below), loops of parents creating\n         * children and children creating parents can be short-circuited. This works because currently the\n         * ModelConverterContextImpl will return null for a class that already been processed, but has not yet been\n         * defined. This logic works in conjunction with the early immediate definition of model in the context\n         * implemented later in this method (See \"Preventing parent/child hierarchy creation loops - Comment 2\") to\n         * prevent such\n         */\n        Schema resolvedModel = context.resolve(annotatedType);\n        if (resolvedModel != null) {\n            if (name != null && name.equals(resolvedModel.getName())) {\n                return resolvedModel;\n            }\n        }\n\n        Type jsonValueType = findJsonValueType(beanDesc);\n\n        if(jsonValueType != null) {\n            AnnotatedType aType = new AnnotatedType()\n                    .type(jsonValueType)\n                    .parent(annotatedType.getParent())\n                    .name(annotatedType.getName())\n                    .schemaProperty(annotatedType.isSchemaProperty())\n                    .resolveAsRef(annotatedType.isResolveAsRef())\n                    .jsonViewAnnotation(annotatedType.getJsonViewAnnotation())\n                    .propertyName(annotatedType.getPropertyName())\n                    .ctxAnnotations(annotatedType.getCtxAnnotations())\n                    .components(annotatedType.getComponents())\n                    .skipOverride(true);\n            return context.resolve(aType);\n        }\n\n        boolean isStreamWithArrayAnnotation = resolvedArrayAnnotation != null && isStreamType(type);\n\n        if (type.isContainerType()) {\n            // TODO currently a MapSchema or ArraySchema don't also support composed schema props (oneOf,..)\n            hasCompositionKeywords = false;\n            JavaType keyType = type.getKeyType();\n            JavaType valueType = type.getContentType();\n            String pName = null;\n            if (valueType != null) {\n                BeanDescription valueTypeBeanDesc = _mapper.getSerializationConfig().introspect(valueType);\n                pName = _typeName(valueType, valueTypeBeanDesc);\n            }\n            List<Annotation> strippedCtxAnnotations = new ArrayList<>();\n            if (resolvedSchemaAnnotation != null) {\n                strippedCtxAnnotations.add(0, resolvedSchemaAnnotation);\n            }\n            if (annotatedType.getCtxAnnotations() != null) {\n                strippedCtxAnnotations.addAll(Arrays.stream(\n                        annotatedType.getCtxAnnotations()).filter(\n                        ass -> !ass.annotationType().getName().startsWith(\"io.swagger\") && !ass.annotationType().getName().startsWith(\"javax.validation.constraints\")\n                ).collect(Collectors.toList()));\n            }\n\n            Schema.SchemaResolution containerResolvedSchemaResolution = AnnotationsUtils.resolveSchemaResolution(this.schemaResolution, resolvedSchemaAnnotation);\n            if (keyType != null && valueType != null) {\n                if (ReflectionUtils.isSystemTypeNotArray(type) && !annotatedType.isSchemaProperty() && !annotatedType.isResolveAsRef()) {\n                    context.resolve(new AnnotatedType().components(annotatedType.getComponents()).type(valueType).jsonViewAnnotation(annotatedType.getJsonViewAnnotation()));\n                    return null;\n                }\n                Schema addPropertiesSchema = context.resolve(\n                        new AnnotatedType()\n                                .type(valueType)\n                                .schemaProperty(annotatedType.isSchemaProperty())\n                                .ctxAnnotations(strippedCtxAnnotations.toArray(new Annotation[0]))\n                                .skipSchemaName(true)\n                                .resolveAsRef(annotatedType.isResolveAsRef())\n                                .jsonViewAnnotation(annotatedType.getJsonViewAnnotation())\n                                .propertyName(annotatedType.getPropertyName())\n                                .components(annotatedType.getComponents())\n                                .parent(annotatedType.getParent()));\n                if (addPropertiesSchema != null) {\n                    if (StringUtils.isNotBlank(addPropertiesSchema.getName())) {\n                        pName = addPropertiesSchema.getName();\n                    }\n                    if (isObjectSchema(addPropertiesSchema) && pName != null) {\n                        if (context.getDefinedModels().containsKey(pName)) {\n                            if (Schema.SchemaResolution.INLINE.equals(containerResolvedSchemaResolution) && applySchemaResolution()) {\n                                addPropertiesSchema = context.getDefinedModels().get(pName);\n                            } else {\n                                // create a reference for the items\n                                addPropertiesSchema = openapi31 ? new JsonSchema() : new Schema();\n                                addPropertiesSchema.$ref(constructRef(pName));\n                            }\n                        }\n                    } else if (addPropertiesSchema.get$ref() != null) {\n                        String ref = StringUtils.isNotEmpty(addPropertiesSchema.get$ref()) ? addPropertiesSchema.get$ref() : addPropertiesSchema.getName();\n                        addPropertiesSchema = openapi31 ? new JsonSchema() : new Schema();\n                        addPropertiesSchema.$ref(ref);\n                    }\n                }\n                Schema mapModel = new MapSchema().additionalProperties(addPropertiesSchema);\n                if (openapi31) {\n                    mapModel.specVersion(SpecVersion.V31);\n                }\n                mapModel.name(name);\n                model = mapModel;\n            } else if (valueType != null) {\n                if (!isStreamWithArrayAnnotation && ReflectionUtils.isSystemTypeNotArray(type) && !annotatedType.isSchemaProperty() && !annotatedType.isResolveAsRef()) {\n                    context.resolve(new AnnotatedType().components(annotatedType.getComponents()).type(valueType).jsonViewAnnotation(annotatedType.getJsonViewAnnotation()));\n                    return null;\n                }\n                Schema items = context.resolve(new AnnotatedType()\n                        .type(valueType)\n                        .schemaProperty(annotatedType.isSchemaProperty())\n                        .ctxAnnotations(strippedCtxAnnotations.toArray(new Annotation[0]))\n                        .skipSchemaName(true)\n                        .resolveAsRef(annotatedType.isResolveAsRef())\n                        .propertyName(annotatedType.getPropertyName())\n                        .jsonViewAnnotation(annotatedType.getJsonViewAnnotation())\n                        .components(annotatedType.getComponents())\n                        .resolveEnumAsRef(annotatedType.isResolveEnumAsRef())\n                        .parent(annotatedType.getParent()));\n\n                if (items == null) {\n                    return null;\n                }\n                if (annotatedType.isSchemaProperty() && annotatedType.getCtxAnnotations() != null && annotatedType.getCtxAnnotations().length > 0) {\n                    if (!\"object\".equals(items.getType())) {\n                        for (Annotation annotation : annotatedType.getCtxAnnotations()) {\n                            if (annotation instanceof XmlElement) {\n                                XmlElement xmlElement = (XmlElement) annotation;\n                                if (xmlElement != null && xmlElement.name() != null && !\"\".equals(xmlElement.name()) && !JAXB_DEFAULT.equals(xmlElement.name())) {\n                                    XML xml = items.getXml() != null ? items.getXml() : new XML();\n                                    xml.setName(xmlElement.name());\n                                    items.setXml(xml);\n                                }\n                            }\n                        }\n                    }\n                }\n                if (StringUtils.isNotBlank(items.getName())) {\n                    pName = items.getName();\n                }\n                if (isObjectSchema(items) && pName != null) {\n                    if (context.getDefinedModels().containsKey(pName)) {\n                        if (Schema.SchemaResolution.INLINE.equals(containerResolvedSchemaResolution) && applySchemaResolution()) {\n                            items = context.getDefinedModels().get(pName);\n                        } else {\n                            // create a reference for the items\n                            items = openapi31 ? new JsonSchema() : new Schema();\n                            items.$ref(constructRef(pName));\n                        }\n                    }\n                } else if (items.get$ref() != null) {\n                    String ref = StringUtils.isNotEmpty(items.get$ref()) ? items.get$ref() : items.getName();\n                    items = openapi31 ? new JsonSchema() : new Schema();\n                    items.$ref(ref);\n                }\n\n                Schema arrayModel =\n                        new ArraySchema().items(items);\n                if (openapi31) {\n                    arrayModel.specVersion(SpecVersion.V31);\n                }\n                if (_isSetType(type.getRawClass())) {\n                    arrayModel.setUniqueItems(true);\n                }\n                arrayModel.name(name);\n                model = arrayModel;\n            } else {\n                if (ReflectionUtils.isSystemType(type) && !annotatedType.isSchemaProperty() && !annotatedType.isResolveAsRef()) {\n                    return null;\n                }\n            }\n        } else if (hasCompositionKeywords) {\n            model = openapi31 ? new JsonSchema() : new ComposedSchema();\n            model.name(name);\n            if (\n                    (openapi31 && Boolean.TRUE.equals(PrimitiveType.explicitObjectType)) ||\n                    (!openapi31 && (!Boolean.FALSE.equals(PrimitiveType.explicitObjectType)))) {\n                if (openapi31 && resolvedArrayAnnotation == null) {\n                    model.addType(\"object\");\n                } else {\n                    model.type(\"object\");\n                }\n            } else {\n                implicitObject = true;\n            }\n        } else {\n            AnnotatedType aType = ReferenceTypeUtils.unwrapReference(annotatedType);\n            if (aType != null) {\n                model = context.resolve(aType);\n                return model;\n            } else {\n                model = openapi31 ? new JsonSchema().name(name) : new Schema().name(name);\n                if ((openapi31 && Boolean.TRUE.equals(PrimitiveType.explicitObjectType)) ||\n                                (!openapi31 && (!Boolean.FALSE.equals(PrimitiveType.explicitObjectType)))) {\n                    if (openapi31 && resolvedArrayAnnotation == null) {\n                        model.addType(\"object\");\n                    } else {\n                        model.type(\"object\");\n                    }\n                } else {\n                    implicitObject = true;\n                }\n            }\n        }\n\n        if (!type.isContainerType() && StringUtils.isNotBlank(name)) {\n            // define the model here to support self/cyclic referencing of models\n            context.defineModel(name, model, annotatedType, null);\n        }\n\n        XML xml = resolveXml(beanDesc.getClassInfo(), annotatedType.getCtxAnnotations(), resolvedSchemaAnnotation);\n        if (xml != null) {\n            model.xml(xml);\n        }\n\n        if (!(model instanceof ArraySchema) || (model instanceof ArraySchema && resolvedArrayAnnotation == null)) {\n            resolveSchemaMembers(model, annotatedType, context, next);\n        }\n\n        final XmlAccessorType xmlAccessorTypeAnnotation = beanDesc.getClassAnnotations().get(XmlAccessorType.class);\n\n        // see if @JsonIgnoreProperties exist\n        Set<String> propertiesToIgnore = resolveIgnoredProperties(beanDesc.getClassAnnotations(), annotatedType.getCtxAnnotations());\n\n        List<Schema> props = new ArrayList<>();\n        Map<String, Schema> modelProps = new LinkedHashMap<>();\n\n        List<BeanPropertyDefinition> properties = beanDesc.findProperties();\n        List<String> ignoredProps = getIgnoredProperties(beanDesc);\n        properties.removeIf(p -> ignoredProps.contains(p.getName()));\n        for (BeanPropertyDefinition propDef : properties) {\n            Schema property = null;\n            String propName = propDef.getName();\n            Annotation[] annotations = null;\n\n            AnnotatedMember member = propDef.getPrimaryMember();\n            if (member == null) {\n                final BeanDescription deserBeanDesc = _mapper.getDeserializationConfig().introspect(type);\n                List<BeanPropertyDefinition> deserProperties = deserBeanDesc.findProperties();\n                for (BeanPropertyDefinition prop : deserProperties) {\n                    if (StringUtils.isNotBlank(prop.getInternalName()) && prop.getInternalName().equals(propDef.getInternalName())) {\n                        member = prop.getPrimaryMember();\n                        break;\n                    }\n                }\n            }\n\n            // hack to avoid clobbering properties with get/is names\n            // it's ugly but gets around https://github.com/swagger-api/swagger-core/issues/415\n            if (propDef.getPrimaryMember() != null) {\n                final JsonProperty jsonPropertyAnn = propDef.getPrimaryMember().getAnnotation(JsonProperty.class);\n                if (jsonPropertyAnn == null || !jsonPropertyAnn.value().equals(propName)) {\n                    if (member != null) {\n                        java.lang.reflect.Member innerMember = member.getMember();\n                        if (innerMember != null) {\n                            String altName = innerMember.getName();\n                            if (altName != null) {\n                                final int length = altName.length();\n                                for (String prefix : Arrays.asList(\"get\", \"is\")) {\n                                    final int offset = prefix.length();\n                                    if (altName.startsWith(prefix) && length > offset\n                                            && !Character.isUpperCase(altName.charAt(offset))) {\n                                        propName = altName;\n                                        break;\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n\n            PropertyMetadata md = propDef.getMetadata();\n\n            if (member != null && !ignore(member, xmlAccessorTypeAnnotation, propName, propertiesToIgnore, propDef)) {\n\n                List<Annotation> annotationList = new ArrayList<>();\n                for (Annotation a : member.annotations()) {\n                    annotationList.add(a);\n                }\n\n                annotations = annotationList.toArray(new Annotation[annotationList.size()]);\n\n                if (hiddenByJsonView(annotations, annotatedType)) {\n                    continue;\n                }\n\n                JavaType propType = member.getType();\n                if (propType != null && \"void\".equals(propType.getRawClass().getName())) {\n                    if (member instanceof AnnotatedMethod) {\n                        propType = ((AnnotatedMethod) member).getParameterType(0);\n                    }\n\n                }\n\n                String propSchemaName = null;\n                io.swagger.v3.oas.annotations.media.Schema ctxSchema = AnnotationsUtils.getSchemaAnnotation(annotations);\n                if (AnnotationsUtils.hasSchemaAnnotation(ctxSchema)) {\n                    if (!StringUtils.isBlank(ctxSchema.name())) {\n                        propSchemaName = ctxSchema.name();\n                    }\n                }\n                io.swagger.v3.oas.annotations.media.ArraySchema ctxArraySchema = AnnotationsUtils.getArraySchemaAnnotation(annotations);\n                if (propSchemaName == null) {\n                    if (AnnotationsUtils.hasArrayAnnotation(ctxArraySchema)) {\n                        if (AnnotationsUtils.hasSchemaAnnotation(ctxArraySchema.schema())) {\n                            if (!StringUtils.isBlank(ctxArraySchema.schema().name())) {\n                                propSchemaName = ctxArraySchema.schema().name();\n                            }\n                        }\n                    }\n                }\n                if (StringUtils.isNotBlank(propSchemaName)) {\n                    propName = propSchemaName;\n                }\n                Annotation propSchemaOrArray = AnnotationsUtils.mergeSchemaAnnotations(annotations, propType);\n                final io.swagger.v3.oas.annotations.media.Schema propResolvedSchemaAnnotation =\n                        propSchemaOrArray == null ?\n                                null :\n                                propSchemaOrArray instanceof io.swagger.v3.oas.annotations.media.ArraySchema ?\n                                        ((io.swagger.v3.oas.annotations.media.ArraySchema) propSchemaOrArray).arraySchema() :\n                                        (io.swagger.v3.oas.annotations.media.Schema) propSchemaOrArray;\n\n                io.swagger.v3.oas.annotations.media.Schema.AccessMode accessMode = resolveAccessMode(propDef, type, propResolvedSchemaAnnotation);\n                io.swagger.v3.oas.annotations.media.Schema.RequiredMode requiredMode = resolveRequiredMode(propResolvedSchemaAnnotation, propType);\n\n                SiblingAnnotationFilter.FilterResult filterResult = filterSiblingAnnotations(\n                        annotations, propType, ctxSchema, ctxArraySchema, this.schemaResolution, openapi31);\n                Annotation[] ctxFilteredSiblingAnnotations = filterResult.getFilteredAnnotations();\n                Schema.SchemaResolution resolvedSchemaResolution = filterResult.getResolvedSchemaResolution();\n                Set<Annotation> validationInvocationAnnotations = null;\n                if (validatorProcessor != null) {\n                    validationInvocationAnnotations = validatorProcessor.resolveInvocationAnnotations(annotations);\n                    if (validationInvocationAnnotations == null) {\n                        validationInvocationAnnotations = validatorProcessor.resolveInvocationAnnotations(annotatedType.getCtxAnnotations());\n                    } else {\n                        validationInvocationAnnotations.addAll(validatorProcessor.resolveInvocationAnnotations(annotatedType.getCtxAnnotations()));\n                    }\n                }\n                if (validationInvocationAnnotations == null) {\n                    validationInvocationAnnotations = resolveValidationInvocationAnnotations(annotations);\n                    validationInvocationAnnotations.addAll(resolveValidationInvocationAnnotations(annotatedType.getCtxAnnotations()));\n                }\n                annotations = Stream.concat(Arrays.stream(annotations), Arrays.stream(validationInvocationAnnotations.toArray(new Annotation[0]))).toArray(Annotation[]::new);\n                if (ctxFilteredSiblingAnnotations != null) {\n                    ctxFilteredSiblingAnnotations = Stream.concat(Arrays.stream(ctxFilteredSiblingAnnotations), Arrays.stream(validationInvocationAnnotations.toArray(new Annotation[0]))).toArray(Annotation[]::new);\n                }\n                AnnotatedType aType = new AnnotatedType()\n                        .type(propType)\n                        .parent(model)\n                        .resolveAsRef(annotatedType.isResolveAsRef())\n                        .jsonViewAnnotation(annotatedType.getJsonViewAnnotation())\n                        .skipSchemaName(true)\n                        .subtype(annotatedType.isSubtype())\n                        .schemaProperty(true)\n                        .components(annotatedType.getComponents())\n                        .propertyName(propName)\n                        .resolveEnumAsRef(AnnotationsUtils.computeEnumAsRef(ctxSchema, ctxArraySchema));\n                if (AnnotationsUtils.areSiblingsAllowed(resolvedSchemaResolution, openapi31)) {\n                    aType.ctxAnnotations(ctxFilteredSiblingAnnotations);\n                } else {\n                    aType.ctxAnnotations(annotations);\n                }\n                final AnnotatedMember propMember = member;\n                aType.jsonUnwrappedHandler(t -> {\n                    JsonUnwrapped uw = propMember.getAnnotation(JsonUnwrapped.class);\n                    if (uw != null && uw.enabled()) {\n                        t\n                                .ctxAnnotations(null)\n                                .jsonUnwrappedHandler(null)\n                                .resolveAsRef(false);\n                        Schema innerModel = context.resolve(t);\n                        if (StringUtils.isNotBlank(innerModel.get$ref())) {\n                            innerModel = context.getDefinedModels().get(innerModel.get$ref().substring(SCHEMA_COMPONENT_PREFIX));\n                        }\n                        handleUnwrapped(props, innerModel, uw.prefix(), uw.suffix(), requiredProps);\n                        return null;\n                    } else {\n                        return openapi31 ? new JsonSchema() : new Schema();\n                    }\n                });\n\n                boolean areSiblingsAllowed = AnnotationsUtils.areSiblingsAllowed(resolvedSchemaResolution, openapi31);\n                aType = AnnotationsUtils.addTypeWhenSiblingsAllowed(aType, ctxSchema, areSiblingsAllowed);\n                property = context.resolve(aType);\n                property = clone(property);\n                Schema ctxProperty = null;\n                if (!applySchemaResolution()) {\n                    Optional<Schema> reResolvedProperty = AnnotationsUtils.getSchemaFromAnnotation(ctxSchema, annotatedType.getComponents(), null, openapi31, property, schemaResolution, context);\n                    if (reResolvedProperty.isPresent()) {\n                        property = reResolvedProperty.get();\n                    }\n\n                    reResolvedProperty = resolveArraySchemaWithCycleGuard(ctxArraySchema, annotatedType, openapi31, property);\n                    if (reResolvedProperty.isPresent()) {\n                        property = reResolvedProperty.get();\n                    }\n\n                } else if (Schema.SchemaResolution.ALL_OF.equals(resolvedSchemaResolution) || Schema.SchemaResolution.ALL_OF_REF.equals(resolvedSchemaResolution)) {\n                    Optional<Schema> reResolvedProperty = AnnotationsUtils.getSchemaFromAnnotation(ctxSchema, annotatedType.getComponents(), null, openapi31, null, schemaResolution, context);\n                    if (reResolvedProperty.isPresent()) {\n                        ctxProperty = reResolvedProperty.get();\n                    }\n                    reResolvedProperty = AnnotationsUtils.getArraySchema(ctxArraySchema, annotatedType.getComponents(), null, openapi31, ctxProperty);\n                    if (reResolvedProperty.isPresent()) {\n                        ctxProperty = reResolvedProperty.get();\n                    }\n\n                }\n                if (property != null) {\n                    Boolean required = md.getRequired();\n                    if (!io.swagger.v3.oas.annotations.media.Schema.RequiredMode.NOT_REQUIRED.equals(requiredMode)) {\n                        if (required != null && !Boolean.FALSE.equals(required)) {\n                            addRequiredItem(model, propName);\n                        } else {\n                            if (propDef.isRequired()) {\n                                addRequiredItem(model, propName);\n                            }\n                        }\n                    }\n                    if (property.get$ref() == null || openapi31) {\n                        if (accessMode != null) {\n                            switch (accessMode) {\n                                case AUTO:\n                                    break;\n                                case READ_ONLY:\n                                    property.readOnly(true);\n                                    break;\n                                case READ_WRITE:\n                                    break;\n                                case WRITE_ONLY:\n                                    property.writeOnly(true);\n                                    break;\n                                default:\n                            }\n                        }\n                    }\n                    final BeanDescription propBeanDesc = _mapper.getSerializationConfig().introspect(propType);\n                    if (property != null && !propType.isContainerType()) {\n                        if (isObjectSchema(property)) {\n                            // create a reference for the property\n                            String pName = _typeName(propType, propBeanDesc);\n                            if (StringUtils.isNotBlank(property.getName())) {\n                                pName = property.getName();\n                            }\n\n                            if (context.getDefinedModels().containsKey(pName)) {\n                                if (Schema.SchemaResolution.INLINE.equals(resolvedSchemaResolution)) {\n                                    property = context.getDefinedModels().get(pName);\n                                } else if (Schema.SchemaResolution.ALL_OF.equals(resolvedSchemaResolution) && ctxProperty != null) {\n                                    property = openapi31 ? new JsonSchema() : new Schema();\n                                    property\n                                            .addAllOfItem(ctxProperty)\n                                            .addAllOfItem(openapi31 ? new JsonSchema().$ref(constructRef(pName)) : new Schema().$ref(constructRef(pName)));\n                                } else if (Schema.SchemaResolution.ALL_OF_REF.equals(resolvedSchemaResolution) && ctxProperty != null) {\n                                    property = ctxProperty.addAllOfItem(openapi31 ? new JsonSchema().$ref(constructRef(pName)) : new Schema().$ref(constructRef(pName)));\n                                } else {\n                                    property = openapi31 ? new JsonSchema() : new Schema();\n                                    property.$ref(constructRef(pName));\n                                }\n                                property = clone(property);\n                                // TODO: why is this needed? is it not handled before?\n                                if (openapi31 || Schema.SchemaResolution.INLINE.equals(resolvedSchemaResolution)) {\n                                    Optional<Schema> reResolvedProperty = AnnotationsUtils.getSchemaFromAnnotation(ctxSchema, annotatedType.getComponents(), null, openapi31, property, this.schemaResolution, context);\n                                    if (reResolvedProperty.isPresent()) {\n                                        property = reResolvedProperty.get();\n                                    }\n                                    reResolvedProperty = AnnotationsUtils.getArraySchema(ctxArraySchema, annotatedType.getComponents(), null, openapi31, property);\n                                    if (reResolvedProperty.isPresent()) {\n                                        property = reResolvedProperty.get();\n                                    }\n                                }\n                            }\n                        } else if (property.get$ref() != null) {\n                            if (applySchemaResolution()) {\n                                if (Schema.SchemaResolution.ALL_OF.equals(resolvedSchemaResolution) && ctxProperty != null) {\n                                    property = new Schema()\n                                            .addAllOfItem(ctxProperty)\n                                            .addAllOfItem(new Schema().$ref(StringUtils.isNotEmpty(property.get$ref()) ? property.get$ref() : property.getName()));\n                                } else if (Schema.SchemaResolution.ALL_OF_REF.equals(resolvedSchemaResolution) && ctxProperty != null) {\n                                    property = ctxProperty\n                                            .addAllOfItem(new Schema().$ref(StringUtils.isNotEmpty(property.get$ref()) ? property.get$ref() : property.getName()));\n                                } else {\n                                    property = new Schema().$ref(StringUtils.isNotEmpty(property.get$ref()) ? property.get$ref() : property.getName());\n                                }\n                            } else {\n                                if (StringUtils.isEmpty(property.get$ref())) {\n                                    property.$ref(property.getName());\n                                }\n                            }\n                        }\n                    }\n                    property.setName(propName);\n                    JAXBAnnotationsHelper.apply(propBeanDesc.getClassInfo(), annotations, property);\n                    if (property != null && io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED.equals(requiredMode)) {\n                        addRequiredItem(model, property.getName());\n                    }\n                    if (ctxProperty == null) {\n                        ctxProperty = property;\n                    }\n                    final boolean applyNotNullAnnotations = io.swagger.v3.oas.annotations.media.Schema.RequiredMode.AUTO.equals(requiredMode);\n                    annotations = addGenericTypeArgumentAnnotationsForOptionalField(propDef, annotations);\n                    applyBeanValidatorAnnotations(propDef, ctxProperty, annotations, model, applyNotNullAnnotations);\n\n                    props.add(property);\n                }\n            }\n        }\n        for (Schema prop : props) {\n            modelProps.put(prop.getName(), prop);\n        }\n        if (modelProps.size() > 0) {\n            if (model.getProperties() == null) {\n                model.setProperties(modelProps);\n            } else {\n                for (String key : modelProps.keySet()) {\n                    model.addProperty(key, modelProps.get(key));\n                }\n            }\n\n            for (String propName : requiredProps) {\n                addRequiredItem(model, propName);\n            }\n        }\n\n        /**\n         * --Preventing parent/child hierarchy creation loops - Comment 2--\n         * Creating a parent model will result in the creation of child models, as per the first If statement following\n         * this comment. Creating a child model will result in the creation of a parent model, as per the second If\n         * statement following this comment.\n         *\n         * The current model must be defined in the context immediately. This done to help prevent repeated\n         * loops where  parents create children and children create parents when a hierarchy is present. This logic\n         * works in conjunction with the \"early checking\" performed earlier in this method\n         * (See \"Preventing parent/child hierarchy creation loops - Comment 1\"), to prevent repeated creation loops.\n         *\n         *\n         * As an aside, defining the current model in the context immediately also ensures that child models are\n         * available for modification by resolveSubtypes, when their parents are created.\n         */\n        if (!type.isContainerType() && StringUtils.isNotBlank(name)) {\n            context.defineModel(name, model, annotatedType, null);\n        }\n\n        /**\n         * This must be done after model.setProperties so that the model's set\n         * of properties is available to filter from any subtypes\n         **/\n        if (!resolveSubtypes(model, beanDesc, context, annotatedType.getJsonViewAnnotation())) {\n            model.setDiscriminator(null);\n        }\n\n        Discriminator discriminator = resolveDiscriminator(type, context);\n        if (discriminator != null) {\n            model.setDiscriminator(discriminator);\n        }\n\n        if (resolvedSchemaAnnotation != null) {\n            String ref = resolvedSchemaAnnotation.ref();\n            // consider ref as is\n            if (!StringUtils.isBlank(ref)) {\n                model.$ref(ref);\n            }\n            Class<?> not = resolvedSchemaAnnotation.not();\n            if (!Void.class.equals(not)) {\n                model.not((new Schema().$ref(context.resolve(new AnnotatedType().components(annotatedType.getComponents()).type(not).jsonViewAnnotation(annotatedType.getJsonViewAnnotation())).getName())));\n            }\n            if (resolvedSchemaAnnotation.requiredProperties() != null &&\n                    resolvedSchemaAnnotation.requiredProperties().length > 0 &&\n                    StringUtils.isNotBlank(resolvedSchemaAnnotation.requiredProperties()[0])) {\n                for (String prop : resolvedSchemaAnnotation.requiredProperties()) {\n                    addRequiredItem(model, prop);\n                }\n            }\n        }\n\n        Map<String, Schema> patternProperties = resolvePatternProperties(type, annotatedType.getCtxAnnotations(), context);\n        if (model != null && patternProperties != null && !patternProperties.isEmpty()) {\n            if (model.getPatternProperties() == null) {\n                model.patternProperties(patternProperties);\n            } else {\n                model.getPatternProperties().putAll(patternProperties);\n            }\n        }\n\n        Map<String, Schema> schemaProperties = resolveSchemaProperties(type, annotatedType.getCtxAnnotations(), context);\n        if (model != null && schemaProperties != null && !schemaProperties.isEmpty()) {\n            if (model.getProperties() == null) {\n                model.properties(schemaProperties);\n            } else {\n                model.getProperties().putAll(schemaProperties);\n            }\n        }\n\n        if (openapi31) {\n            Map<String, Schema> dependentSchemas = resolveDependentSchemas(type, annotatedType.getCtxAnnotations(), context, annotatedType.getComponents(), annotatedType.getJsonViewAnnotation(), openapi31);\n            if (model != null && dependentSchemas != null && !dependentSchemas.isEmpty()) {\n                if (model.getDependentSchemas() == null) {\n                    model.dependentSchemas(dependentSchemas);\n                } else {\n                    model.getDependentSchemas().putAll(dependentSchemas);\n                }\n            }\n        }\n\n        if (hasCompositionKeywords) {\n\n            Schema schemaWithCompositionKeys = model;\n\n            Class<?>[] allOf = resolvedSchemaAnnotation.allOf();\n            Class<?>[] anyOf = resolvedSchemaAnnotation.anyOf();\n            Class<?>[] oneOf = resolvedSchemaAnnotation.oneOf();\n\n            List<Class<?>> allOfFiltered = Stream.of(allOf)\n                    .distinct()\n                    .filter(c -> !this.shouldIgnoreClass(c))\n                    .filter(c -> !(c.equals(Void.class)))\n                    .collect(Collectors.toList());\n            allOfFiltered.forEach(c -> {\n                Schema allOfRef = context.resolve(new AnnotatedType().components(annotatedType.getComponents()).type(c).jsonViewAnnotation(annotatedType.getJsonViewAnnotation()));\n                Schema refSchema = new Schema().$ref(Components.COMPONENTS_SCHEMAS_REF + allOfRef.getName());\n                if (StringUtils.isBlank(allOfRef.getName())) {\n                    refSchema = allOfRef;\n                }\n                // allOf could have already being added during subtype resolving\n                if (schemaWithCompositionKeys.getAllOf() == null || !schemaWithCompositionKeys.getAllOf().contains(refSchema)) {\n                    schemaWithCompositionKeys.addAllOfItem(refSchema);\n                }\n                // remove shared properties defined in the parent\n                if (isSubtype(beanDesc.getClassInfo(), c)) {\n                    removeParentProperties(schemaWithCompositionKeys, allOfRef);\n                }\n            });\n\n            List<Class<?>> anyOfFiltered = Stream.of(anyOf)\n                    .distinct()\n                    .filter(c -> !this.shouldIgnoreClass(c))\n                    .filter(c -> !(c.equals(Void.class)))\n                    .collect(Collectors.toList());\n            anyOfFiltered.forEach(c -> {\n                Schema anyOfRef = context.resolve(new AnnotatedType().components(annotatedType.getComponents()).type(c).jsonViewAnnotation(annotatedType.getJsonViewAnnotation()));\n                if (anyOfRef != null) {\n                    if (StringUtils.isNotBlank(anyOfRef.getName())) {\n                        schemaWithCompositionKeys.addAnyOfItem(new Schema().$ref(Components.COMPONENTS_SCHEMAS_REF + anyOfRef.getName()));\n                    } else {\n                        schemaWithCompositionKeys.addAnyOfItem(anyOfRef);\n                    }\n                }\n                // remove shared properties defined in the parent\n                if (isSubtype(beanDesc.getClassInfo(), c)) {\n                    removeParentProperties(schemaWithCompositionKeys, anyOfRef);\n                }\n\n            });\n\n            List<Class<?>> oneOfFiltered = Stream.of(oneOf)\n                    .distinct()\n                    .filter(c -> !this.shouldIgnoreClass(c))\n                    .filter(c -> !(c.equals(Void.class)))\n                    .collect(Collectors.toList());\n            oneOfFiltered.forEach(c -> {\n                Schema oneOfRef = context.resolve(new AnnotatedType().components(annotatedType.getComponents()).type(c).jsonViewAnnotation(annotatedType.getJsonViewAnnotation()));\n                if (oneOfRef != null) {\n                    if (StringUtils.isBlank(oneOfRef.getName())) {\n                        schemaWithCompositionKeys.addOneOfItem(oneOfRef);\n                    } else {\n                        schemaWithCompositionKeys.addOneOfItem(new Schema().$ref(Components.COMPONENTS_SCHEMAS_REF + oneOfRef.getName()));\n                    }\n                    // remove shared properties defined in the parent\n                    if (isSubtype(beanDesc.getClassInfo(), c)) {\n                        removeParentProperties(schemaWithCompositionKeys, oneOfRef);\n                    }\n                }\n\n                dropRootRefIfComposed(schemaWithCompositionKeys);\n            });\n\n            if (!composedModelPropertiesAsSibling) {\n                if (schemaWithCompositionKeys.getAllOf() != null && !schemaWithCompositionKeys.getAllOf().isEmpty()) {\n                    if (schemaWithCompositionKeys.getProperties() != null && !schemaWithCompositionKeys.getProperties().isEmpty()) {\n                        Schema propSchema = openapi31 ? new JsonSchema().typesItem(\"object\") : new ObjectSchema();\n                        propSchema.properties(schemaWithCompositionKeys.getProperties());\n                        schemaWithCompositionKeys.setProperties(null);\n                        schemaWithCompositionKeys.addAllOfItem(propSchema);\n                    }\n                }\n            }\n        }\n\n        if (!type.isContainerType() && StringUtils.isNotBlank(name)) {\n            // define the model here to support self/cyclic referencing of models\n            context.defineModel(name, model, annotatedType, null);\n        }\n        // check if it has \"object\" related keywords\n        if (isInferredObjectSchema(model) && model.get$ref() == null) {\n          if (openapi31 && model.getTypes() == null) {\n            model.addType(\"object\");\n          } else if (!openapi31 && model.getType() == null){\n            model.type(\"object\");\n          }\n        }\n        Schema.SchemaResolution resolvedSchemaResolution = AnnotationsUtils.resolveSchemaResolution(this.schemaResolution, resolvedSchemaAnnotation);\n\n        if (model != null && annotatedType.isResolveAsRef() &&\n                (hasCompositionKeywords || isObjectSchema(model) || implicitObject) &&\n                StringUtils.isNotBlank(model.getName())) {\n            if (context.getDefinedModels().containsKey(model.getName())) {\n                if (!Schema.SchemaResolution.INLINE.equals(resolvedSchemaResolution)) {\n                    model = new Schema().$ref(constructRef(model.getName()));\n                }\n            }\n        } else if (model != null && model.get$ref() != null) {\n            model = new Schema().$ref(StringUtils.isNotEmpty(model.get$ref()) ? model.get$ref() : model.getName());\n        }\n\n        if (model != null && resolvedArrayAnnotation != null) {\n            if (!\"array\".equals(model.getType())) {\n                ArraySchema schema = new ArraySchema();\n                if (openapi31) {\n                    schema.specVersion(SpecVersion.V31);\n                }\n                schema.setItems(model);\n                resolveArraySchema(annotatedType, schema, resolvedArrayAnnotation);\n                return schema;\n            } else {\n                if (isArraySchema(model)) {\n                    resolveArraySchema(annotatedType, (ArraySchema) model, resolvedArrayAnnotation);\n                }\n            }\n        }\n\n        resolveDiscriminatorProperty(type, context, model);\n        model = resolveWrapping(type, context, model);\n\n        return model;\n    }\n\n    private Annotation[] addGenericTypeArgumentAnnotationsForOptionalField(BeanPropertyDefinition propDef, Annotation[] annotations) {\n\n        boolean isNotOptionalType = Optional.ofNullable(propDef)\n                .map(BeanPropertyDefinition::getField)\n                .map(AnnotatedField::getAnnotated)\n                .map(field -> !(field.getType().equals(Optional.class)))\n                .orElse(false);\n\n        if (isNotOptionalType || isRecordType(propDef)) {\n            return annotations;\n        }\n\n        Stream<Annotation> genericTypeArgumentAnnotations = extractGenericTypeArgumentAnnotations(propDef);\n        return Stream.concat(Stream.of(annotations), genericTypeArgumentAnnotations).toArray(Annotation[]::new);\n    }\n\n    private Stream<Annotation> extractGenericTypeArgumentAnnotations(BeanPropertyDefinition propDef) {\n        if (isRecordType(propDef)) {\n            return getRecordComponentAnnotations(propDef);\n        }\n        return Optional.ofNullable(propDef)\n                .map(BeanPropertyDefinition::getField)\n                .map(AnnotatedField::getAnnotated)\n                .map(this::getGenericTypeArgumentAnnotations)\n                .orElseGet(Stream::of);\n    }\n\n    private Stream<Annotation> getRecordComponentAnnotations(BeanPropertyDefinition propDef) {\n        try {\n            Method accessor = propDef.getPrimaryMember().getDeclaringClass().getDeclaredMethod(propDef.getPrimaryMember().getName());\n            return getGenericTypeArgumentAnnotations(accessor.getAnnotatedReturnType());\n        } catch (NoSuchMethodException e) {\n            LOGGER.error(\"Accessor for record component not found\");\n            return Stream.empty();\n        }\n    }\n\n    private void dropRootRefIfComposed(Schema<?> s) {\n        if (s == null || s.get$ref() == null) {\n            return;\n        }\n\n        if (!isComposedSchema(s)) {\n            return;\n        }\n\n        String ref = s.get$ref();\n        if (refMatchesAnyComposedItem(s, ref)) {\n            s.set$ref(null);\n        }\n    }\n\n    private boolean isComposedSchema(Schema<?> s) {\n        return (s.getOneOf() != null && !s.getOneOf().isEmpty())\n                || (s.getAnyOf() != null && !s.getAnyOf().isEmpty())\n                || (s.getAllOf() != null && !s.getAllOf().isEmpty());\n    }\n\n    private boolean refMatchesAnyComposedItem(Schema<?> s, String ref) {\n        return refMatchesInList(s.getOneOf(), ref)\n                || refMatchesInList(s.getAllOf(), ref)\n                || refMatchesInList(s.getAnyOf(), ref);\n    }\n\n    private boolean refMatchesInList(List<Schema> schemas, String ref) {\n        return schemas != null && schemas.stream()\n                .anyMatch(schema -> ref.equals(schema.get$ref()));\n    }\n\n    private Boolean isRecordType(BeanPropertyDefinition propDef) {\n        try {\n            if (propDef.getPrimaryMember() != null) {\n                Class<?> clazz = propDef.getPrimaryMember().getDeclaringClass();\n                Method isRecordMethod = Class.class.getMethod(\"isRecord\");\n                return (Boolean) isRecordMethod.invoke(clazz);\n            } else {\n                return false;\n            }\n        } catch (NoSuchMethodException e) {\n            return false;\n        } catch (Exception e) {\n            return false;\n        }\n    }\n\n    private Stream<Annotation> getGenericTypeArgumentAnnotations(Field field) {\n        return getGenericTypeArgumentAnnotations(field.getAnnotatedType());\n    }\n\n    private Stream<Annotation> getGenericTypeArgumentAnnotations(java.lang.reflect.AnnotatedType annotatedType) {\n        return Optional.of(annotatedType)\n                .filter(type -> type instanceof AnnotatedParameterizedType)\n                .map(type -> (AnnotatedParameterizedType) type)\n                .map(AnnotatedParameterizedType::getAnnotatedActualTypeArguments)\n                .map(types -> Stream.of(types)\n                        .flatMap(type -> Stream.of(type.getAnnotations())))\n                .orElseGet(Stream::of);\n    }\n\n    private boolean shouldResolveEnumAsRef(io.swagger.v3.oas.annotations.media.Schema resolvedSchemaAnnotation, boolean isResolveEnumAsRef) {\n        return (resolvedSchemaAnnotation != null && resolvedSchemaAnnotation.enumAsRef()) || ModelResolver.enumsAsRef || isResolveEnumAsRef;\n    }\n\n    protected Type findJsonValueType(final BeanDescription beanDesc) {\n\n        // use recursion to check for method findJsonValueAccessor existence (Jackson 2.9+)\n        // if not found use previous deprecated method which could lead to inaccurate result\n        try {\n            AnnotatedMember jsonValueMember = invokeMethod(beanDesc, \"findJsonValueAccessor\");\n            if (jsonValueMember != null) {\n                return jsonValueMember.getType();\n            }\n            return null;\n        } catch (Exception e) {\n            LOGGER.warn(\"jackson BeanDescription.findJsonValueAccessor not found, this could lead to inaccurate result, please update jackson to 2.9+\");\n        }\n\n        try {\n            AnnotatedMember jsonValueMember = invokeMethod(beanDesc, \"findJsonValueMethod\");\n            if (jsonValueMember != null) {\n                return jsonValueMember.getType();\n            }\n        } catch (Exception e) {\n            LOGGER.error(\"Neither 'findJsonValueMethod' nor 'findJsonValueAccessor' found in jackson BeanDescription. Please verify your Jackson version.\");\n        }\n        return null;\n    }\n\n    private Schema clone(Schema property) {\n        return AnnotationsUtils.clone(property, openapi31);\n    }\n\n    private boolean isSubtype(AnnotatedClass childClass, Class<?> parentClass) {\n        final BeanDescription parentDesc = _mapper.getSerializationConfig().introspectClassAnnotations(parentClass);\n        List<NamedType> subTypes = _intr().findSubtypes(parentDesc.getClassInfo());\n        if (subTypes == null) {\n            return false;\n        }\n        for (NamedType subtype : subTypes) {\n            final Class<?> subtypeType = subtype.getType();\n            if (childClass.getRawType().isAssignableFrom(subtypeType)) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    protected boolean _isOptionalType(JavaType propType) {\n        return Arrays.asList(\"com.google.common.base.Optional\", \"java.util.Optional\")\n                .contains(propType.getRawClass().getCanonicalName());\n    }\n\n    /**\n     * @deprecated use '_createSchemaForEnum'\n     */\n    protected void _addEnumProps(Class<?> propClass, Schema property) {\n        if (propClass.isEnum()) {\n            Class<Enum<?>> rawEnumClass = (Class<Enum<?>>) propClass;\n            Schema enumSchema = _createSchemaForEnum(rawEnumClass);\n            if (enumSchema != null) {\n                property.setEnum(enumSchema.getEnum());\n                property.setType(enumSchema.getType());\n                property.setFormat(enumSchema.getFormat());\n                property.setName(enumSchema.getName());\n                property.setDescription(enumSchema.getDescription());\n            }\n        }\n    }\n\n    /**\n     * Adds each enum property value to the model schema\n     *\n     * @param enumClass the enum class for which to add properties\n     */\n    protected Schema _createSchemaForEnum(Class<Enum<?>> enumClass) {\n        boolean useIndex = _mapper.isEnabled(SerializationFeature.WRITE_ENUMS_USING_INDEX);\n        boolean useToString = _mapper.isEnabled(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);\n\n        Optional<Method> jsonValueMethod = Arrays.stream(enumClass.getDeclaredMethods())\n                .filter(m -> m.isAnnotationPresent(JsonValue.class))\n                .filter(m -> m.getAnnotation(JsonValue.class).value())\n                .findFirst();\n\n        Optional<Field> jsonValueField = Arrays.stream(enumClass.getDeclaredFields())\n                .filter(f -> f.isAnnotationPresent(JsonValue.class))\n                .filter(f -> f.getAnnotation(JsonValue.class).value())\n                .findFirst();\n\n        Schema schema = null;\n        if (jsonValueField.isPresent()) {\n            jsonValueField.get().setAccessible(true);\n            PrimitiveType primitiveType = PrimitiveType.fromType(jsonValueField.get().getType());\n            if (primitiveType != null) {\n                schema = openapi31 ? primitiveType.createProperty31() : primitiveType.createProperty();\n            }\n        } else if (jsonValueMethod.isPresent()) {\n            jsonValueMethod.get().setAccessible(true);\n            PrimitiveType primitiveType = PrimitiveType.fromType(jsonValueMethod.get().getReturnType());\n            if (primitiveType != null) {\n                schema = openapi31 ? primitiveType.createProperty31() : primitiveType.createProperty();\n            }\n        }\n        if (schema == null) {\n            schema = openapi31 ? new JsonSchema().typesItem(\"string\") : new StringSchema();\n        }\n\n        Enum<?>[] enumConstants = enumClass.getEnumConstants();\n\n        if (enumConstants != null) {\n            String[] enumValues = _intr().findEnumValues(enumClass, enumConstants,\n                    new String[enumConstants.length]);\n\n            for (Enum<?> en : enumConstants) {\n                Field enumField = ReflectionUtils.findField(en.name(), enumClass);\n                if (null != enumField && enumField.isAnnotationPresent(Hidden.class)) {\n                    continue;\n                }\n\n                String enumValue = enumValues[en.ordinal()];\n                Object methodValue = jsonValueMethod.flatMap(m -> ReflectionUtils.safeInvoke(m, en)).orElse(null);\n                Object fieldValue = jsonValueField.flatMap(f -> ReflectionUtils.safeGet(f, en)).orElse(null);\n\n                Object n;\n                if (methodValue != null) {\n                    n = methodValue;\n                } else if (fieldValue != null) {\n                    n = fieldValue;\n                } else if (enumValue != null) {\n                    n = enumValue;\n                } else if (useIndex) {\n                    n = String.valueOf(en.ordinal());\n                } else if (useToString) {\n                    n = en.toString();\n                } else {\n                    n = _intr().findEnumValue(en);\n                }\n                schema.addEnumItemObject(n);\n            }\n        }\n        return schema;\n    }\n\n    protected boolean ignore(final Annotated member, final XmlAccessorType xmlAccessorTypeAnnotation, final String propName, final Set<String> propertiesToIgnore) {\n        return ignore(member, xmlAccessorTypeAnnotation, propName, propertiesToIgnore, null);\n    }\n\n    protected boolean hasHiddenAnnotation(Annotated annotated) {\n        return annotated.hasAnnotation(Hidden.class) || (\n                annotated.hasAnnotation(io.swagger.v3.oas.annotations.media.Schema.class) &&\n                        annotated.getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class).hidden()\n        );\n    }\n\n    protected boolean ignore(final Annotated member, final XmlAccessorType xmlAccessorTypeAnnotation, final String propName, final Set<String> propertiesToIgnore, BeanPropertyDefinition propDef) {\n        if (propertiesToIgnore.contains(propName)) {\n            return true;\n        }\n        if (member.hasAnnotation(JsonIgnore.class) && member.getAnnotation(JsonIgnore.class).value()) {\n            return true;\n        }\n        if (hasHiddenAnnotation(member)) {\n            return true;\n        }\n\n        if (propDef != null) {\n            if (propDef.hasGetter() && hasHiddenAnnotation(propDef.getGetter())) {\n                return true;\n            }\n            if (propDef.hasSetter() && hasHiddenAnnotation(propDef.getSetter())) {\n                return true;\n            }\n            if (propDef.hasConstructorParameter() && hasHiddenAnnotation(propDef.getConstructorParameter())) {\n                return true;\n            }\n            if (propDef.hasField() && hasHiddenAnnotation(propDef.getField())) {\n                return true;\n            }\n        }\n\n        if (xmlAccessorTypeAnnotation == null) {\n            return false;\n        }\n        if (xmlAccessorTypeAnnotation.value().equals(XmlAccessType.NONE)) {\n            if (!member.hasAnnotation(XmlElement.class) &&\n                    !member.hasAnnotation(XmlAttribute.class) &&\n                    !member.hasAnnotation(XmlElementRef.class) &&\n                    !member.hasAnnotation(XmlElementRefs.class) &&\n                    !member.hasAnnotation(JsonProperty.class)) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    private void handleUnwrapped(List<Schema> props, Schema innerModel, String prefix, String suffix, List<String> requiredProps) {\n        if (StringUtils.isBlank(suffix) && StringUtils.isBlank(prefix)) {\n            if (innerModel.getProperties() != null) {\n                props.addAll(innerModel.getProperties().values());\n                if (innerModel.getRequired() != null) {\n                    requiredProps.addAll(innerModel.getRequired());\n                }\n\n            }\n        } else {\n            if (prefix == null) {\n                prefix = \"\";\n            }\n            if (suffix == null) {\n                suffix = \"\";\n            }\n            if (innerModel.getProperties() != null) {\n                for (Schema prop : (Collection<Schema>) innerModel.getProperties().values()) {\n                    try {\n                        Schema clonedProp = Json.mapper().readValue(Json.pretty(prop), Schema.class);\n                        clonedProp.setName(prefix + prop.getName() + suffix);\n                        props.add(clonedProp);\n                    } catch (IOException e) {\n                        LOGGER.error(\"Exception cloning property\", e);\n                        return;\n                    }\n                }\n            }\n        }\n    }\n\n    public Schema.SchemaResolution getSchemaResolution() {\n        return schemaResolution;\n    }\n\n    public void setSchemaResolution(Schema.SchemaResolution schemaResolution) {\n        this.schemaResolution = schemaResolution;\n    }\n\n    public ModelResolver schemaResolution(Schema.SchemaResolution schemaResolution) {\n        setSchemaResolution(schemaResolution);\n        return this;\n    }\n\n    private class GeneratorWrapper {\n\n        private final List<Base> wrappers = new ArrayList();\n\n        private final class PropertyGeneratorWrapper extends GeneratorWrapper.Base<ObjectIdGenerators.PropertyGenerator> {\n\n            public PropertyGeneratorWrapper(Class<? extends ObjectIdGenerator> generator) {\n                super(generator);\n            }\n\n            @Override\n            protected Schema processAsProperty(String propertyName, AnnotatedType type,\n                                               ModelConverterContext context, ObjectMapper mapper) {\n                /*\n                 * When generator = ObjectIdGenerators.PropertyGenerator.class and\n                 * @JsonIdentityReference(alwaysAsId = false) then property is serialized\n                 * in the same way it is done without @JsonIdentityInfo annotation.\n                 */\n                return null;\n            }\n\n            @Override\n            protected Schema processAsId(String propertyName, AnnotatedType type,\n                                         ModelConverterContext context, ObjectMapper mapper) {\n                final JavaType javaType;\n                if (type.getType() instanceof JavaType) {\n                    javaType = (JavaType) type.getType();\n                } else {\n                    javaType = mapper.constructType(type.getType());\n                }\n                final BeanDescription beanDesc = mapper.getSerializationConfig().introspect(javaType);\n                for (BeanPropertyDefinition def : beanDesc.findProperties()) {\n                    final String name = def.getName();\n                    if (name != null && name.equals(propertyName)) {\n                        final AnnotatedMember propMember = def.getPrimaryMember();\n                        final JavaType propType = propMember.getType();\n                        if (PrimitiveType.fromType(propType) != null) {\n                            return PrimitiveType.createProperty(propType, openapi31);\n                        } else {\n                            List<Annotation> list = new ArrayList<>();\n                            for (Annotation a : propMember.annotations()) {\n                                list.add(a);\n                            }\n                            Annotation[] annotations = list.toArray(new Annotation[list.size()]);\n                            AnnotatedType aType = new AnnotatedType()\n                                    .type(propType)\n                                    .ctxAnnotations(annotations)\n                                    .jsonViewAnnotation(type.getJsonViewAnnotation())\n                                    .schemaProperty(true)\n                                    .components(type.getComponents())\n                                    .subtype(type.isSubtype())\n                                    .propertyName(type.getPropertyName());\n\n                            return context.resolve(aType);\n                        }\n                    }\n                }\n                return null;\n            }\n        }\n\n        private final class IntGeneratorWrapper extends GeneratorWrapper.Base<ObjectIdGenerators.IntSequenceGenerator> {\n\n            public IntGeneratorWrapper(Class<? extends ObjectIdGenerator> generator) {\n                super(generator);\n            }\n\n            @Override\n            protected Schema processAsProperty(String propertyName, AnnotatedType type,\n                                               ModelConverterContext context, ObjectMapper mapper) {\n                Schema id = new IntegerSchema();\n                return process(id, propertyName, type, context);\n            }\n\n            @Override\n            protected Schema processAsId(String propertyName, AnnotatedType type,\n                                         ModelConverterContext context, ObjectMapper mapper) {\n                return new IntegerSchema();\n            }\n\n        }\n\n        private final class UUIDGeneratorWrapper extends GeneratorWrapper.Base<ObjectIdGenerators.UUIDGenerator> {\n\n            public UUIDGeneratorWrapper(Class<? extends ObjectIdGenerator> generator) {\n                super(generator);\n            }\n\n            @Override\n            protected Schema processAsProperty(String propertyName, AnnotatedType type,\n                                               ModelConverterContext context, ObjectMapper mapper) {\n                Schema id = new UUIDSchema();\n                return process(id, propertyName, type, context);\n            }\n\n            @Override\n            protected Schema processAsId(String propertyName, AnnotatedType type,\n                                         ModelConverterContext context, ObjectMapper mapper) {\n                return new UUIDSchema();\n            }\n\n        }\n\n        private final class NoneGeneratorWrapper extends GeneratorWrapper.Base<ObjectIdGenerators.None> {\n\n            public NoneGeneratorWrapper(Class<? extends ObjectIdGenerator> generator) {\n                super(generator);\n            }\n\n            // When generator = ObjectIdGenerators.None.class property should be processed as normal property.\n            @Override\n            protected Schema processAsProperty(String propertyName, AnnotatedType type,\n                                               ModelConverterContext context, ObjectMapper mapper) {\n                return null;\n            }\n\n            @Override\n            protected Schema processAsId(String propertyName, AnnotatedType type,\n                                         ModelConverterContext context, ObjectMapper mapper) {\n                return null;\n            }\n        }\n\n        private abstract class Base<T> {\n\n            private final Class<? extends ObjectIdGenerator> generator;\n\n            Base(Class<? extends ObjectIdGenerator> generator) {\n                this.generator = generator;\n            }\n\n            protected abstract Schema processAsProperty(String propertyName, AnnotatedType type,\n                                                        ModelConverterContext context, ObjectMapper mapper);\n\n            protected abstract Schema processAsId(String propertyName, AnnotatedType type,\n                                                  ModelConverterContext context, ObjectMapper mapper);\n        }\n\n        public Schema processJsonIdentity(AnnotatedType type, ModelConverterContext context,\n                                          ObjectMapper mapper, JsonIdentityInfo identityInfo,\n                                          JsonIdentityReference identityReference) {\n            final GeneratorWrapper.Base wrapper = identityInfo != null ? getWrapper(identityInfo.generator()) : null;\n            if (wrapper == null) {\n                return null;\n            }\n            if (identityReference != null && identityReference.alwaysAsId()) {\n                return wrapper.processAsId(identityInfo.property(), type, context, mapper);\n            } else {\n                return wrapper.processAsProperty(identityInfo.property(), type, context, mapper);\n            }\n        }\n\n        private GeneratorWrapper.Base getWrapper(Class<? extends ObjectIdGenerator> generator) {\n            if (ObjectIdGenerators.PropertyGenerator.class.isAssignableFrom(generator)) {\n                return new PropertyGeneratorWrapper(generator);\n            } else if (ObjectIdGenerators.IntSequenceGenerator.class.isAssignableFrom(generator)) {\n                return new IntGeneratorWrapper(generator);\n            } else if (ObjectIdGenerators.UUIDGenerator.class.isAssignableFrom(generator)) {\n                return new UUIDGeneratorWrapper(generator);\n            } else if (ObjectIdGenerators.None.class.isAssignableFrom(generator)) {\n                return new NoneGeneratorWrapper(generator);\n            }\n            return null;\n        }\n\n        protected Schema process(Schema id, String propertyName, AnnotatedType type,\n                                 ModelConverterContext context) {\n\n            type = removeJsonIdentityAnnotations(type);\n            Schema model = context.resolve(type);\n            if (model == null) {\n                model = resolve(type, context, null);\n            }\n            model.addProperties(propertyName, id);\n            Schema retSchema = openapi31 ? new JsonSchema() : new Schema();\n            return retSchema.$ref(StringUtils.isNotEmpty(model.get$ref())\n                    ? model.get$ref() : model.getName());\n        }\n\n        private AnnotatedType removeJsonIdentityAnnotations(AnnotatedType type) {\n            return new AnnotatedType()\n                    .jsonUnwrappedHandler(type.getJsonUnwrappedHandler())\n                    .jsonViewAnnotation(type.getJsonViewAnnotation())\n                    .name(type.getName())\n                    .parent(type.getParent())\n                    .resolveAsRef(false)\n                    .schemaProperty(type.isSchemaProperty())\n                    .skipOverride(type.isSkipOverride())\n                    .skipSchemaName(type.isSkipSchemaName())\n                    .type(type.getType())\n                    .skipJsonIdentity(true)\n                    .propertyName(type.getPropertyName())\n                    .components(type.getComponents())\n                    .ctxAnnotations(AnnotationsUtils.removeAnnotations(type.getCtxAnnotations(), JsonIdentityInfo.class, JsonIdentityReference.class));\n        }\n    }\n\n    protected boolean applyBeanValidatorAnnotations(BeanPropertyDefinition propDef, Schema property, Annotation[] annotations, Schema parent, boolean applyNotNullAnnotations) {\n        boolean updated = false;\n        updated = applyBeanValidatorAnnotations(property, annotations, parent, applyNotNullAnnotations);\n\n        if (Objects.nonNull(property.getItems())) {\n            Annotation[] genericTypeArgumentAnnotations = extractGenericTypeArgumentAnnotations(propDef).toArray(Annotation[]::new);\n            updated = applyBeanValidatorAnnotations(property.getItems(), genericTypeArgumentAnnotations, property, applyNotNullAnnotations) || updated;\n        }\n        return updated;\n    }\n\n    protected Configuration.GroupsValidationStrategy resolveGroupsValidationStrategy() {\n        return configuration == null ? Configuration.GroupsValidationStrategy.DEFAULT : configuration.getGroupsValidationStrategy();\n    }\n\n    protected Set<Class> resolveValidationInvocationGroups(Map<String, Annotation> annos) {\n        Set<Class> invocationGroups = new LinkedHashSet<>();\n        if (annos.containsKey(\"org.springframework.validation.annotation.Validated\")) {\n            Annotation validated = annos.get(\"org.springframework.validation.annotation.Validated\");\n            Method method = null;\n            try {\n                method = validated.getClass().getDeclaredMethod(\"value\");\n                Class[] groups = (Class[]) method.invoke(validated, null);\n                invocationGroups.addAll(Arrays.asList(groups));\n            } catch (Exception e) {\n                //\n            }\n        }\n        if (annos.containsKey(\"io.swagger.v3.oas.annotations.parameters.ValidatedParameter\")) {\n            Annotation validated = annos.get(\"io.swagger.v3.oas.annotations.parameters.ValidatedParameter\");\n            Method method = null;\n            try {\n                method = validated.getClass().getDeclaredMethod(\"value\");\n                Class[] groups = (Class[]) method.invoke(validated, null);\n                invocationGroups.addAll(Arrays.asList(groups));\n            } catch (Exception e) {\n                //\n            }\n        }\n        if (annos.containsKey(\"io.swagger.v3.oas.annotations.Parameter\")) {\n            Parameter parameter = (Parameter) annos.get(\"io.swagger.v3.oas.annotations.Parameter\");\n            invocationGroups.addAll(Arrays.asList(parameter.validationGroups()));\n        }\n        return invocationGroups;\n    }\n\n    protected Set<Annotation> resolveValidationInvocationAnnotations(Annotation[] annotations) {\n        Set<Annotation> validationInvocationAnnotations = new LinkedHashSet<>();\n        if (annotations == null) {\n            return validationInvocationAnnotations;\n        }\n        for (Annotation anno : annotations) {\n            if (anno.annotationType().getName().equals(\"org.springframework.validation.annotation.Validated\")) {\n                validationInvocationAnnotations.add(anno);\n            }\n            if (anno.annotationType().getName().equals(\"io.swagger.v3.oas.annotations.parameters.ValidatedParameter\")) {\n                validationInvocationAnnotations.add(anno);\n            }\n            if (anno.annotationType().getName().equals(\"io.swagger.v3.oas.annotations.Parameter\")) {\n                validationInvocationAnnotations.add(anno);\n            }\n        }\n        return validationInvocationAnnotations;\n    }\n\n    protected boolean applyBeanValidatorAnnotations(Schema property, Annotation[] annotations, Schema parent, boolean applyNotNullAnnotations) {\n        boolean modified = false;\n        Configuration.GroupsValidationStrategy strategy = resolveGroupsValidationStrategy();\n        if (strategy.equals(Configuration.GroupsValidationStrategy.ALWAYS)) {\n            return applyBeanValidatorAnnotationsNoGroups(property, annotations, parent, applyNotNullAnnotations);\n        } else if (strategy.equals(Configuration.GroupsValidationStrategy.NEVER)) {\n            return modified;\n        }\n        if (validatorProcessor != null &&\n                (validatorProcessor.getMode().equals(ValidatorProcessor.MODE.BEFORE) ||\n                        validatorProcessor.getMode().equals(ValidatorProcessor.MODE.REPLACE))) {\n            modified = validatorProcessor.applyBeanValidatorAnnotations(property, annotations, parent, applyNotNullAnnotations);\n            if (validatorProcessor.getMode().equals(ValidatorProcessor.MODE.REPLACE)) {\n                return modified;\n            }\n        }\n        Map<String, Annotation> annos = new HashMap<>();\n        if (annotations != null) {\n            for (Annotation anno : annotations) {\n                annos.put(anno.annotationType().getName(), anno);\n            }\n        }\n\n        if (parent != null &&\n                Arrays.stream(annotations).anyMatch(\n                        annotation -> annotation.annotationType().getSimpleName().equalsIgnoreCase(\"NonNull\"))) {\n            modified = updateRequiredItem(parent, property.getName()) || modified;\n\n        }\n\n        // see if we have Validated or other group-aware annotations\n        Set<Class> invocationGroups = null;\n        if (validatorProcessor != null) {\n            invocationGroups = validatorProcessor.resolveInvocationGroups(annos);\n        }\n        if (invocationGroups == null) {\n            invocationGroups = resolveValidationInvocationGroups(annos);\n        }\n        if (invocationGroups.isEmpty()) {\n            if (strategy.equals(Configuration.GroupsValidationStrategy.NEVER_IF_NO_CONTEXT)) {\n                return modified;\n            }\n        } else {\n            if (!(strategy.equals(Configuration.GroupsValidationStrategy.DEFAULT) || strategy.equals(Configuration.GroupsValidationStrategy.NEVER_IF_NO_CONTEXT))) {\n                return modified;\n            }\n        }\n        boolean acceptNoGroups = !strategy.equals(Configuration.GroupsValidationStrategy.NEVER_IF_NO_CONTEXT);\n        // if we get here, validate only if groups match.\n        if (parent != null && annos.containsKey(JAVAX_NOT_NULL) && applyNotNullAnnotations) {\n            NotNull anno = (NotNull) annos.get(JAVAX_NOT_NULL);\n            if (anno.groups().length == 0 && acceptNoGroups) {\n                ;\n                // no groups, so apply\n                modified = updateRequiredItem(parent, property.getName()) || modified;\n            } else {\n                // check if the groups match\n                for (Class group : anno.groups()) {\n                    if (invocationGroups.contains(group)) {\n                        modified = updateRequiredItem(parent, property.getName()) || modified;\n                    }\n                }\n            }\n        }\n\n        if (annos.containsKey(JAVAX_NOT_EMPTY)) {\n            NotEmpty anno = (NotEmpty) annos.get(JAVAX_NOT_EMPTY);\n            boolean apply = checkGroupValidation(anno.groups(), invocationGroups, acceptNoGroups);\n            if (apply) {\n                io.swagger.v3.oas.annotations.media.Schema ctxSchema = AnnotationsUtils.getSchemaAnnotation(annotations);\n                io.swagger.v3.oas.annotations.media.ArraySchema ctxArraySchema = AnnotationsUtils.getArraySchemaAnnotation(annotations);\n                modified = ValidationAnnotationsUtils.applyNotEmptyConstraint(property, ctxSchema, ctxArraySchema) || modified;\n                if (applyNotNullAnnotations) {\n                    modified = updateRequiredItem(parent, property.getName()) || modified;\n                }\n            }\n        }\n\n        if (annos.containsKey(JAVAX_NOT_BLANK)) {\n            NotBlank anno = (NotBlank) annos.get(JAVAX_NOT_BLANK);\n            boolean apply = checkGroupValidation(anno.groups(), invocationGroups, acceptNoGroups);\n            if (apply) {\n                io.swagger.v3.oas.annotations.media.Schema ctxSchema = AnnotationsUtils.getSchemaAnnotation(annotations);\n                modified = ValidationAnnotationsUtils.applyNotBlankConstraint(property, ctxSchema) || modified;\n                if (applyNotNullAnnotations) {\n                    modified = updateRequiredItem(parent, property.getName()) || modified;\n                }\n            }\n        }\n        if (annos.containsKey(JAVAX_MIN)) {\n            Min anno = (Min) annos.get(JAVAX_MIN);\n            boolean apply = checkGroupValidation(anno.groups(), invocationGroups, acceptNoGroups);\n            if (apply) {\n                modified = ValidationAnnotationsUtils.applyMinConstraint(property, anno) || modified;\n            }\n        }\n        if (annos.containsKey(JAVAX_MAX)) {\n            Max anno = (Max) annos.get(JAVAX_MAX);\n            boolean apply = checkGroupValidation(anno.groups(), invocationGroups, acceptNoGroups);\n            if (apply) {\n                modified = ValidationAnnotationsUtils.applyMaxConstraint(property, anno) || modified;\n            }\n        }\n        if (annos.containsKey(JAVAX_SIZE)) {\n            Size anno = (Size) annos.get(JAVAX_SIZE);\n            boolean apply = checkGroupValidation(anno.groups(), invocationGroups, acceptNoGroups);\n            if (apply) {\n                modified = ValidationAnnotationsUtils.applySizeConstraint(property, anno) || modified;\n            }\n        }\n        if (annos.containsKey(JAVAX_DECIMAL_MIN)) {\n            DecimalMin min = (DecimalMin) annos.get(JAVAX_DECIMAL_MIN);\n            boolean apply = checkGroupValidation(min.groups(), invocationGroups, acceptNoGroups);\n            if (apply) {\n                modified = ValidationAnnotationsUtils.applyDecimalMinConstraint(property, min) || modified;\n            }\n        }\n        if (annos.containsKey(JAVAX_DECIMAL_MAX)) {\n            DecimalMax max = (DecimalMax) annos.get(JAVAX_DECIMAL_MAX);\n            boolean apply = checkGroupValidation(max.groups(), invocationGroups, acceptNoGroups);\n            if (apply) {\n                modified = ValidationAnnotationsUtils.applyDecimalMaxConstraint(property, max) || modified;\n            }\n        }\n        if (annos.containsKey(JAVAX_PATTERN)) {\n            Pattern pattern = (Pattern) annos.get(JAVAX_PATTERN);\n            boolean apply = checkGroupValidation(pattern.groups(), invocationGroups, acceptNoGroups);\n            if (apply) {\n                modified = ValidationAnnotationsUtils.applyPatternConstraint(property, pattern) || modified;\n            }\n        }\n        if (annos.containsKey(JAVAX_EMAIL)) {\n            Email email = (Email) annos.get(JAVAX_EMAIL);\n            boolean apply = checkGroupValidation(email.groups(), invocationGroups, acceptNoGroups);\n            if (apply) {\n                modified = ValidationAnnotationsUtils.applyEmailConstraint(property, email) || modified;\n            }\n        }\n        if (validatorProcessor != null && validatorProcessor.getMode().equals(ValidatorProcessor.MODE.AFTER)) {\n            modified = validatorProcessor.applyBeanValidatorAnnotations(property, annotations, parent, applyNotNullAnnotations) || modified;\n        }\n        return modified;\n    }\n\n    protected boolean checkGroupValidation(Class[] groups, Set<Class> invocationGroups, boolean acceptNoGroups) {\n        if (groups.length == 0) {\n            return acceptNoGroups;\n        } else {\n            for (Class group : groups) {\n                if (invocationGroups.contains(group)) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n\n    protected boolean applyBeanValidatorAnnotationsNoGroups(Schema property, Annotation[] annotations, Schema parent, boolean applyNotNullAnnotations) {\n        Map<String, Annotation> annos = new HashMap<>();\n        boolean modified = false;\n        if (annotations != null) {\n            for (Annotation anno : annotations) {\n                annos.put(anno.annotationType().getName(), anno);\n            }\n        }\n        if (parent != null && annotations != null && applyNotNullAnnotations) {\n            boolean requiredItem = Arrays.stream(annotations).anyMatch(annotation ->\n                    NOT_NULL_ANNOTATIONS.contains(annotation.annotationType().getSimpleName())\n            );\n            if (requiredItem) {\n                modified = updateRequiredItem(parent, property.getName());\n            }\n        }\n        if (annos.containsKey(JAVAX_MIN)) {\n            Min min = (Min) annos.get(JAVAX_MIN);\n            modified = ValidationAnnotationsUtils.applyMinConstraint(property, min) || modified;\n        }\n        if (annos.containsKey(JAVAX_MAX)) {\n            Max max = (Max) annos.get(JAVAX_MAX);\n            modified = ValidationAnnotationsUtils.applyMaxConstraint(property, max) || modified;\n        }\n        if (annos.containsKey(JAVAX_SIZE)) {\n            Size size = (Size) annos.get(JAVAX_SIZE);\n            modified = ValidationAnnotationsUtils.applySizeConstraint(property, size) || modified;\n        }\n        if (annos.containsKey(JAVAX_DECIMAL_MIN)) {\n            DecimalMin min = (DecimalMin) annos.get(JAVAX_DECIMAL_MIN);\n            modified = ValidationAnnotationsUtils.applyDecimalMinConstraint(property, min) || modified;\n        }\n        if (annos.containsKey(JAVAX_DECIMAL_MAX)) {\n            DecimalMax max = (DecimalMax) annos.get(JAVAX_DECIMAL_MAX);\n            modified = ValidationAnnotationsUtils.applyDecimalMaxConstraint(property, max) || modified;\n        }\n        if (annos.containsKey(JAVAX_PATTERN)) {\n            Pattern pattern = (Pattern) annos.get(JAVAX_PATTERN);\n            modified = ValidationAnnotationsUtils.applyPatternConstraint(property, pattern) || modified;\n        }\n        if (annos.containsKey(JAVAX_EMAIL)) {\n            Email pattern = (Email) annos.get(JAVAX_EMAIL);\n            modified = ValidationAnnotationsUtils.applyEmailConstraint(property, pattern) || modified;\n        }\n        return modified;\n    }\n\n    private boolean resolveSubtypes(Schema model, BeanDescription bean, ModelConverterContext context, JsonView jsonViewAnnotation) {\n        final List<NamedType> types = _intr().findSubtypes(bean.getClassInfo());\n        if (types == null) {\n            return false;\n        }\n\n        /**\n         * Remove the current class from the child classes. This happens if @JsonSubTypes references\n         * the annotated class as a subtype.\n         */\n        removeSelfFromSubTypes(types, bean);\n\n        /**\n         * As the introspector will find @JsonSubTypes for a child class that are present on its super classes, the\n         * code segment below will also run the introspector on the parent class, and then remove any sub-types that are\n         * found for the parent from the sub-types found for the child. The same logic all applies to implemented\n         * interfaces, and is accounted for below.\n         */\n        removeSuperClassAndInterfaceSubTypes(types, bean);\n\n        int count = 0;\n        final Class<?> beanClass = bean.getClassInfo().getAnnotated();\n        for (NamedType subtype : types) {\n            final Class<?> subtypeType = subtype.getType();\n            if (!beanClass.isAssignableFrom(subtypeType)) {\n                continue;\n            }\n\n            final Schema subtypeModel = context.resolve(new AnnotatedType()\n                    .type(subtypeType)\n                    .jsonViewAnnotation(jsonViewAnnotation)\n                    .subtype(true));\n\n            if (StringUtils.isBlank(subtypeModel.getName()) ||\n                    subtypeModel.getName().equals(model.getName())) {\n                subtypeModel.setName(_typeNameResolver.nameForType(_mapper.constructType(subtypeType),\n                        TypeNameResolver.Options.SKIP_API_MODEL));\n            }\n\n            // here schema could be not composed, but we want it to be composed, doing same work as done\n            // in resolve method??\n\n            ComposedSchema composedSchema = null;\n            if (!(subtypeModel instanceof ComposedSchema)) {\n                // create composed schema\n                composedSchema = ComposedSchema.from(subtypeModel);\n            } else {\n                composedSchema = (ComposedSchema) subtypeModel;\n            }\n            Schema refSchema = openapi31 ? new JsonSchema() : new Schema();\n            refSchema.$ref(Components.COMPONENTS_SCHEMAS_REF + model.getName());\n            // allOf could have already being added during type resolving when @Schema(allOf..) is declared\n            if (composedSchema.getAllOf() == null || !composedSchema.getAllOf().contains(refSchema)) {\n                composedSchema.addAllOfItem(refSchema);\n            }\n            removeParentProperties(composedSchema, model);\n            if (!composedModelPropertiesAsSibling) {\n                if (composedSchema.getAllOf() != null && !composedSchema.getAllOf().isEmpty()) {\n                    if (composedSchema.getProperties() != null && !composedSchema.getProperties().isEmpty()) {\n                        Schema propSchema = openapi31 ? new JsonSchema().typesItem(\"object\") : new ObjectSchema();\n                        propSchema.properties(composedSchema.getProperties());\n                        composedSchema.setProperties(null);\n                        composedSchema.addAllOfItem(propSchema);\n                    }\n                }\n            }\n\n            // replace previous schema..\n            Class<?> currentType = subtype.getType();\n            if (StringUtils.isNotBlank(composedSchema.getName())) {\n                context.defineModel(composedSchema.getName(), composedSchema, new AnnotatedType().type(currentType), null);\n            }\n\n        }\n        return count != 0;\n    }\n\n    private void removeSelfFromSubTypes(List<NamedType> types, BeanDescription bean) {\n        Class<?> beanClass = bean.getType().getRawClass();\n        types.removeIf(type -> beanClass.equals(type.getType()));\n    }\n\n    private void removeSuperClassAndInterfaceSubTypes(List<NamedType> types, BeanDescription bean) {\n        Class<?> beanClass = bean.getType().getRawClass();\n        Class<?> superClass = beanClass.getSuperclass();\n        if (superClass != null && !superClass.equals(Object.class)) {\n            removeSuperSubTypes(types, superClass);\n        }\n        if (!types.isEmpty()) {\n            Class<?>[] superInterfaces = beanClass.getInterfaces();\n            for (Class<?> superInterface : superInterfaces) {\n                removeSuperSubTypes(types, superInterface);\n                if (types.isEmpty()) {\n                    break;\n                }\n            }\n        }\n    }\n\n    private void removeSuperSubTypes(List<NamedType> resultTypes, Class<?> superClass) {\n        JavaType superType = _mapper.constructType(superClass);\n        BeanDescription superBean = _mapper.getSerializationConfig().introspect(superType);\n        final List<NamedType> superTypes = _intr().findSubtypes(superBean.getClassInfo());\n        if (superTypes != null) {\n            resultTypes.removeAll(superTypes);\n        }\n    }\n\n    private void removeParentProperties(Schema child, Schema parent) {\n        final Map<String, Schema> baseProps = parent.getProperties();\n        final Map<String, Schema> subtypeProps = child.getProperties();\n        if (baseProps != null && subtypeProps != null) {\n            for (Map.Entry<String, Schema> entry : baseProps.entrySet()) {\n                if (entry.getValue().equals(subtypeProps.get(entry.getKey()))) {\n                    subtypeProps.remove(entry.getKey());\n                }\n            }\n        }\n        if (subtypeProps == null || subtypeProps.isEmpty()) {\n            child.setProperties(null);\n        }\n    }\n\n    protected List<Class<?>> getComposedSchemaReferencedClasses(Class<?> clazz, Annotation[] ctxAnnotations, io.swagger.v3.oas.annotations.media.Schema schemaAnnotation) {\n\n        if (schemaAnnotation != null) {\n            Class<?>[] allOf = schemaAnnotation.allOf();\n            Class<?>[] anyOf = schemaAnnotation.anyOf();\n            Class<?>[] oneOf = schemaAnnotation.oneOf();\n\n            // try to read all of them anyway and resolve?\n            List<Class<?>> parentClasses = Stream.of(allOf, anyOf, oneOf)\n                    .flatMap(Stream::of)\n                    .distinct()\n                    .filter(c -> !this.shouldIgnoreClass(c))\n                    .filter(c -> !(c.equals(Void.class)))\n                    .collect(Collectors.toList());\n\n            if (!parentClasses.isEmpty()) {\n                return parentClasses;\n            }\n        }\n        return null;\n    }\n\n    protected String resolveDescription(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && !\"\".equals(schema.description())) {\n            return schema.description();\n        }\n        return null;\n    }\n\n    protected String resolveTitle(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && StringUtils.isNotBlank(schema.title())) {\n            return schema.title();\n        }\n        return null;\n    }\n\n    protected String resolveFormat(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && StringUtils.isNotBlank(schema.format())) {\n            return schema.format();\n        }\n        return null;\n    }\n\n    protected Map<String, Schema> resolvePatternProperties(JavaType a, Annotation[] annotations, ModelConverterContext context) {\n\n        final Map<String, PatternProperty> propList = new LinkedHashMap<>();\n\n        PatternProperties props = a.getRawClass().getAnnotation(PatternProperties.class);\n        if (props != null && props.value().length > 0) {\n            for (PatternProperty prop : props.value()) {\n                propList.put(prop.regex(), prop);\n            }\n        }\n        PatternProperty singleProp = a.getRawClass().getAnnotation(PatternProperty.class);\n        if (singleProp != null) {\n            propList.put(singleProp.regex(), singleProp);\n        }\n        props = AnnotationsUtils.getAnnotation(PatternProperties.class, annotations);\n        if (props != null && props.value().length > 0) {\n            for (PatternProperty prop : props.value()) {\n                propList.put(prop.regex(), prop);\n            }\n        }\n        singleProp = AnnotationsUtils.getAnnotation(PatternProperty.class, annotations);\n        if (singleProp != null) {\n            propList.put(singleProp.regex(), singleProp);\n        }\n\n        if (propList.isEmpty()) {\n            return null;\n        }\n\n        Map<String, Schema> patternProperties = new LinkedHashMap<>();\n\n        for (PatternProperty prop : propList.values()) {\n            String key = prop.regex();\n            if (StringUtils.isBlank(key)) {\n                continue;\n            }\n            Annotation[] propAnnotations = new Annotation[]{prop.schema(), prop.array()};\n            AnnotatedType propType = new AnnotatedType()\n                    .type(String.class)\n                    .ctxAnnotations(propAnnotations)\n                    .resolveAsRef(true);\n            Schema resolvedPropSchema = context.resolve(propType);\n            if (resolvedPropSchema != null) {\n                patternProperties.put(key, resolvedPropSchema);\n            }\n        }\n        return patternProperties;\n    }\n\n    protected Map<String, Schema> resolveSchemaProperties(JavaType a, Annotation[] annotations, ModelConverterContext context) {\n\n        final Map<String, SchemaProperty> propList = new LinkedHashMap<>();\n\n        SchemaProperties props = a.getRawClass().getAnnotation(SchemaProperties.class);\n        if (props != null && props.value().length > 0) {\n            for (SchemaProperty prop : props.value()) {\n                propList.put(prop.name(), prop);\n            }\n        }\n        SchemaProperty singleProp = a.getRawClass().getAnnotation(SchemaProperty.class);\n        if (singleProp != null) {\n            propList.put(singleProp.name(), singleProp);\n        }\n        props = AnnotationsUtils.getAnnotation(SchemaProperties.class, annotations);\n        if (props != null && props.value().length > 0) {\n            for (SchemaProperty prop : props.value()) {\n                propList.put(prop.name(), prop);\n            }\n        }\n        singleProp = AnnotationsUtils.getAnnotation(SchemaProperty.class, annotations);\n        if (singleProp != null) {\n            propList.put(singleProp.name(), singleProp);\n        }\n\n        if (propList.isEmpty()) {\n            return null;\n        }\n\n        Map<String, Schema> schemaProperties = new LinkedHashMap<>();\n\n        for (SchemaProperty prop : propList.values()) {\n            String key = prop.name();\n            if (StringUtils.isBlank(key)) {\n                continue;\n            }\n            Annotation[] propAnnotations = new Annotation[]{prop.schema(), prop.array()};\n            AnnotatedType propType = new AnnotatedType()\n                    .type(String.class)\n                    .ctxAnnotations(propAnnotations)\n                    .resolveAsRef(true);\n            Schema resolvedPropSchema = context.resolve(propType);\n            if (resolvedPropSchema != null) {\n                schemaProperties.put(key, resolvedPropSchema);\n            }\n        }\n        return schemaProperties;\n    }\n\n    protected Map<String, Schema> resolveDependentSchemas(JavaType a, Annotation[] annotations, ModelConverterContext context, Components components, JsonView jsonViewAnnotation, boolean openapi31) {\n        final Map<String, DependentSchema> dependentSchemaMap = new LinkedHashMap<>();\n\n        DependentSchemas dependentSchemasAnnotation = a.getRawClass().getAnnotation(DependentSchemas.class);\n        if (dependentSchemasAnnotation != null && dependentSchemasAnnotation.value().length > 0) {\n            for (DependentSchema dependentSchemaAnnotation : dependentSchemasAnnotation.value()) {\n                dependentSchemaMap.put(dependentSchemaAnnotation.name(), dependentSchemaAnnotation);\n            }\n        }\n\n        DependentSchema singleDependentSchema = a.getRawClass().getAnnotation(DependentSchema.class);\n        if (singleDependentSchema != null) {\n            dependentSchemaMap.put(singleDependentSchema.name(), singleDependentSchema);\n        }\n\n        dependentSchemasAnnotation = AnnotationsUtils.getAnnotation(DependentSchemas.class, annotations);\n        if (dependentSchemasAnnotation != null && dependentSchemasAnnotation.value().length > 0) {\n            for (DependentSchema dependentSchemaAnnotation : dependentSchemasAnnotation.value()) {\n                dependentSchemaMap.put(dependentSchemaAnnotation.name(), dependentSchemaAnnotation);\n            }\n        }\n\n        singleDependentSchema = AnnotationsUtils.getAnnotation(DependentSchema.class, annotations);\n        if (singleDependentSchema != null) {\n            dependentSchemaMap.put(singleDependentSchema.name(), singleDependentSchema);\n        }\n\n        if (dependentSchemaMap.isEmpty()) {\n            return null;\n        }\n\n        Map<String, Schema> dependentSchemas = new LinkedHashMap<>();\n\n        for (DependentSchema dependentSchemaAnnotation : dependentSchemaMap.values()) {\n            String name = dependentSchemaAnnotation.name();\n            if (StringUtils.isBlank(name)) {\n                continue;\n            }\n            Annotation[] propAnnotations = new Annotation[]{dependentSchemaAnnotation.schema(), dependentSchemaAnnotation.array()};\n            Schema existingSchema = null;\n            Optional<Schema> resolvedPropSchema = AnnotationsUtils.getSchemaFromAnnotation(dependentSchemaAnnotation.schema(), components, jsonViewAnnotation, openapi31, null, Schema.SchemaResolution.DEFAULT, context);\n            if (resolvedPropSchema.isPresent()) {\n                existingSchema = resolvedPropSchema.get();\n                dependentSchemas.put(name, existingSchema);\n            }\n            resolvedPropSchema = AnnotationsUtils.getArraySchema(dependentSchemaAnnotation.array(), components, jsonViewAnnotation, openapi31, existingSchema);\n            if (resolvedPropSchema.isPresent()) {\n                dependentSchemas.put(name, resolvedPropSchema.get());\n            }\n        }\n\n        return dependentSchemas;\n    }\n\n    protected Object resolveDefaultValue(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && !DEFAULT_SENTINEL.equals(schema.defaultValue())) {\n                try {\n                    ObjectMapper mapper = ObjectMapperFactory.buildStrictGenericObjectMapper();\n                    JsonNode node = mapper.readTree(schema.defaultValue());\n                    // Only return null for \"null\" string when nullable=true\n                    if (node.isNull()) {\n                        if (schema.nullable()) {\n                            return null;\n                        } else {\n                            // When nullable=false, treat \"null\" as literal string\n                            return schema.defaultValue();\n                        }\n                    }\n                    return node;\n                } catch (IOException e) {\n                    return schema.defaultValue();\n                }\n        }\n        if (a == null) {\n            return null;\n        }\n        XmlElement elem = a.getAnnotation(XmlElement.class);\n        if (elem == null) {\n            if (annotations != null) {\n                for (Annotation ann : annotations) {\n                    if (ann instanceof XmlElement) {\n                        elem = (XmlElement) ann;\n                        break;\n                    }\n                }\n            }\n        }\n        if (elem != null) {\n            if (!elem.defaultValue().isEmpty() && !\"\\u0000\".equals(elem.defaultValue())) {\n                return elem.defaultValue();\n            }\n        }\n        return null;\n    }\n\n    protected Object resolveExample(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n\n        if (schema != null) {\n            if (!schema.example().isEmpty()) {\n                try {\n                    ObjectMapper mapper = ObjectMapperFactory.buildStrictGenericObjectMapper();\n                    JsonNode node = mapper.readTree(schema.example());\n                    if (node.isNull()) {\n                        if (schema.nullable()) {\n                            return null;\n                        } else {\n                            return schema.example();\n                        }\n                    }\n                    return node;\n                } catch (IOException e) {\n                    return schema.example();\n                }\n            }\n        }\n\n        return null;\n    }\n\n    /**\n     * Resolve the required mode for a schema based upon the schema annotation.\n     *\n     * @param schema A schema annotation\n     * @return The resolved required mode for the schema\n     */\n    protected io.swagger.v3.oas.annotations.media.Schema.RequiredMode resolveRequiredMode(io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && !schema.requiredMode().equals(io.swagger.v3.oas.annotations.media.Schema.RequiredMode.AUTO)) {\n            return schema.requiredMode();\n        } else if (schema != null && schema.required()) {\n            return io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;\n        }\n        return io.swagger.v3.oas.annotations.media.Schema.RequiredMode.AUTO;\n    }\n\n    /**\n     * Resolve the required mode for a schema.\n     * <p>\n     * This method is provided as an extension point for subclasses.\n     * The default implementation ignores the {@link JavaType} parameter\n     * and delegates to {@link #resolveRequiredMode(io.swagger.v3.oas.annotations.media.Schema)}.\n     *\n     * @param schema A schema annotation\n     * @param type The JavaType of the field property that the annotation is tied to\n     * @return The resolved required mode for the schema\n     */\n    protected io.swagger.v3.oas.annotations.media.Schema.RequiredMode resolveRequiredMode(\n            io.swagger.v3.oas.annotations.media.Schema schema, JavaType type) {\n        return resolveRequiredMode(schema);\n    }\n\n    protected io.swagger.v3.oas.annotations.media.Schema.AccessMode resolveAccessMode(BeanPropertyDefinition propDef, JavaType type, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && !schema.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.AUTO)) {\n            return schema.accessMode();\n        } else if (schema != null && schema.readOnly()) {\n            return io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY;\n        } else if (schema != null && schema.writeOnly()) {\n            return io.swagger.v3.oas.annotations.media.Schema.AccessMode.WRITE_ONLY;\n        }\n\n        if (propDef == null) {\n            return null;\n        }\n        JsonProperty.Access access = null;\n        if (propDef instanceof POJOPropertyBuilder) {\n            access = ((POJOPropertyBuilder) propDef).findAccess();\n        }\n        boolean hasGetter = propDef.hasGetter();\n        boolean hasSetter = propDef.hasSetter();\n        boolean hasConstructorParameter = propDef.hasConstructorParameter();\n        boolean hasField = propDef.hasField();\n\n        if (access == null) {\n            final BeanDescription beanDesc = _mapper.getDeserializationConfig().introspect(type);\n            List<BeanPropertyDefinition> properties = beanDesc.findProperties();\n            for (BeanPropertyDefinition prop : properties) {\n                if (StringUtils.isNotBlank(prop.getInternalName()) && prop.getInternalName().equals(propDef.getInternalName())) {\n                    if (prop instanceof POJOPropertyBuilder) {\n                        access = ((POJOPropertyBuilder) prop).findAccess();\n                    }\n                    hasGetter = hasGetter || prop.hasGetter();\n                    hasSetter = hasSetter || prop.hasSetter();\n                    hasConstructorParameter = hasConstructorParameter || prop.hasConstructorParameter();\n                    hasField = hasField || prop.hasField();\n                    break;\n                }\n            }\n        }\n        if (access == null) {\n            if (!hasGetter && !hasField && (hasConstructorParameter || hasSetter)) {\n                return io.swagger.v3.oas.annotations.media.Schema.AccessMode.WRITE_ONLY;\n            }\n            return null;\n        } else {\n            switch (access) {\n                case AUTO:\n                    return io.swagger.v3.oas.annotations.media.Schema.AccessMode.AUTO;\n                case READ_ONLY:\n                    return io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY;\n                case READ_WRITE:\n                    return io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_WRITE;\n                case WRITE_ONLY:\n                    return io.swagger.v3.oas.annotations.media.Schema.AccessMode.WRITE_ONLY;\n                default:\n                    return io.swagger.v3.oas.annotations.media.Schema.AccessMode.AUTO;\n            }\n        }\n    }\n\n    protected Boolean resolveReadOnly(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && schema.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY)) {\n            return true;\n        } else if (schema != null && schema.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.WRITE_ONLY)) {\n            return null;\n        } else if (schema != null && schema.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_WRITE)) {\n            return null;\n        } else if (schema != null && schema.readOnly()) {\n            return schema.readOnly();\n        }\n        return null;\n    }\n\n    protected Boolean resolveNullable(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && schema.nullable()) {\n            return true;\n        }\n        if (annotations != null) {\n            for (Annotation annotation : annotations) {\n                if (NULLABLE_ANNOTATIONS.contains(annotation.annotationType().getSimpleName())) {\n                    return true;\n                }\n            }\n        }\n        return null;\n    }\n\n    protected BigDecimal resolveMultipleOf(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && schema.multipleOf() != 0) {\n            return new BigDecimal(schema.multipleOf());\n        }\n        return null;\n    }\n\n    protected Integer resolveMaxLength(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && schema.maxLength() != Integer.MAX_VALUE && schema.maxLength() > 0) {\n            return schema.maxLength();\n        }\n        return null;\n    }\n\n    protected Integer resolveMinLength(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && schema.minLength() > 0) {\n            return schema.minLength();\n        }\n        return null;\n    }\n\n    protected BigDecimal resolveMinimum(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && NumberUtils.isCreatable(schema.minimum())) {\n            String filteredMinimum = schema.minimum().replace(Constants.COMMA, StringUtils.EMPTY);\n            return new BigDecimal(filteredMinimum);\n        }\n        return null;\n    }\n\n    protected BigDecimal resolveMaximum(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && NumberUtils.isCreatable(schema.maximum())) {\n            String filteredMaximum = schema.maximum().replace(Constants.COMMA, StringUtils.EMPTY);\n            return new BigDecimal(filteredMaximum);\n        }\n        return null;\n    }\n\n    protected Boolean resolveExclusiveMinimum(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && schema.exclusiveMinimum()) {\n            return schema.exclusiveMinimum();\n        }\n        return null;\n    }\n\n    protected Boolean resolveExclusiveMaximum(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && schema.exclusiveMaximum()) {\n            return schema.exclusiveMaximum();\n        }\n        return null;\n    }\n\n    protected String resolvePattern(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && StringUtils.isNotBlank(schema.pattern())) {\n            return schema.pattern();\n        }\n        return null;\n    }\n\n    protected Integer resolveMinProperties(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && schema.minProperties() > 0) {\n            return schema.minProperties();\n        }\n        return null;\n    }\n\n    protected Integer resolveMaxProperties(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && schema.maxProperties() > 0) {\n            return schema.maxProperties();\n        }\n        return null;\n    }\n\n    protected List<String> resolveRequiredProperties(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null &&\n                schema.requiredProperties() != null &&\n                schema.requiredProperties().length > 0 &&\n                StringUtils.isNotBlank(schema.requiredProperties()[0])) {\n\n            return Arrays.asList(schema.requiredProperties());\n        }\n        return null;\n    }\n\n    protected Boolean resolveWriteOnly(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && schema.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY)) {\n            return null;\n        } else if (schema != null && schema.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.WRITE_ONLY)) {\n            return true;\n        } else if (schema != null && schema.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_WRITE)) {\n            return null;\n        } else if (schema != null && schema.writeOnly()) {\n            return schema.writeOnly();\n        }\n        return null;\n    }\n\n    protected ExternalDocumentation resolveExternalDocumentation(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n\n        ExternalDocumentation external = null;\n        if (a != null) {\n            io.swagger.v3.oas.annotations.ExternalDocumentation externalDocumentation = a.getAnnotation(io.swagger.v3.oas.annotations.ExternalDocumentation.class);\n            external = resolveExternalDocumentation(externalDocumentation);\n        }\n\n        if (external == null) {\n            if (schema != null) {\n                external = resolveExternalDocumentation(schema.externalDocs());\n            }\n        }\n        return external;\n    }\n\n    protected ExternalDocumentation resolveExternalDocumentation(io.swagger.v3.oas.annotations.ExternalDocumentation externalDocumentation) {\n\n        if (externalDocumentation == null) {\n            return null;\n        }\n        boolean isEmpty = true;\n        ExternalDocumentation external = new ExternalDocumentation();\n        if (StringUtils.isNotBlank(externalDocumentation.description())) {\n            isEmpty = false;\n            external.setDescription(externalDocumentation.description());\n        }\n        if (StringUtils.isNotBlank(externalDocumentation.url())) {\n            isEmpty = false;\n            external.setUrl(externalDocumentation.url());\n        }\n        if (isEmpty) {\n            return null;\n        }\n        return external;\n    }\n\n    protected Boolean resolveDeprecated(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && schema.deprecated()) {\n            return schema.deprecated();\n        }\n        return null;\n    }\n\n    protected List<String> resolveAllowableValues(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null &&\n                schema.allowableValues() != null &&\n                schema.allowableValues().length > 0) {\n            return Arrays.asList(schema.allowableValues());\n        }\n        return null;\n    }\n\n    protected Map<String, Object> resolveExtensions(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null &&\n                schema.extensions() != null &&\n                schema.extensions().length > 0) {\n            boolean usePrefix = !openapi31;\n            return AnnotationsUtils.getExtensions(openapi31, usePrefix, schema.extensions());\n        }\n        return null;\n    }\n\n    protected void resolveDiscriminatorProperty(JavaType type, ModelConverterContext context, Schema model) {\n        // add JsonTypeInfo.property if not member of bean\n        JsonTypeInfo typeInfo = type.getRawClass().getDeclaredAnnotation(JsonTypeInfo.class);\n        if (typeInfo != null) {\n            String typeInfoProp = typeInfo.property();\n            if (StringUtils.isNotBlank(typeInfoProp)) {\n                Schema modelToUpdate = model;\n                if (StringUtils.isNotBlank(model.get$ref())) {\n                    modelToUpdate = context.getDefinedModels().get(model.get$ref().substring(SCHEMA_COMPONENT_PREFIX));\n                }\n                if (modelToUpdate.getProperties() == null || !modelToUpdate.getProperties().keySet().contains(typeInfoProp)) {\n                    Schema discriminatorSchema = openapi31 ? new JsonSchema().typesItem(\"string\").name(typeInfoProp) : new StringSchema().name(typeInfoProp);\n                    modelToUpdate.addProperties(typeInfoProp, discriminatorSchema);\n                    if (modelToUpdate.getRequired() == null || !modelToUpdate.getRequired().contains(typeInfoProp)) {\n                        modelToUpdate.addRequiredItem(typeInfoProp);\n                    }\n                }\n            }\n        }\n    }\n\n    /*\n     TODO partial implementation supporting WRAPPER_OBJECT with JsonTypeInfo.Id.CLASS and JsonTypeInfo.Id.NAME\n\n     Also note that JsonTypeInfo on interfaces are not considered as multiple interfaces might have conflicting\n     annotations, although Jackson seems to apply them if present on an interface\n     */\n    protected Schema resolveWrapping(JavaType type, ModelConverterContext context, Schema model) {\n        // add JsonTypeInfo.property if not member of bean\n        JsonTypeInfo typeInfo = type.getRawClass().getDeclaredAnnotation(JsonTypeInfo.class);\n        if (typeInfo != null) {\n            JsonTypeInfo.Id id = typeInfo.use();\n            JsonTypeInfo.As as = typeInfo.include();\n            if (JsonTypeInfo.As.WRAPPER_OBJECT.equals(as)) {\n                String name = model.getName();\n                if (JsonTypeInfo.Id.CLASS.equals(id)) {\n                    name = type.getRawClass().getName();\n                }\n                JsonTypeName typeName = type.getRawClass().getDeclaredAnnotation((JsonTypeName.class));\n                if (JsonTypeInfo.Id.NAME.equals(id) && typeName != null) {\n                    name = typeName.value();\n                }\n                if (JsonTypeInfo.Id.NAME.equals(id) && name == null) {\n                    name = type.getRawClass().getSimpleName();\n                }\n                Schema wrapperSchema = openapi31 ? new JsonSchema().typesItem(\"object\") : new ObjectSchema();\n                wrapperSchema.name(model.getName());\n                wrapperSchema.addProperties(name, model);\n                return wrapperSchema;\n            }\n        }\n        return model;\n    }\n\n    protected Discriminator resolveDiscriminator(JavaType type, ModelConverterContext context) {\n\n        io.swagger.v3.oas.annotations.media.Schema declaredSchemaAnnotation = AnnotationsUtils.getSchemaDeclaredAnnotation(type.getRawClass());\n\n        String disc = (declaredSchemaAnnotation == null) ? \"\" : declaredSchemaAnnotation.discriminatorProperty();\n\n        if (disc.isEmpty()) {\n            // longer method would involve AnnotationIntrospector.findTypeResolver(...) but:\n            JsonTypeInfo typeInfo = type.getRawClass().getDeclaredAnnotation(JsonTypeInfo.class);\n            if (typeInfo != null) {\n                disc = typeInfo.property();\n            }\n        }\n        if (!disc.isEmpty()) {\n            Discriminator discriminator = new Discriminator()\n                    .propertyName(disc);\n            if (declaredSchemaAnnotation != null) {\n                DiscriminatorMapping[] mappings = declaredSchemaAnnotation.discriminatorMapping();\n                if (mappings != null && mappings.length > 0) {\n                    for (DiscriminatorMapping mapping : mappings) {\n                        if (!mapping.value().isEmpty() && !mapping.schema().equals(Void.class)) {\n                            discriminator.mapping(mapping.value(), constructRef(context.resolve(new AnnotatedType().type(mapping.schema())).getName()));\n                        }\n                    }\n                }\n            }\n\n            return discriminator;\n        }\n        return null;\n    }\n\n    protected XML resolveXml(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        // if XmlRootElement annotation, construct a Xml object and attach it to the model\n        XmlRootElement rootAnnotation = null;\n        XmlSchema xmlSchema = null;\n        if (a != null) {\n            rootAnnotation = a.getAnnotation(XmlRootElement.class);\n            Class<?> rawType = a.getRawType();\n            if (rawType != null) {\n                Package aPackage = rawType.getPackage();\n                if (aPackage != null) {\n                    xmlSchema = aPackage.getAnnotation(XmlSchema.class);\n                }\n            }\n        }\n        if (rootAnnotation == null) {\n            if (annotations != null) {\n                for (Annotation ann : annotations) {\n                    if (ann instanceof XmlRootElement) {\n                        rootAnnotation = (XmlRootElement) ann;\n                        break;\n                    }\n                }\n            }\n        }\n\n        if (rootAnnotation != null && !\"\".equals(rootAnnotation.name()) && !JAXB_DEFAULT.equals(rootAnnotation.name())) {\n            XML xml = new XML().name(rootAnnotation.name());\n            if (xmlSchema != null && isNonTrivialXmlNamespace(xmlSchema.namespace())) {\n                xml.namespace(xmlSchema.namespace());\n            }\n            // Let XmlRootElement overwrite global XmlSchema namespace if present\n            if (isNonTrivialXmlNamespace(rootAnnotation.namespace())) {\n                xml.namespace(rootAnnotation.namespace());\n            }\n            return xml;\n        }\n        return null;\n    }\n\n    private boolean isNonTrivialXmlNamespace(String namespace) {\n        return namespace != null && !\"\".equals(namespace) && !JAXB_DEFAULT.equals(namespace);\n    }\n\n    protected Set<String> resolveIgnoredProperties(Annotations a, Annotation[] annotations) {\n\n        Set<String> propertiesToIgnore = new HashSet<>();\n        JsonIgnoreProperties ignoreProperties = a.get(JsonIgnoreProperties.class);\n        if (ignoreProperties != null) {\n            if (!ignoreProperties.allowGetters()) {\n                propertiesToIgnore.addAll(Arrays.asList(ignoreProperties.value()));\n            }\n        }\n        propertiesToIgnore.addAll(resolveIgnoredProperties(annotations));\n        return propertiesToIgnore;\n    }\n\n    protected Set<String> resolveIgnoredProperties(Annotation[] annotations) {\n\n        Set<String> propertiesToIgnore = new HashSet<>();\n        if (annotations != null) {\n            for (Annotation annotation : annotations) {\n                if (annotation instanceof JsonIgnoreProperties) {\n                    if (!((JsonIgnoreProperties) annotation).allowGetters()) {\n                        propertiesToIgnore.addAll(Arrays.asList(((JsonIgnoreProperties) annotation).value()));\n                        break;\n                    }\n                }\n            }\n        }\n        return propertiesToIgnore;\n    }\n\n    protected Integer resolveMinItems(AnnotatedType a, io.swagger.v3.oas.annotations.media.ArraySchema arraySchema) {\n        if (arraySchema != null) {\n            if (arraySchema.minItems() < Integer.MAX_VALUE) {\n                return arraySchema.minItems();\n            }\n        }\n        return null;\n    }\n\n    protected Integer resolveMaxItems(AnnotatedType a, io.swagger.v3.oas.annotations.media.ArraySchema arraySchema) {\n        if (arraySchema != null) {\n            if (arraySchema.maxItems() > 0) {\n                return arraySchema.maxItems();\n            }\n        }\n        return null;\n    }\n\n    protected Boolean resolveUniqueItems(AnnotatedType a, io.swagger.v3.oas.annotations.media.ArraySchema arraySchema) {\n        if (arraySchema != null) {\n            if (arraySchema.uniqueItems()) {\n                return arraySchema.uniqueItems();\n            }\n        }\n        return null;\n    }\n\n    protected Map<String, Object> resolveExtensions(AnnotatedType a, io.swagger.v3.oas.annotations.media.ArraySchema arraySchema) {\n        if (arraySchema != null &&\n                arraySchema.extensions() != null &&\n                arraySchema.extensions().length > 0) {\n            boolean usePrefix = !openapi31;\n            return AnnotationsUtils.getExtensions(openapi31, usePrefix, arraySchema.extensions());\n        }\n        return null;\n    }\n\n    protected Integer resolveMaxContains(AnnotatedType a, io.swagger.v3.oas.annotations.media.ArraySchema arraySchema) {\n        if (arraySchema != null && arraySchema.maxContains() > 0) {\n            return arraySchema.maxContains();\n        }\n        return null;\n    }\n\n    protected Integer resolveMinContains(AnnotatedType a, io.swagger.v3.oas.annotations.media.ArraySchema arraySchema) {\n        if (arraySchema != null && arraySchema.minContains() > 0) {\n            return arraySchema.minContains();\n        }\n        return null;\n    }\n\n    protected BigDecimal resolveExclusiveMaximumValue(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && schema.exclusiveMaximumValue() > 0) {\n            return new BigDecimal(schema.exclusiveMaximumValue());\n        }\n        return null;\n    }\n\n    protected BigDecimal resolveExclusiveMinimumValue(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && schema.exclusiveMinimumValue() > 0) {\n            return new BigDecimal(schema.exclusiveMinimumValue());\n        }\n        return null;\n    }\n\n    protected String resolveId(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && StringUtils.isNotBlank(schema.$id())) {\n            return schema.$id();\n        }\n        return null;\n    }\n\n    protected String resolve$schema(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && StringUtils.isNotBlank(schema.$schema())) {\n            return schema.$schema();\n        }\n        return null;\n    }\n\n    protected String resolve$anchor(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && StringUtils.isNotBlank(schema.$anchor())) {\n            return schema.$anchor();\n        }\n        return null;\n    }\n\n    protected String resolve$comment(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && StringUtils.isNotBlank(schema.$comment())) {\n            return schema.$comment();\n        }\n        return null;\n    }\n\n    protected String resolve$vocabulary(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && StringUtils.isNotBlank(schema.$vocabulary())) {\n            return schema.$vocabulary();\n        }\n        return null;\n    }\n\n    protected String resolve$dynamicAnchor(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && StringUtils.isNotBlank(schema.$dynamicAnchor())) {\n            return schema.$dynamicAnchor();\n        }\n        return null;\n    }\n\n    protected String resolve$dynamicRef(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && StringUtils.isNotBlank(schema.$dynamicRef())) {\n            return schema.$dynamicRef();\n        }\n        return null;\n    }\n\n    protected String resolveContentEncoding(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && StringUtils.isNotBlank(schema.contentEncoding())) {\n            return schema.contentEncoding();\n        }\n        return null;\n    }\n\n    protected String resolveContentMediaType(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && StringUtils.isNotBlank(schema.contentMediaType())) {\n            return schema.contentMediaType();\n        }\n        return null;\n    }\n\n    protected void resolveContains(AnnotatedType annotatedType, ArraySchema arraySchema, io.swagger.v3.oas.annotations.media.ArraySchema arraySchemaAnnotation) {\n        final io.swagger.v3.oas.annotations.media.Schema containsAnnotation = arraySchemaAnnotation.contains();\n        final Schema contains = openapi31 ? new JsonSchema() : new Schema();\n        if (containsAnnotation.types().length > 0) {\n            for (String type : containsAnnotation.types()) {\n                contains.addType(type);\n            }\n        }\n        arraySchema.setContains(contains);\n        resolveSchemaMembers(contains, null, null, containsAnnotation);\n\n        Integer maxContains = resolveMaxContains(annotatedType, arraySchemaAnnotation);\n        if (maxContains != null) {\n            arraySchema.setMaxContains(maxContains);\n        }\n        Integer minContains = resolveMinContains(annotatedType, arraySchemaAnnotation);\n        if (minContains != null) {\n            arraySchema.setMinContains(minContains);\n        }\n    }\n\n    protected void resolveUnevaluatedItems(AnnotatedType annotatedType, ArraySchema arraySchema, io.swagger.v3.oas.annotations.media.ArraySchema arraySchemaAnnotation) {\n        final io.swagger.v3.oas.annotations.media.Schema unevaluatedItemsAnnotation = arraySchemaAnnotation.unevaluatedItems();\n        final Schema unevaluatedItems = openapi31 ? new JsonSchema() : new Schema();\n        if (StringUtils.isNotBlank(unevaluatedItemsAnnotation.type())) {\n            unevaluatedItems.addType(unevaluatedItemsAnnotation.type());\n        }\n        if (unevaluatedItemsAnnotation.types().length > 0) {\n            for (String type : unevaluatedItemsAnnotation.types()) {\n                unevaluatedItems.addType(type);\n            }\n        }\n        arraySchema.setUnevaluatedItems(unevaluatedItems);\n        resolveSchemaMembers(unevaluatedItems, null, null, unevaluatedItemsAnnotation);\n    }\n\n    protected String resolveConst(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema != null && StringUtils.isNotBlank(schema._const())) {\n            return schema._const();\n        }\n        return null;\n    }\n\n    protected Map<String, List<String>> resolveDependentRequired(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema.dependentRequiredMap().length == 0) {\n            return null;\n        }\n        final Map<String, List<String>> dependentRequiredMap = new HashMap<>();\n        for (DependentRequired dependentRequired : schema.dependentRequiredMap()) {\n            final String name = dependentRequired.name();\n            if (dependentRequired.value().length == 0) {\n                continue;\n            }\n            final List<String> values = Arrays.asList(dependentRequired.value());\n            dependentRequiredMap.put(name, values);\n        }\n        return dependentRequiredMap;\n    }\n\n    protected Map<String, Schema> resolveDependentSchemas(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schemaAnnotation, AnnotatedType annotatedType, ModelConverterContext context, Iterator<ModelConverter> next) {\n        if (schemaAnnotation.dependentSchemas().length == 0) {\n            return null;\n        }\n        final Map<String, Schema> dependentSchemas = new HashMap<>();\n        for (StringToClassMapItem mapItem : schemaAnnotation.dependentSchemas()) {\n            final String key = mapItem.key();\n            if (mapItem.value() == null || Void.class.equals(mapItem.value())) {\n                continue;\n            }\n            final Schema schema = resolve(new AnnotatedType(mapItem.value()), context, next);\n            if (schema == null) {\n                continue;\n            }\n            dependentSchemas.put(key, schema);\n        }\n        return dependentSchemas;\n    }\n\n    protected Map<String, Schema> resolvePatternProperties(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schemaAnnotation, AnnotatedType annotatedType, ModelConverterContext context, Iterator<ModelConverter> next) {\n        if (schemaAnnotation.patternProperties().length == 0) {\n            return null;\n        }\n        final Map<String, Schema> patternPropertyMap = new HashMap<>();\n        for (StringToClassMapItem patternPropertyItem : schemaAnnotation.patternProperties()) {\n            final String key = patternPropertyItem.key();\n            if (Void.class.equals(patternPropertyItem.value())) {\n                continue;\n            }\n            final Schema schema = resolve(new AnnotatedType(patternPropertyItem.value()), context, next);\n            if (schema == null) {\n                continue;\n            }\n            patternPropertyMap.put(key, schema);\n        }\n        return patternPropertyMap;\n    }\n\n    protected Map<String, Schema> resolveProperties(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schemaAnnotation, AnnotatedType annotatedType, ModelConverterContext context, Iterator<ModelConverter> next) {\n        if (schemaAnnotation.properties().length == 0) {\n            return null;\n        }\n        final Map<String, Schema> propertyMap = new HashMap<>();\n        for (StringToClassMapItem propertyItem : schemaAnnotation.properties()) {\n            final String key = propertyItem.key();\n            if (Void.class.equals(propertyItem.value())) {\n                continue;\n            }\n            final Schema schema = resolve(new AnnotatedType(propertyItem.value()), context, next);\n            if (schema == null) {\n                continue;\n            }\n            propertyMap.put(key, schema);\n        }\n        return propertyMap;\n    }\n\n    protected void resolveSchemaMembers(Schema schema, AnnotatedType annotatedType) {\n        resolveSchemaMembers(schema, annotatedType, null, null);\n    }\n\n    protected void resolveSchemaMembers(Schema schema, AnnotatedType annotatedType, ModelConverterContext context, Iterator<ModelConverter> next) {\n        final JavaType type;\n        if (annotatedType.getType() instanceof JavaType) {\n            type = (JavaType) annotatedType.getType();\n        } else {\n            type = _mapper.constructType(annotatedType.getType());\n        }\n\n        final Annotation resolvedSchemaOrArrayAnnotation = AnnotationsUtils.mergeSchemaAnnotations(annotatedType.getCtxAnnotations(), type);\n        final io.swagger.v3.oas.annotations.media.Schema schemaAnnotation =\n                resolvedSchemaOrArrayAnnotation == null ?\n                        null :\n                        resolvedSchemaOrArrayAnnotation instanceof io.swagger.v3.oas.annotations.media.ArraySchema ?\n                                ((io.swagger.v3.oas.annotations.media.ArraySchema) resolvedSchemaOrArrayAnnotation).schema() :\n                                (io.swagger.v3.oas.annotations.media.Schema) resolvedSchemaOrArrayAnnotation;\n\n        final BeanDescription beanDesc = _mapper.getSerializationConfig().introspect(type);\n        Annotated a = beanDesc.getClassInfo();\n        Annotation[] annotations = annotatedType.getCtxAnnotations();\n        resolveSchemaMembers(schema, a, annotations, schemaAnnotation);\n        if (schemaAnnotation != null) {\n            if (schemaAnnotation.additionalProperties().equals(io.swagger.v3.oas.annotations.media.Schema.AdditionalPropertiesValue.TRUE)) {\n                schema.additionalProperties(true);\n            } else if (schemaAnnotation.additionalProperties().equals(io.swagger.v3.oas.annotations.media.Schema.AdditionalPropertiesValue.FALSE)) {\n                schema.additionalProperties(false);\n            } else {\n                if (!schemaAnnotation.additionalPropertiesSchema().equals(Void.class)) {\n                    Schema additionalPropertiesSchema = resolve(new AnnotatedType(schemaAnnotation.additionalPropertiesSchema()), context, next);\n                    additionalPropertiesSchema = buildRefSchemaIfObject(additionalPropertiesSchema, context);\n                    schema.additionalProperties(additionalPropertiesSchema);\n                }\n            }\n        }\n\n        if (openapi31 && schema != null && schemaAnnotation != null) {\n            if (!Void.class.equals(schemaAnnotation.contentSchema())) {\n                Schema contentSchema = resolve(new AnnotatedType(schemaAnnotation.contentSchema()), context, next);\n                contentSchema = buildRefSchemaIfObject(contentSchema, context);\n                schema.setContentSchema(contentSchema);\n            }\n            if (!Void.class.equals(schemaAnnotation.propertyNames())) {\n                Schema propertyNames = resolve(new AnnotatedType(schemaAnnotation.propertyNames()), context, next);\n                propertyNames = buildRefSchemaIfObject(propertyNames, context);\n                schema.setPropertyNames(propertyNames);\n            }\n            if (!Void.class.equals(schemaAnnotation._if())) {\n                Schema ifSchema = resolve(new AnnotatedType(schemaAnnotation._if()), context, next);\n                ifSchema = buildRefSchemaIfObject(ifSchema, context);\n                schema.setIf(ifSchema);\n            }\n            if (!Void.class.equals(schemaAnnotation._else())) {\n                Schema elseSchema = resolve(new AnnotatedType(schemaAnnotation._else()), context, next);\n                elseSchema = buildRefSchemaIfObject(elseSchema, context);\n                schema.setElse(elseSchema);\n            }\n            if (!Void.class.equals(schemaAnnotation.then())) {\n                Schema thenSchema = resolve(new AnnotatedType(schemaAnnotation.then()), context, next);\n                thenSchema = buildRefSchemaIfObject(thenSchema, context);\n                schema.setThen(thenSchema);\n            }\n            if (!Void.class.equals(schemaAnnotation.unevaluatedProperties())) {\n                Schema unevaluatedProperties = resolve(new AnnotatedType(schemaAnnotation.unevaluatedProperties()), context, next);\n                unevaluatedProperties = buildRefSchemaIfObject(unevaluatedProperties, context);\n                schema.setUnevaluatedProperties(unevaluatedProperties);\n            }\n\n            final Map<String, List<String>> dependentRequired = resolveDependentRequired(a, annotations, schemaAnnotation);\n            if (dependentRequired != null && !dependentRequired.isEmpty()) {\n                schema.setDependentRequired(dependentRequired);\n            }\n            final Map<String, Schema> dependentSchemas = resolveDependentSchemas(a, annotations, schemaAnnotation, annotatedType, context, next);\n            if (dependentSchemas != null) {\n                final Map<String, Schema> processedDependentSchemas = new LinkedHashMap<>();\n                for (String key : dependentSchemas.keySet()) {\n                    Schema val = dependentSchemas.get(key);\n                    processedDependentSchemas.put(key, buildRefSchemaIfObject(val, context));\n                }\n                if (processedDependentSchemas != null && !processedDependentSchemas.isEmpty()) {\n                    if (schema.getDependentSchemas() == null) {\n                        schema.setDependentSchemas(processedDependentSchemas);\n                    } else {\n                        schema.getDependentSchemas().putAll(processedDependentSchemas);\n                    }\n                }\n            }\n            final Map<String, Schema> patternProperties = resolvePatternProperties(a, annotations, schemaAnnotation, annotatedType, context, next);\n            if (patternProperties != null && !patternProperties.isEmpty()) {\n                for (String key : patternProperties.keySet()) {\n                    schema.addPatternProperty(key, buildRefSchemaIfObject(patternProperties.get(key), context));\n                }\n            }\n            final Map<String, Schema> properties = resolveProperties(a, annotations, schemaAnnotation, annotatedType, context, next);\n            if (properties != null && !properties.isEmpty()) {\n                for (String key : properties.keySet()) {\n                    schema.addProperty(key, buildRefSchemaIfObject(properties.get(key), context));\n                }\n            }\n        }\n    }\n\n    protected void resolveSchemaMembers(Schema schema, Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schemaAnnotation) {\n\n        String description = resolveDescription(a, annotations, schemaAnnotation);\n        if (StringUtils.isNotBlank(description)) {\n            schema.description(description);\n        }\n        String title = resolveTitle(a, annotations, schemaAnnotation);\n        if (StringUtils.isNotBlank(title)) {\n            schema.title(title);\n        }\n        String format = resolveFormat(a, annotations, schemaAnnotation);\n        if (StringUtils.isNotBlank(format) && StringUtils.isBlank(schema.getFormat())) {\n            schema.format(format);\n        }\n        Object defaultValue = resolveDefaultValue(a, annotations, schemaAnnotation);\n        if (defaultValue != null) {\n            schema.setDefault(defaultValue);\n        } else if (schemaAnnotation != null && \"null\".equals(schemaAnnotation.defaultValue().trim()) && schemaAnnotation.nullable()) {\n            // Explicitly set to null when defaultValue=\"null\" AND nullable=true\n            schema.setDefault(null);\n        }\n        Object example = resolveExample(a, annotations, schemaAnnotation);\n        if (example != null) {\n            schema.example(example);\n        } else if (schemaAnnotation != null && \"null\".equals(schemaAnnotation.example().trim()) && schemaAnnotation.nullable()) {\n            // Explicitly set to null when example=\"null\" AND nullable=true\n            schema.example(null);\n        }\n        Boolean readOnly = resolveReadOnly(a, annotations, schemaAnnotation);\n        if (readOnly != null) {\n            schema.readOnly(readOnly);\n        }\n        Boolean nullable = resolveNullable(a, annotations, schemaAnnotation);\n        if (nullable != null) {\n            schema.nullable(nullable);\n            if (openapi31 && nullable) {\n                schema.addType(\"null\");\n            }\n        }\n        BigDecimal multipleOf = resolveMultipleOf(a, annotations, schemaAnnotation);\n        if (multipleOf != null) {\n            schema.multipleOf(multipleOf);\n        }\n        Integer maxLength = resolveMaxLength(a, annotations, schemaAnnotation);\n        if (maxLength != null) {\n            schema.maxLength(maxLength);\n        }\n        Integer minLength = resolveMinLength(a, annotations, schemaAnnotation);\n        if (minLength != null) {\n            schema.minLength(minLength);\n        }\n        BigDecimal minimum = resolveMinimum(a, annotations, schemaAnnotation);\n        if (minimum != null) {\n            schema.minimum(minimum);\n        }\n        BigDecimal maximum = resolveMaximum(a, annotations, schemaAnnotation);\n        if (maximum != null) {\n            schema.maximum(maximum);\n        }\n        Boolean exclusiveMinimum = resolveExclusiveMinimum(a, annotations, schemaAnnotation);\n        if (exclusiveMinimum != null) {\n            schema.exclusiveMinimum(exclusiveMinimum);\n        }\n        Boolean exclusiveMaximum = resolveExclusiveMaximum(a, annotations, schemaAnnotation);\n        if (exclusiveMaximum != null) {\n            schema.exclusiveMaximum(exclusiveMaximum);\n        }\n        String pattern = resolvePattern(a, annotations, schemaAnnotation);\n        if (StringUtils.isNotBlank(pattern)) {\n            schema.pattern(pattern);\n        }\n        Integer minProperties = resolveMinProperties(a, annotations, schemaAnnotation);\n        if (minProperties != null) {\n            schema.minProperties(minProperties);\n        }\n        Integer maxProperties = resolveMaxProperties(a, annotations, schemaAnnotation);\n        if (maxProperties != null) {\n            schema.maxProperties(maxProperties);\n        }\n        List<String> requiredProperties = resolveRequiredProperties(a, annotations, schemaAnnotation);\n        if (requiredProperties != null) {\n            for (String prop : requiredProperties) {\n                addRequiredItem(schema, prop);\n            }\n        }\n        Boolean writeOnly = resolveWriteOnly(a, annotations, schemaAnnotation);\n        if (writeOnly != null) {\n            schema.writeOnly(writeOnly);\n        }\n        ExternalDocumentation externalDocs = resolveExternalDocumentation(a, annotations, schemaAnnotation);\n        if (externalDocs != null) {\n            schema.externalDocs(externalDocs);\n        }\n        Boolean deprecated = resolveDeprecated(a, annotations, schemaAnnotation);\n        if (deprecated != null) {\n            schema.deprecated(deprecated);\n        }\n        List<String> allowableValues = resolveAllowableValues(a, annotations, schemaAnnotation);\n        if (allowableValues != null) {\n            for (String prop : allowableValues) {\n                schema.addEnumItemObject(prop);\n            }\n        }\n\n        Map<String, Object> extensions = resolveExtensions(a, annotations, schemaAnnotation);\n        if (extensions != null) {\n            extensions.forEach(schema::addExtension);\n        }\n\n        if (openapi31 && schemaAnnotation != null) {\n            if (schemaAnnotation.types().length > 0) {\n                schema.setTypes(new LinkedHashSet<>(Arrays.asList(schemaAnnotation.types())));\n            }\n            BigDecimal exclusiveMaximumValue = resolveExclusiveMaximumValue(a, annotations, schemaAnnotation);\n            if (exclusiveMaximumValue != null) {\n                schema.setExclusiveMaximumValue(exclusiveMaximumValue);\n            }\n            BigDecimal exclusiveMinimumValue = resolveExclusiveMinimumValue(a, annotations, schemaAnnotation);\n            if (exclusiveMinimumValue != null) {\n                schema.setExclusiveMinimumValue(exclusiveMinimumValue);\n            }\n            String $id = resolveId(a, annotations, schemaAnnotation);\n            if ($id != null) {\n                schema.set$id($id);\n            }\n            String $schema = resolve$schema(a, annotations, schemaAnnotation);\n            if ($schema != null) {\n                schema.set$schema($schema);\n            }\n            String $anchor = resolve$anchor(a, annotations, schemaAnnotation);\n            if ($anchor != null) {\n                schema.set$anchor($anchor);\n            }\n            String $comment = resolve$comment(a, annotations, schemaAnnotation);\n            if ($comment != null) {\n                schema.set$comment($comment);\n            }\n            String $vocabulary = resolve$vocabulary(a, annotations, schemaAnnotation);\n            if ($vocabulary != null) {\n                schema.set$vocabulary($vocabulary);\n            }\n            String $dynamicAnchor = resolve$dynamicAnchor(a, annotations, schemaAnnotation);\n            if ($dynamicAnchor != null) {\n                schema.$dynamicAnchor($dynamicAnchor);\n            }\n            String $dynamicRef = resolve$dynamicRef(a, annotations, schemaAnnotation);\n            if ($dynamicRef != null) {\n                schema.$dynamicRef($dynamicRef);\n            }\n            String contentEncoding = resolveContentEncoding(a, annotations, schemaAnnotation);\n            if (contentEncoding != null) {\n                schema.setContentEncoding(contentEncoding);\n            }\n            String contentMediaType = resolveContentMediaType(a, annotations, schemaAnnotation);\n            if (contentMediaType != null) {\n                schema.setContentMediaType(contentMediaType);\n            }\n            if (schemaAnnotation.examples().length > 0) {\n                List<Object> parsedExamples = io.swagger.v3.core.util.AnnotationsUtils.parseExamplesArray(schemaAnnotation);\n                if (schema.getExamples() == null || schema.getExamples().isEmpty()) {\n                    schema.setExamples(parsedExamples);\n                } else {\n                    schema.getExamples().addAll(parsedExamples);\n                }\n            }\n            String _const = resolveConst(a, annotations, schemaAnnotation);\n            if (_const != null) {\n                schema.setConst(_const);\n            }\n        }\n    }\n\n    protected void addRequiredItem(Schema model, String propName) {\n        updateRequiredItem(model, propName);\n    }\n\n    protected boolean updateRequiredItem(Schema model, String propName) {\n        if (model == null || propName == null || StringUtils.isBlank(propName)) {\n            return false;\n        }\n        if (model.getRequired() == null || model.getRequired().isEmpty()) {\n            model.addRequiredItem(propName);\n            return true;\n        }\n        if (model.getRequired().stream().noneMatch(propName::equals)) {\n            model.addRequiredItem(propName);\n            return true;\n        }\n        return false;\n    }\n\n    protected boolean shouldIgnoreClass(Type type) {\n        if (type instanceof Class) {\n            Class<?> cls = (Class<?>) type;\n            if (cls.getName().equals(\"javax.ws.rs.Response\")) {\n                return true;\n            }\n        } else {\n            if (type instanceof com.fasterxml.jackson.core.type.ResolvedType) {\n                com.fasterxml.jackson.core.type.ResolvedType rt = (com.fasterxml.jackson.core.type.ResolvedType) type;\n                LOGGER.trace(\"Can't check class {}, {}\", type, rt.getRawClass().getName());\n                if (rt.getRawClass().equals(Class.class)) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n\n    private List<String> getIgnoredProperties(BeanDescription beanDescription) {\n        AnnotationIntrospector introspector = _mapper.getSerializationConfig().getAnnotationIntrospector();\n        JsonIgnoreProperties.Value v = introspector.findPropertyIgnorals(beanDescription.getClassInfo());\n        Set<String> ignored = null;\n        if (v != null) {\n            ignored = v.findIgnoredForSerialization();\n        }\n        return ignored == null ? Collections.emptyList() : new ArrayList<>(ignored);\n    }\n\n    /**\n     * Decorate the name based on the JsonView\n     */\n    protected String decorateModelName(AnnotatedType type, String originalName) {\n        if (StringUtils.isBlank(originalName)) {\n            return originalName;\n        }\n        String name = originalName;\n        if (type.getJsonViewAnnotation() != null && type.getJsonViewAnnotation().value().length > 0) {\n            String COMBINER = \"-or-\";\n            StringBuilder sb = new StringBuilder();\n            for (Class<?> view : type.getJsonViewAnnotation().value()) {\n                sb.append(view.getSimpleName()).append(COMBINER);\n            }\n            String suffix = sb.substring(0, sb.length() - COMBINER.length());\n            name = originalName + \"_\" + suffix;\n        }\n        return name;\n    }\n\n    protected boolean hiddenByJsonView(Annotation[] annotations,\n                                       AnnotatedType type) {\n        JsonView jsonView = type.getJsonViewAnnotation();\n        if (jsonView == null) {\n            return false;\n        }\n\n        Class<?>[] filters = jsonView.value();\n        boolean containsJsonViewAnnotation = !type.isIncludePropertiesWithoutJSONView();\n        for (Annotation ant : annotations) {\n            if (ant instanceof JsonView) {\n                containsJsonViewAnnotation = true;\n                Class<?>[] views = ((JsonView) ant).value();\n                for (Class<?> f : filters) {\n                    for (Class<?> v : views) {\n                        if (v == f || v.isAssignableFrom(f)) {\n                            return false;\n                        }\n                    }\n                }\n            }\n        }\n        return containsJsonViewAnnotation;\n    }\n\n    private void resolveArraySchema(AnnotatedType annotatedType, ArraySchema schema, io.swagger.v3.oas.annotations.media.ArraySchema resolvedArrayAnnotation) {\n        Integer minItems = resolveMinItems(annotatedType, resolvedArrayAnnotation);\n        if (minItems != null) {\n            schema.minItems(minItems);\n        }\n        Integer maxItems = resolveMaxItems(annotatedType, resolvedArrayAnnotation);\n        if (maxItems != null) {\n            schema.maxItems(maxItems);\n        }\n        Boolean uniqueItems = resolveUniqueItems(annotatedType, resolvedArrayAnnotation);\n        if (uniqueItems != null) {\n            schema.uniqueItems(uniqueItems);\n        }\n        Map<String, Object> extensions = resolveExtensions(annotatedType, resolvedArrayAnnotation);\n        if (extensions != null) {\n            schema.extensions(extensions);\n        }\n        if (resolvedArrayAnnotation != null) {\n            if (AnnotationsUtils.hasSchemaAnnotation(resolvedArrayAnnotation.arraySchema())) {\n                resolveSchemaMembers(schema, null, null, resolvedArrayAnnotation.arraySchema());\n            }\n            if (openapi31) {\n                if (AnnotationsUtils.hasSchemaAnnotation(resolvedArrayAnnotation.contains())) {\n                    resolveContains(annotatedType, schema, resolvedArrayAnnotation);\n                }\n                if (AnnotationsUtils.hasSchemaAnnotation(resolvedArrayAnnotation.unevaluatedItems())) {\n                    resolveUnevaluatedItems(annotatedType, schema, resolvedArrayAnnotation);\n                }\n                if (resolvedArrayAnnotation.prefixItems().length > 0) {\n                    for (io.swagger.v3.oas.annotations.media.Schema prefixItemAnnotation : resolvedArrayAnnotation.prefixItems()) {\n                        final Schema prefixItem = new JsonSchema();\n                        if (StringUtils.isNotBlank(prefixItemAnnotation.type())) {\n                            prefixItem.addType(prefixItemAnnotation.type());\n                        }\n                        resolveSchemaMembers(prefixItem, null, null, prefixItemAnnotation);\n                        schema.addPrefixItem(prefixItem);\n                    }\n                }\n                // TODO `ArraySchema.items` is deprecated, when removed, remove this block\n                if (schema.getItems() != null && AnnotationsUtils.hasSchemaAnnotation(resolvedArrayAnnotation.items())) {\n                    for (String type : resolvedArrayAnnotation.items().types()) {\n                        schema.getItems().addType(type);\n                    }\n                }\n                if (schema.getItems() != null && AnnotationsUtils.hasSchemaAnnotation(resolvedArrayAnnotation.schema())) {\n                    for (String type : resolvedArrayAnnotation.schema().types()) {\n                        schema.getItems().addType(type);\n                    }\n                }\n            }\n        }\n    }\n\n    public ModelResolver openapi31(boolean openapi31) {\n        this.openapi31 = openapi31;\n        return this;\n    }\n\n    public boolean isOpenapi31() {\n        return openapi31;\n    }\n\n    public void setOpenapi31(boolean openapi31) {\n        this.openapi31 = openapi31;\n    }\n\n    public ModelResolver configuration(Configuration configuration) {\n        this.setConfiguration(configuration);\n        return this;\n    }\n\n    public Configuration getConfiguration() {\n        return configuration;\n    }\n\n    public void setConfiguration(Configuration configuration) {\n        this.configuration = configuration;\n        if (configuration != null) {\n            if (configuration.isOpenAPI31() != null) {\n                this.openapi31(configuration.isOpenAPI31());\n            }\n            if (configuration.getSchemaResolution() != null) {\n                this.schemaResolution(configuration.getSchemaResolution());\n            }\n            // see if we have a processor\n            if (StringUtils.isNotBlank(configuration.getValidatorProcessorClass())) {\n                try {\n                    Class<?> processorClass = getClass().getClassLoader().loadClass(configuration.getValidatorProcessorClass());\n                    if (ValidatorProcessor.class.isAssignableFrom(processorClass)) {\n                        validatorProcessor = (ValidatorProcessor) processorClass.newInstance();\n                    }\n                } catch (Exception e) {\n                    LOGGER.error(\"Unable to load validator processor class: \" + configuration.getValidatorProcessorClass(), e);\n                }\n            }\n        }\n    }\n\n    protected boolean isObjectSchema(Schema schema) {\n        return SchemaTypeUtils.isObjectSchema(schema);\n    }\n\n    protected boolean isInferredObjectSchema(Schema schema) {\n        return ((schema.getProperties() != null && !schema.getProperties().isEmpty())\n            || (schema.getPatternProperties() != null && !schema.getPatternProperties().isEmpty())\n            || (schema.getAdditionalProperties() != null)\n            || (schema.getUnevaluatedProperties() != null)\n            || (schema.getRequired() != null && !schema.getRequired().isEmpty())\n            || (schema.getPropertyNames() != null)\n            || (schema.getDependentRequired() != null && !schema.getDependentRequired().isEmpty())\n            || (schema.getDependentSchemas() != null && !schema.getDependentSchemas().isEmpty())\n            || (schema.getMinProperties() != null && schema.getMinProperties() > 0)\n            || (schema.getMaxProperties() != null && schema.getMaxProperties() > 0));\n    }\n\n    protected boolean isArraySchema(Schema schema) {\n        return SchemaTypeUtils.isArraySchema(schema);\n    }\n\n    protected boolean isStringSchema(Schema schema) {\n        return SchemaTypeUtils.isStringSchema(schema);\n    }\n\n    protected boolean isNumberSchema(Schema schema) {\n        return SchemaTypeUtils.isNumberSchema(schema);\n    }\n\n    private AnnotatedMember invokeMethod(final BeanDescription beanDesc, String methodName) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {\n        Method m = BeanDescription.class.getMethod(methodName);\n        return (AnnotatedMember) m.invoke(beanDesc);\n    }\n\n    protected Schema buildRefSchemaIfObject(Schema schema, ModelConverterContext context) {\n        if (schema == null) {\n            return null;\n        }\n        Schema result = schema;\n        if (isObjectSchema(schema) && StringUtils.isNotBlank(schema.getName())) {\n            if (context.getDefinedModels().containsKey(schema.getName())) {\n                result = openapi31 ? new JsonSchema() : new Schema();\n                result.$ref(constructRef(schema.getName()));\n            }\n        }\n        return result;\n    }\n\n    protected boolean applySchemaResolution() {\n        return !openapi31 ||\n                (Boolean.parseBoolean(System.getProperty(Schema.APPLY_SCHEMA_RESOLUTION_PROPERTY, \"false\")) ||\n                        Boolean.parseBoolean(System.getenv(Schema.APPLY_SCHEMA_RESOLUTION_PROPERTY)));\n    }\n\n    private Optional<Schema> resolveArraySchemaWithCycleGuard(\n            io.swagger.v3.oas.annotations.media.ArraySchema ctxArraySchema,\n            AnnotatedType annotatedType,\n            boolean openapi31,\n            Schema<?> property) {\n        boolean processSchemaImplementation = !typesBeingResolved.contains(annotatedType);\n        Optional<Schema> reResolvedProperty;\n        if (processSchemaImplementation) {\n            typesBeingResolved.add(annotatedType);\n        } try {\n            reResolvedProperty = AnnotationsUtils.getArraySchema(ctxArraySchema, annotatedType.getComponents(), null,\n                    openapi31, property, processSchemaImplementation );\n        } finally {\n            if (processSchemaImplementation) {\n                    typesBeingResolved.remove(annotatedType);\n                }\n        }\n        return reResolvedProperty;\n    }\n\n    /**\n     * Checks if the given JavaType represents a java.util.stream.Stream\n     */\n    private boolean isStreamType(JavaType type) {\n        return type != null && \n               type.getRawClass() != null && \n               java.util.stream.Stream.class.isAssignableFrom(type.getRawClass());\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/PackageVersion.java",
    "content": "package io.swagger.v3.core.jackson;\n\nimport com.fasterxml.jackson.core.Version;\nimport com.fasterxml.jackson.core.Versioned;\nimport com.fasterxml.jackson.core.util.VersionUtil;\n\npublic final class PackageVersion implements Versioned {\n    public static final Version VERSION = VersionUtil.parseVersion(\n            \"0.5.1-SNAPSHOT\", \"io.swagger\", \"swagger-core\");\n\n    @Override\n    public Version version() {\n        return VERSION;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/PathsSerializer.java",
    "content": "package io.swagger.v3.core.jackson;\n\nimport com.fasterxml.jackson.core.JsonGenerator;\nimport com.fasterxml.jackson.databind.JsonSerializer;\nimport com.fasterxml.jackson.databind.SerializerProvider;\n\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.Paths;\n\nimport java.io.IOException;\nimport java.util.Map.Entry;\n\npublic class PathsSerializer extends JsonSerializer<Paths> {\n\n    @Override\n    public void serialize(\n            Paths value, JsonGenerator jgen, SerializerProvider provider)\n            throws IOException {\n\n        if (value != null && value.getExtensions() != null && !value.getExtensions().isEmpty()) {\n            jgen.writeStartObject();\n\n            if (!value.isEmpty()) {\n                for (Entry<String, PathItem> entry: value.entrySet()) {\n                    jgen.writeObjectField(entry.getKey() , entry.getValue());\n                }\n            }\n            for (Entry<String, Object> entry: value.getExtensions().entrySet()) {\n                jgen.writeObjectField(entry.getKey() , entry.getValue());\n            }\n            jgen.writeEndObject();\n        } else {\n            provider.defaultSerializeValue(value, jgen);\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/Schema31Serializer.java",
    "content": "package io.swagger.v3.core.jackson;\n\nimport com.fasterxml.jackson.core.JsonGenerator;\nimport com.fasterxml.jackson.databind.JsonMappingException;\nimport com.fasterxml.jackson.databind.JsonSerializer;\nimport com.fasterxml.jackson.databind.SerializerProvider;\nimport com.fasterxml.jackson.databind.ser.ResolvableSerializer;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.io.IOException;\n\npublic class Schema31Serializer extends JsonSerializer<Schema> implements ResolvableSerializer {\n\n    private JsonSerializer<Object> defaultSerializer;\n\n    public Schema31Serializer(JsonSerializer<Object> serializer) {\n        defaultSerializer = serializer;\n    }\n\n    @Override\n    public void resolve(SerializerProvider serializerProvider) throws JsonMappingException {\n        if (defaultSerializer instanceof ResolvableSerializer) {\n            ((ResolvableSerializer) defaultSerializer).resolve(serializerProvider);\n        }\n    }\n\n    @Override\n    public void serialize(\n            Schema value, JsonGenerator jgen, SerializerProvider provider)\n            throws IOException {\n\n        if (value.getBooleanSchemaValue() != null) {\n            jgen.writeBoolean(value.getBooleanSchemaValue());\n            return;\n        }\n        \n        boolean hasNullExample = value.getExampleSetFlag() && value.getExample() == null;\n        boolean hasNullDefault = value.getDefaultSetFlag() && value.getDefault() == null;\n        \n        if (hasNullExample || hasNullDefault) {\n            jgen.writeStartObject();\n            defaultSerializer.unwrappingSerializer(null).serialize(value, jgen, provider);\n            if (hasNullExample) {\n                jgen.writeNullField(\"example\");\n            }\n            if (hasNullDefault) {\n                jgen.writeNullField(\"default\");\n            }\n            jgen.writeEndObject();\n        } else {\n            defaultSerializer.serialize(value, jgen, provider);\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/SchemaSerializer.java",
    "content": "package io.swagger.v3.core.jackson;\n\nimport com.fasterxml.jackson.core.JsonGenerator;\nimport com.fasterxml.jackson.databind.JsonMappingException;\nimport com.fasterxml.jackson.databind.JsonSerializer;\nimport com.fasterxml.jackson.databind.SerializerProvider;\nimport com.fasterxml.jackson.databind.ser.ResolvableSerializer;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.apache.commons.lang3.StringUtils;\n\nimport java.io.IOException;\n\npublic class SchemaSerializer extends JsonSerializer<Schema> implements ResolvableSerializer {\n\n    private JsonSerializer<Object> defaultSerializer;\n\n    public SchemaSerializer(JsonSerializer<Object> serializer) {\n        defaultSerializer = serializer;\n    }\n\n    @Override\n    public void resolve(SerializerProvider serializerProvider) throws JsonMappingException {\n        if (defaultSerializer instanceof ResolvableSerializer) {\n            ((ResolvableSerializer) defaultSerializer).resolve(serializerProvider);\n        }\n    }\n\n    @Override\n    public void serialize(\n            Schema value, JsonGenerator jgen, SerializerProvider provider)\n            throws IOException {\n\n        if (StringUtils.isBlank(value.get$ref())) {\n\n            boolean hasNullExample = value.getExampleSetFlag() && value.getExample() == null;\n            boolean hasNullDefault = value.getDefaultSetFlag() && value.getDefault() == null;\n            \n            if (hasNullExample || hasNullDefault) {\n                jgen.writeStartObject();\n                defaultSerializer.unwrappingSerializer(null).serialize(value, jgen, provider);\n                if (hasNullExample) {\n                    jgen.writeNullField(\"example\");\n                }\n                if (hasNullDefault) {\n                    jgen.writeNullField(\"default\");\n                }\n                jgen.writeEndObject();\n            } else {\n                defaultSerializer.serialize(value, jgen, provider);\n            }\n\n        } else {\n            // handle ref schema serialization skipping all other props\n            jgen.writeStartObject();\n            jgen.writeStringField(\"$ref\", value.get$ref());\n            jgen.writeEndObject();\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/SwaggerAnnotationIntrospector.java",
    "content": "package io.swagger.v3.core.jackson;\n\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.core.Version;\nimport com.fasterxml.jackson.databind.AnnotationIntrospector;\nimport com.fasterxml.jackson.databind.introspect.Annotated;\nimport com.fasterxml.jackson.databind.introspect.AnnotatedClass;\nimport com.fasterxml.jackson.databind.introspect.AnnotatedMember;\nimport com.fasterxml.jackson.databind.jsontype.NamedType;\nimport io.swagger.v3.core.util.AnnotationsUtils;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\n\npublic class SwaggerAnnotationIntrospector extends AnnotationIntrospector {\n    private static final long serialVersionUID = 1L;\n\n    @Override\n    public Version version() {\n        return PackageVersion.VERSION;\n    }\n\n    @Override\n    public Boolean hasRequiredMarker(AnnotatedMember m) {\n        XmlElement elem = m.getAnnotation(XmlElement.class);\n        if (elem != null) {\n            if (elem.required()) {\n                return true;\n            }\n        }\n        JsonProperty jsonProperty = m.getAnnotation(JsonProperty.class);\n        if (jsonProperty != null) {\n            if (jsonProperty.required()) {\n                return true;\n            }\n        }\n        Schema ann = m.getAnnotation(Schema.class);\n        if (ann != null) {\n            if (ann.required()) {\n                return ann.required();\n            }\n        }\n        ArraySchema arraySchema = m.getAnnotation(ArraySchema.class);\n        if (arraySchema != null) {\n            if (arraySchema.arraySchema().required()) {\n                return arraySchema.arraySchema().required();\n            }\n            if (arraySchema.schema().required()) {\n                return arraySchema.schema().required();\n            }\n        }\n        return null;\n    }\n\n    @Override\n    public String findPropertyDescription(Annotated a) {\n        Schema model = a.getAnnotation(Schema.class);\n        if (model != null && !\"\".equals(model.description())) {\n            return model.description();\n        }\n\n        return null;\n    }\n\n    @Override\n    public List<NamedType> findSubtypes(Annotated a) {\n        Schema schema = a.getAnnotation(Schema.class);\n        if (schema == null) {\n            final ArraySchema arraySchema = a.getAnnotation(ArraySchema.class);\n            if (arraySchema != null) {\n                schema = arraySchema.schema();\n            }\n        }\n\n        if (AnnotationsUtils.hasSchemaAnnotation(schema)) {\n            final Class<?>[] classes = schema.subTypes();\n            final List<NamedType> names = new ArrayList<>(classes.length);\n            for (Class<?> subType : classes) {\n                names.add(new NamedType(subType));\n            }\n            if (!names.isEmpty()) {\n                return names;\n            }\n        }\n\n        return Collections.emptyList();\n    }\n\n    @Override\n    public String findTypeName(AnnotatedClass ac) {\n        io.swagger.v3.oas.annotations.media.Schema mp = AnnotationsUtils.getSchemaAnnotation(ac);\n        // allow override of name from annotation\n        if (mp != null && !mp.name().isEmpty()) {\n            return mp.name();\n        }\n\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/SwaggerModule.java",
    "content": "package io.swagger.v3.core.jackson;\n\nimport com.fasterxml.jackson.databind.module.SimpleModule;\n\npublic class SwaggerModule extends SimpleModule {\n    private static final long serialVersionUID = 1L;\n\n    public SwaggerModule() {\n        super(PackageVersion.VERSION);\n    }\n\n    @Override\n    public void setupModule(SetupContext context) {\n        super.setupModule(context);\n        context.insertAnnotationIntrospector(new SwaggerAnnotationIntrospector());\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/TypeNameResolver.java",
    "content": "package io.swagger.v3.core.jackson;\n\nimport com.fasterxml.jackson.databind.JavaType;\nimport io.swagger.v3.core.util.AnnotationsUtils;\nimport io.swagger.v3.core.util.PrimitiveType;\nimport org.apache.commons.lang3.StringUtils;\nimport org.apache.commons.lang3.text.WordUtils;\n\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.EnumSet;\nimport java.util.Set;\n\n/**\n * Helper class used for converting well-known (property) types into\n * Swagger type names.\n */\npublic class TypeNameResolver {\n    public static final TypeNameResolver std = new TypeNameResolver();\n    private boolean useFqn=false;\n\n    protected TypeNameResolver() {\n    }\n\n    public boolean getUseFqn() {\n        return this.useFqn;\n    }\n\n    public void setUseFqn(boolean useFqn) {\n        this.useFqn = useFqn;\n    }\n\n\n    public String nameForType(JavaType type, Options... options) {\n        return nameForType(type, options.length == 0 ? Collections.<Options>emptySet() :\n                EnumSet.copyOf(Arrays.asList(options)));\n    }\n\n    public String nameForType(JavaType type, Set<Options> options) {\n        if (type.hasGenericTypes()) {\n            return nameForGenericType(type, options);\n        }\n        final String name = findStdName(type);\n        return (name == null) ? nameForClass(type, options) : name;\n    }\n\n    protected String nameForClass(JavaType type, Set<Options> options) {\n        return nameForClass(type.getRawClass(), options);\n    }\n\n    protected String nameForClass(Class<?> cls, Set<Options> options) {\n        if (options.contains(Options.SKIP_API_MODEL)) {\n            return getNameOfClass(cls);\n        }\n\n        io.swagger.v3.oas.annotations.media.Schema mp = AnnotationsUtils.getSchemaDeclaredAnnotation(cls);\n\n        final String modelName = mp == null ? null : StringUtils.trimToNull(mp.name());\n        return modelName == null ? getNameOfClass(cls) : modelName;\n    }\n\n    protected String getNameOfClass(Class<?> cls) {\n        return useFqn ? cls.getName().replace(\"$\", \".\") : cls.getSimpleName();\n    }\n\n    protected String nameForGenericType(JavaType type, Set<Options> options) {\n        final StringBuilder generic = new StringBuilder(nameForClass(type, options));\n        final int count = type.containedTypeCount();\n        for (int i = 0; i < count; ++i) {\n            final JavaType arg = type.containedType(i);\n            final String argName = PrimitiveType.fromType(arg) != null ? nameForClass(arg, options) :\n                    nameForType(arg, options);\n            generic.append(WordUtils.capitalize(argName));\n        }\n        return generic.toString();\n    }\n\n    protected String findStdName(JavaType type) {\n        return PrimitiveType.getCommonName(type);\n    }\n\n    public enum Options {\n        SKIP_API_MODEL;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/Components31Mixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\nimport com.fasterxml.jackson.databind.annotation.JsonSerialize;\nimport io.swagger.v3.core.jackson.CallbackSerializer;\nimport io.swagger.v3.oas.models.callbacks.Callback;\n\nimport java.util.Map;\n\npublic abstract class Components31Mixin {\n\n    @JsonAnyGetter\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n\n    @JsonSerialize(contentUsing = CallbackSerializer.class)\n    public abstract Map<String, Callback> getCallbacks();\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/ComponentsMixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.databind.annotation.JsonSerialize;\nimport io.swagger.v3.core.jackson.CallbackSerializer;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.callbacks.Callback;\n\nimport java.util.Map;\n\npublic abstract class ComponentsMixin {\n\n    @JsonAnyGetter\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n\n    @JsonSerialize(contentUsing = CallbackSerializer.class)\n    public abstract Map<String, Callback> getCallbacks();\n\n    @JsonIgnore\n    public abstract Map<String, PathItem> getPathItems();\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/DateSchemaMixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonFormat;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\n\nimport java.util.Map;\n\npublic abstract class DateSchemaMixin {\n\n    @JsonFormat (shape = JsonFormat.Shape.STRING, pattern = \"yyyy-MM-dd\")\n    public abstract Object getExample();\n\n    @JsonFormat (shape = JsonFormat.Shape.STRING, pattern = \"yyyy-MM-dd\")\n    public abstract Object getDefault();\n\n    @JsonFormat (shape = JsonFormat.Shape.STRING, pattern = \"yyyy-MM-dd\")\n    public abstract Object getEnum();\n\n    @JsonIgnore\n    public abstract Object getJsonSchemaImpl();\n\n    @JsonIgnore\n    public abstract Map<String, Object> getJsonSchema();\n\n    @JsonIgnore\n    public abstract Boolean getBooleanSchemaValue();\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/Discriminator31Mixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\n\nimport java.util.Map;\n\npublic abstract class Discriminator31Mixin {\n\n    @JsonAnyGetter\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/DiscriminatorMixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\n\nimport java.util.Map;\n\npublic abstract class DiscriminatorMixin {\n\n    @JsonIgnore\n    public abstract Map<String, Object> getExtensions();\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/ExampleMixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonInclude;\n\nimport java.util.Map;\n\npublic abstract class ExampleMixin {\n    @JsonAnyGetter\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n\n    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)\n    public abstract Object getValue();\n\n    @JsonIgnore\n    public abstract boolean getValueSetFlag();\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/ExtensionsMixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\n\nimport java.util.Map;\n\npublic abstract class ExtensionsMixin {\n\n    @JsonAnyGetter\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/Info31Mixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\n\nimport java.util.Map;\n\npublic abstract class Info31Mixin {\n\n    @JsonAnyGetter\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/InfoMixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\n\nimport java.util.Map;\n\npublic abstract class InfoMixin {\n\n    @JsonAnyGetter\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n\n    @JsonIgnore\n    public abstract String getSummary();\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/LicenseMixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\n\nimport java.util.Map;\n\npublic abstract class LicenseMixin {\n\n    @JsonAnyGetter\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n\n    @JsonIgnore\n    public abstract String getIdentifier();\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/MediaTypeMixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonInclude;\n\nimport java.util.Map;\n\npublic abstract class MediaTypeMixin {\n\n    @JsonAnyGetter\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n\n    @JsonIgnore\n    public abstract boolean getExampleSetFlag();\n\n    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)\n    public abstract Object getExample();\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/OpenAPI31Mixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\nimport com.fasterxml.jackson.databind.annotation.JsonSerialize;\nimport io.swagger.v3.core.jackson.PathsSerializer;\nimport io.swagger.v3.oas.models.Paths;\n\nimport java.util.Map;\n\npublic abstract class OpenAPI31Mixin {\n\n    @JsonAnyGetter\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n\n    @JsonSerialize(using = PathsSerializer.class)\n    public abstract Paths getPaths();\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/OpenAPIMixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport com.fasterxml.jackson.databind.annotation.JsonSerialize;\nimport io.swagger.v3.core.jackson.PathsSerializer;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.Paths;\nimport java.util.Map;\n\npublic abstract class OpenAPIMixin {\n\n    @JsonAnyGetter\n    @JsonInclude\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n\n    @JsonSerialize(using = PathsSerializer.class)\n    public abstract Paths getPaths();\n\n    @JsonIgnore\n    public abstract Map<String, PathItem> getWebhooks();\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/OperationMixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\nimport com.fasterxml.jackson.databind.annotation.JsonSerialize;\nimport io.swagger.v3.core.jackson.ApiResponsesSerializer;\nimport io.swagger.v3.core.jackson.CallbackSerializer;\nimport io.swagger.v3.oas.models.callbacks.Callback;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\n\nimport java.util.Map;\n\npublic abstract class OperationMixin {\n\n    @JsonAnyGetter\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n\n    @JsonSerialize(contentUsing = CallbackSerializer.class)\n    public abstract Map<String, Callback> getCallbacks();\n\n    @JsonSerialize(using = ApiResponsesSerializer.class)\n    public abstract ApiResponses getResponses();\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/Schema31Mixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonPropertyOrder;\nimport com.fasterxml.jackson.core.JsonGenerator;\nimport com.fasterxml.jackson.databind.JsonSerializer;\nimport com.fasterxml.jackson.databind.SerializerProvider;\nimport com.fasterxml.jackson.databind.annotation.JsonSerialize;\n\nimport java.io.IOException;\nimport java.math.BigDecimal;\nimport java.util.Map;\nimport java.util.Set;\n\n@JsonPropertyOrder(value = {\"type\", \"format\", \"if\", \"then\", \"else\"}, alphabetic = true)\npublic abstract class Schema31Mixin {\n\n    @JsonIgnore\n    public abstract Map<String, Object> getJsonSchema();\n\n    @JsonIgnore\n    public abstract Boolean getNullable();\n\n    @JsonIgnore\n    public abstract Boolean getExclusiveMinimum();\n\n    @JsonIgnore\n    public abstract Boolean getExclusiveMaximum();\n\n    @JsonProperty(\"exclusiveMinimum\")\n    public abstract BigDecimal getExclusiveMinimumValue();\n\n    @JsonProperty(\"exclusiveMaximum\")\n    public abstract BigDecimal getExclusiveMaximumValue();\n\n    @JsonIgnore\n    public abstract String getType();\n\n    @JsonProperty(\"type\")\n    @JsonSerialize(using = TypeSerializer.class)\n    public abstract Set<String> getTypes();\n\n    @JsonAnyGetter\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n\n    @JsonIgnore\n    public abstract boolean getExampleSetFlag();\n\n    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)\n    public abstract Object getExample();\n\n    @JsonIgnore\n    public abstract Object getJsonSchemaImpl();\n\n    @JsonIgnore\n    public abstract Boolean getBooleanSchemaValue();\n\n    public static class TypeSerializer extends JsonSerializer<Set<String>> {\n\n        @Override\n        public void serialize(Set<String> types, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {\n            if (types != null && types.size() == 1) {\n                jsonGenerator.writeString((String)types.toArray()[0]);\n            } else if (types != null && types.size() > 1){\n                jsonGenerator.writeStartArray();\n                for (String t: types) {\n                    jsonGenerator.writeString(t);\n                }\n                jsonGenerator.writeEndArray();\n            }\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/SchemaConverterMixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.math.BigDecimal;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\n\npublic abstract class SchemaConverterMixin {\n\n    @JsonIgnore\n    public abstract Map<String, Object> getJsonSchema();\n\n    @JsonAnyGetter\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n\n    @JsonIgnore\n    public abstract boolean getExampleSetFlag();\n\n    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)\n    public abstract Object getExample();\n\n    @JsonIgnore\n    public abstract Object getJsonSchemaImpl();\n\n    @JsonIgnore\n    public abstract BigDecimal getExclusiveMinimumValue();\n\n    @JsonIgnore\n    public abstract BigDecimal getExclusiveMaximumValue();\n\n    @JsonIgnore\n    public abstract Schema getContains();\n\n    @JsonIgnore\n    public abstract String get$id();\n\n    @JsonIgnore\n    public abstract String get$anchor();\n\n    @JsonIgnore\n    public abstract String get$schema();\n\n    @JsonIgnore\n    public abstract Set<String> getTypes();\n\n    @JsonIgnore\n    public abstract Map<String, Schema> getPatternProperties();\n\n    @JsonIgnore\n    public abstract List<Schema> getPrefixItems();\n\n    @JsonIgnore\n    public abstract String getContentEncoding();\n\n    @JsonIgnore\n    public abstract String getContentMediaType();\n\n    @JsonIgnore\n    public abstract Schema getContentSchema();\n\n    @JsonIgnore\n    public abstract Schema getPropertyNames();\n\n    @JsonIgnore\n    public abstract Object getUnevaluatedProperties();\n\n    @JsonIgnore\n    public abstract Integer getMaxContains();\n\n    @JsonIgnore\n    public abstract Integer getMinContains();\n\n    @JsonIgnore\n    public abstract Schema getAdditionalItems();\n\n    @JsonIgnore\n    public abstract Schema getUnevaluatedItems();\n\n    @JsonIgnore\n    public abstract Schema getIf();\n\n    @JsonIgnore\n    public abstract Schema getElse();\n\n    @JsonIgnore\n    public abstract Schema getThen();\n\n    @JsonIgnore\n    public abstract Map<String, Schema> getDependentSchemas();\n\n    @JsonIgnore\n    public abstract Map<String, List<String>> getDependentRequired();\n\n    @JsonIgnore\n    public abstract String get$comment();\n\n    @JsonIgnore\n    public abstract List<Object> getExamples();\n\n    @JsonIgnore\n    public abstract Object getConst();\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/SchemaMixin.java",
    "content": "package io.swagger.v3.core.jackson.mixin;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.math.BigDecimal;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\n\npublic abstract class SchemaMixin {\n\n    @JsonAnyGetter\n    public abstract Map<String, Object> getExtensions();\n\n    @JsonAnySetter\n    public abstract void addExtension(String name, Object value);\n\n    @JsonIgnore\n    public abstract boolean getExampleSetFlag();\n\n    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)\n    public abstract Object getExample();\n\n    @JsonIgnore\n    public abstract Map<String, Object> getJsonSchema();\n\n    @JsonIgnore\n    public abstract BigDecimal getExclusiveMinimumValue();\n\n    @JsonIgnore\n    public abstract BigDecimal getExclusiveMaximumValue();\n\n    @JsonIgnore\n    public abstract Schema getContains();\n\n    @JsonIgnore\n    public abstract String get$id();\n\n    @JsonIgnore\n    public abstract String get$anchor();\n\n    @JsonIgnore\n    public abstract String get$schema();\n\n    @JsonIgnore\n    public abstract Set<String> getTypes();\n\n    @JsonIgnore\n    public abstract Map<String, Schema> getPatternProperties();\n\n    @JsonIgnore\n    public abstract Object getJsonSchemaImpl();\n\n    @JsonIgnore\n    public abstract List<Schema> getPrefixItems();\n\n    @JsonIgnore\n    public abstract String getContentEncoding();\n\n    @JsonIgnore\n    public abstract String getContentMediaType();\n\n    @JsonIgnore\n    public abstract Schema getContentSchema();\n\n    @JsonIgnore\n    public abstract Schema getPropertyNames();\n\n    @JsonIgnore\n    public abstract Object getUnevaluatedProperties();\n\n    @JsonIgnore\n    public abstract Integer getMaxContains();\n\n    @JsonIgnore\n    public abstract Integer getMinContains();\n\n    @JsonIgnore\n    public abstract Schema getAdditionalItems();\n\n    @JsonIgnore\n    public abstract Schema getUnevaluatedItems();\n\n    @JsonIgnore\n    public abstract Schema getIf();\n\n    @JsonIgnore\n    public abstract Schema getElse();\n\n    @JsonIgnore\n    public abstract Schema getThen();\n\n    @JsonIgnore\n    public abstract Map<String, Schema> getDependentSchemas();\n\n    @JsonIgnore\n    public abstract Map<String, List<String>> getDependentRequired();\n\n    @JsonIgnore\n    public abstract String get$comment();\n\n    @JsonIgnore\n    public abstract List<Object> getExamples();\n\n    @JsonIgnore\n    public abstract Object getConst();\n\n    @JsonIgnore\n    public abstract Boolean getBooleanSchemaValue();\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/model/ApiDescription.java",
    "content": "package io.swagger.v3.core.model;\n\npublic class ApiDescription {\n    private String path;\n    private String method;\n\n    public ApiDescription(String path, String method) {\n        this.setPath(path);\n        this.setMethod(method);\n    }\n\n    public String getPath() {\n        return path;\n    }\n\n    public void setPath(String path) {\n        this.path = path;\n    }\n\n    public String getMethod() {\n        return method;\n    }\n\n    public void setMethod(String method) {\n        this.method = method;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/AnnotationsUtils.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.annotation.JsonView;\nimport com.fasterxml.jackson.databind.JavaType;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.introspect.Annotated;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContext;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.converter.ResolvedSchema;\nimport io.swagger.v3.oas.annotations.StringToClassMapItem;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.extensions.ExtensionProperty;\nimport io.swagger.v3.oas.annotations.links.LinkParameter;\nimport io.swagger.v3.oas.annotations.media.DependentRequired;\nimport io.swagger.v3.oas.annotations.media.DependentSchema;\nimport io.swagger.v3.oas.annotations.media.DiscriminatorMapping;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\nimport io.swagger.v3.oas.annotations.media.SchemaProperty;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.ExternalDocumentation;\nimport io.swagger.v3.oas.models.examples.Example;\nimport io.swagger.v3.oas.models.headers.Header;\nimport io.swagger.v3.oas.models.info.Contact;\nimport io.swagger.v3.oas.models.info.Info;\nimport io.swagger.v3.oas.models.info.License;\nimport io.swagger.v3.oas.models.links.Link;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.ComposedSchema;\nimport io.swagger.v3.oas.models.media.Content;\nimport io.swagger.v3.oas.models.media.Encoding;\nimport io.swagger.v3.oas.models.media.JsonSchema;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.servers.Server;\nimport io.swagger.v3.oas.models.servers.ServerVariable;\nimport io.swagger.v3.oas.models.servers.ServerVariables;\nimport io.swagger.v3.oas.models.tags.Tag;\nimport org.apache.commons.lang3.StringUtils;\nimport org.apache.commons.lang3.math.NumberUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport java.io.IOException;\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Field;\nimport java.lang.reflect.Type;\nimport java.math.BigDecimal;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.LinkedHashMap;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.Set;\n\nimport static io.swagger.v3.oas.annotations.media.Schema.DEFAULT_SENTINEL;\n\npublic abstract class AnnotationsUtils {\n\n    private static Logger LOGGER = LoggerFactory.getLogger(AnnotationsUtils.class);\n    public static final String COMPONENTS_REF = Components.COMPONENTS_SCHEMAS_REF;\n\n    public static boolean hasSchemaAnnotation(io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (schema == null) {\n            return false;\n        }\n        if (StringUtils.isBlank(schema.type())\n                && StringUtils.isBlank(schema.format())\n                && StringUtils.isBlank(schema.title())\n                && StringUtils.isBlank(schema.description())\n                && StringUtils.isBlank(schema.ref())\n                && StringUtils.isBlank(schema.name())\n                && schema.multipleOf() == 0\n                && StringUtils.isBlank(schema.maximum())\n                && StringUtils.isBlank(schema.minimum())\n                && !schema.exclusiveMinimum()\n                && !schema.exclusiveMaximum()\n                && schema.maxLength() == Integer.MAX_VALUE\n                && schema.minLength() == 0\n                && schema.minProperties() == 0\n                && schema.maxProperties() == 0\n                && schema.requiredProperties().length == 0\n                && !schema.required()\n                && schema.requiredMode().equals(io.swagger.v3.oas.annotations.media.Schema.RequiredMode.AUTO)\n                && !schema.nullable()\n                && !schema.readOnly()\n                && !schema.writeOnly()\n                && schema.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.AUTO)\n                && !schema.deprecated()\n                && schema.allowableValues().length == 0\n                && DEFAULT_SENTINEL.equals(schema.defaultValue())\n                && schema.implementation().equals(Void.class)\n                && StringUtils.isBlank(schema.example())\n                && StringUtils.isBlank(schema.pattern())\n                && schema.not().equals(Void.class)\n                && schema.allOf().length == 0\n                && schema.oneOf().length == 0\n                && schema.anyOf().length == 0\n                && schema.subTypes().length == 0\n                && !getExternalDocumentation(schema.externalDocs()).isPresent()\n                && StringUtils.isBlank(schema.discriminatorProperty())\n                && schema.discriminatorMapping().length == 0\n                && schema.extensions().length == 0\n                && !schema.hidden()\n                && !schema.enumAsRef()\n                && schema.dependentSchemas().length == 0\n                && schema.patternProperties().length == 0\n                && schema.unevaluatedProperties().equals(Void.class)\n                && schema.types().length == 0\n                && schema.exclusiveMinimumValue() == 0\n                && schema.exclusiveMaximumValue() == 0\n                && StringUtils.isBlank(schema.$id())\n                && StringUtils.isBlank(schema.$schema())\n                && StringUtils.isBlank(schema.$anchor())\n                && StringUtils.isBlank(schema.contentEncoding())\n                && StringUtils.isBlank(schema.contentMediaType())\n                && schema.contentSchema().equals(Void.class)\n                && schema.propertyNames().equals(Void.class)\n                && schema._if().equals(Void.class)\n                && schema._else().equals(Void.class)\n                && schema.then().equals(Void.class)\n                && StringUtils.isBlank(schema.$comment())\n                && schema.dependentRequiredMap().length == 0\n                && schema.patternProperties().length == 0\n                && schema.properties().length == 0\n                && StringUtils.isBlank(schema._const())\n                && schema.additionalProperties().equals(io.swagger.v3.oas.annotations.media.Schema.AdditionalPropertiesValue.USE_ADDITIONAL_PROPERTIES_ANNOTATION)\n                && schema.additionalPropertiesSchema().equals(Void.class)\n                ) {\n            return false;\n        }\n        return true;\n    }\n\n    public static boolean equals(Annotation thisAnnotation, Annotation thatAnnotation) {\n        if (thisAnnotation == null && thatAnnotation == null) {\n            return true;\n        }\n        else if (thisAnnotation == null || thatAnnotation == null) {\n            return false;\n        }\n        if (!thisAnnotation.annotationType().equals(thatAnnotation.annotationType())) {\n            return false;\n        }\n        if (thisAnnotation instanceof io.swagger.v3.oas.annotations.media.Schema) {\n            return equals((io.swagger.v3.oas.annotations.media.Schema) thisAnnotation, (io.swagger.v3.oas.annotations.media.Schema) thatAnnotation);\n        } else if (thisAnnotation instanceof io.swagger.v3.oas.annotations.media.ArraySchema) {\n            return equals((io.swagger.v3.oas.annotations.media.ArraySchema)thisAnnotation, (io.swagger.v3.oas.annotations.media.ArraySchema)thatAnnotation);\n        }\n        return true;\n    }\n\n    public static boolean equals(io.swagger.v3.oas.annotations.media.ArraySchema thisArraySchema, io.swagger.v3.oas.annotations.media.ArraySchema thatArraySchema) {\n        if (thisArraySchema == null && thatArraySchema == null) {\n            return true;\n        }\n        else if (thisArraySchema == null || thatArraySchema == null) {\n            return false;\n        }\n\n        if (thisArraySchema.maxItems() != thatArraySchema.maxItems()) {\n            return false;\n        }\n        if (thisArraySchema.minItems() != thatArraySchema.minItems()) {\n            return false;\n        }\n        if (thisArraySchema.uniqueItems() != thatArraySchema.uniqueItems()) {\n            return false;\n        }\n\n        if (!Arrays.equals(thisArraySchema.extensions(), thatArraySchema.extensions())) {\n            return false;\n        }\n\n        if (!equals(thisArraySchema.schema(), thatArraySchema.schema())) {\n            return false;\n        }\n\n        if (!equals(thisArraySchema.contains(), thatArraySchema.contains())) {\n            return false;\n        }\n        if (thisArraySchema.maxContains() != thatArraySchema.maxContains()) {\n            return false;\n        }\n        if (thisArraySchema.minContains() != thatArraySchema.minContains()) {\n            return false;\n        }\n        if (!Arrays.equals(thisArraySchema.prefixItems(), thatArraySchema.prefixItems())) {\n            return false;\n        }\n        return true;\n    }\n\n    public static boolean equals(io.swagger.v3.oas.annotations.media.Schema thisSchema, io.swagger.v3.oas.annotations.media.Schema thatSchema) {\n        if (thisSchema == null && thatSchema == null) {\n            return true;\n        }\n        else if (thisSchema == null || thatSchema == null) {\n            return false;\n        }\n\n        if (!StringUtils.equals(thisSchema.type(), thatSchema.type())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.format(), thatSchema.format())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.title(), thatSchema.title())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.description(), thatSchema.description())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.ref(), thatSchema.ref())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.name(), thatSchema.name())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.defaultValue(), thatSchema.defaultValue())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.maximum(), thatSchema.maximum())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.minimum(), thatSchema.minimum())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.example(), thatSchema.example())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.pattern(), thatSchema.pattern())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.discriminatorProperty(), thatSchema.discriminatorProperty())) {\n            return false;\n        }\n\n        if (thisSchema.multipleOf() != thatSchema.multipleOf()) {\n            return false;\n        }\n        if (thisSchema.minLength() != thatSchema.minLength()) {\n            return false;\n        }\n        if (thisSchema.minProperties() != thatSchema.minProperties()) {\n            return false;\n        }\n        if (thisSchema.maxProperties() != thatSchema.maxProperties()) {\n            return false;\n        }\n        if (thisSchema.maxLength() != thatSchema.maxLength()) {\n            return false;\n        }\n\n        if (!Arrays.equals(thisSchema.allOf(), thatSchema.allOf())) {\n            return false;\n        }\n        if (!Arrays.equals(thisSchema.oneOf(), thatSchema.oneOf())) {\n            return false;\n        }\n        if (!Arrays.equals(thisSchema.anyOf(), thatSchema.anyOf())) {\n            return false;\n        }\n        if (!Arrays.equals(thisSchema.subTypes(), thatSchema.subTypes())) {\n            return false;\n        }\n        if (!Arrays.equals(thisSchema.discriminatorMapping(), thatSchema.discriminatorMapping())) {\n            return false;\n        }\n        if (!Arrays.equals(thisSchema.extensions(), thatSchema.extensions())) {\n            return false;\n        }\n        if (!Arrays.equals(thisSchema.allowableValues(), thatSchema.allowableValues())) {\n            return false;\n        }\n        if (!Arrays.equals(thisSchema.requiredProperties(), thatSchema.requiredProperties())) {\n            return false;\n        }\n\n        if (thisSchema.exclusiveMinimum() != thatSchema.exclusiveMinimum()) {\n            return false;\n        }\n        if (thisSchema.exclusiveMaximum() != thatSchema.exclusiveMaximum()) {\n            return false;\n        }\n        if (thisSchema.required() != thatSchema.required()) {\n            return false;\n        }\n        if (!thisSchema.requiredMode().equals(thatSchema.requiredMode())) {\n            return false;\n        }\n        if (thisSchema.nullable() != thatSchema.nullable()) {\n            return false;\n        }\n        if (thisSchema.readOnly() != thatSchema.readOnly()) {\n            return false;\n        }\n        if (thisSchema.writeOnly() != thatSchema.writeOnly()) {\n            return false;\n        }\n        if (!thisSchema.accessMode().equals(thatSchema.accessMode())) {\n            return false;\n        }\n        if (thisSchema.deprecated() != thatSchema.deprecated()) {\n            return false;\n        }\n        if (thisSchema.hidden() != thatSchema.hidden()) {\n            return false;\n        }\n        if (thisSchema.enumAsRef() != thatSchema.enumAsRef()) {\n            return false;\n        }\n        if (!thisSchema.implementation().equals(thatSchema.implementation())) {\n            return false;\n        }\n        if (!thisSchema.not().equals(thatSchema.not())) {\n            return false;\n        }\n\n        if (!StringUtils.equals(thisSchema.externalDocs().description(), thatSchema.externalDocs().description())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.externalDocs().url(), thatSchema.externalDocs().url())) {\n            return false;\n        }\n        if (thisSchema.externalDocs().extensions().length !=  thatSchema.externalDocs().extensions().length) {\n            return false;\n        }\n        if (!Arrays.equals(thisSchema.extensions(), thatSchema.extensions())) {\n            return false;\n        }\n        if (!thisSchema.additionalProperties().equals(thatSchema.additionalProperties())) {\n            return false;\n        }\n\n        if (!Arrays.equals(thisSchema.types(), thatSchema.types())) {\n            return false;\n        }\n        if (thisSchema.exclusiveMaximumValue() != thatSchema.exclusiveMaximumValue()) {\n            return false;\n        }\n        if (thisSchema.exclusiveMinimumValue() != thatSchema.exclusiveMinimumValue()) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.$id(), thatSchema.$id())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.$schema(), thatSchema.$schema())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.$anchor(), thatSchema.$anchor())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.contentEncoding(), thatSchema.contentEncoding())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.contentMediaType(), thatSchema.contentMediaType())) {\n            return false;\n        }\n        if (!StringUtils.equals(thisSchema.contentMediaType(), thatSchema.contentMediaType())) {\n            return false;\n        }\n        if (!thisSchema.contentSchema().equals(thatSchema.contentSchema())) {\n            return false;\n        }\n        if (!thisSchema.propertyNames().equals(thatSchema.propertyNames())) {\n            return false;\n        }\n        if (!thisSchema._if().equals(thatSchema._if())) {\n            return false;\n        }\n        if (!thisSchema._else().equals(thatSchema._else())) {\n            return false;\n        }\n        if (!thisSchema.then().equals(thatSchema.then())) {\n            return false;\n        }\n        if (!thisSchema.$comment().equals(thatSchema.$comment())) {\n            return false;\n        }\n        if (!thisSchema._const().equals(thatSchema._const())) {\n            return false;\n        }\n\n        return true;\n    }\n\n\n    public static boolean hasArrayAnnotation(io.swagger.v3.oas.annotations.media.ArraySchema array) {\n        if (array == null) {\n            return false;\n        }\n        if (!array.uniqueItems()\n                && array.maxItems() == Integer.MIN_VALUE\n                && array.minItems() == Integer.MAX_VALUE\n                && !hasSchemaAnnotation(array.schema())\n                && !hasSchemaAnnotation(array.arraySchema())\n                && !hasSchemaAnnotation(array.contains())\n                && array.maxContains() == 0\n                && array.minContains() == 0\n                && !hasSchemaAnnotation(array.unevaluatedItems())\n                && array.prefixItems().length == 0\n                ) {\n            return false;\n        }\n        return true;\n    }\n\n    public static Optional<Example> getExample(ExampleObject example) {\n        return getExample(example, false);\n    }\n\n    public static Optional<Example> getExample(ExampleObject example, boolean ignoreName) {\n        if (example == null) {\n            return Optional.empty();\n        }\n        Example exampleObject = new Example();\n        if (!ignoreName && StringUtils.isNotBlank(example.name())) {\n\n            if (StringUtils.isNotBlank(example.name())) {\n                exampleObject.setDescription(example.name());\n            }\n            resolveExample(exampleObject, example);\n\n            return Optional.of(exampleObject);\n        } else if (ignoreName){\n            if (resolveExample(exampleObject, example)) {\n                return Optional.of(exampleObject);\n            }\n        }\n        return Optional.empty();\n    }\n\n    private static boolean resolveExample(Example exampleObject, ExampleObject example) {\n\n        boolean isEmpty = true;\n        if (StringUtils.isNotBlank(example.summary())) {\n            isEmpty = false;\n            exampleObject.setSummary(example.summary());\n        }\n\n        if (StringUtils.isNotBlank(example.description())) {\n            isEmpty = false;\n            exampleObject.setDescription(example.description());\n        }\n\n        if (StringUtils.isNotBlank(example.externalValue())) {\n            isEmpty = false;\n            exampleObject.setExternalValue(example.externalValue());\n        }\n        if (StringUtils.isNotBlank(example.value())) {\n            isEmpty = false;\n            try {\n                ObjectMapper mapper = ObjectMapperFactory.buildStrictGenericObjectMapper();\n                exampleObject.setValue(mapper.readTree(example.value()));\n            } catch (IOException e) {\n                exampleObject.setValue(example.value());\n            }\n        }\n        if (StringUtils.isNotBlank(example.ref())) {\n            isEmpty = false;\n            exampleObject.set$ref(example.ref());\n        }\n        if (example.extensions().length > 0) {\n            isEmpty = false;\n            Map<String, Object> extensions = AnnotationsUtils.getExtensions(example.extensions());\n            if (extensions != null) {\n                extensions.forEach(exampleObject::addExtension);\n            }\n        }\n        return !isEmpty;\n    }\n\n    public static Optional<ArraySchema> getArraySchema(io.swagger.v3.oas.annotations.media.ArraySchema arraySchema, JsonView jsonViewAnnotation) {\n        return getArraySchema(arraySchema, null, jsonViewAnnotation);\n    }\n    public static Optional<ArraySchema> getArraySchema(io.swagger.v3.oas.annotations.media.ArraySchema arraySchema, Components components, JsonView jsonViewAnnotation) {\n        return getArraySchema(arraySchema, components, jsonViewAnnotation, false);\n    }\n\n    public static Optional<ArraySchema> getArraySchema(io.swagger.v3.oas.annotations.media.ArraySchema arraySchema, Components components, JsonView jsonViewAnnotation, boolean openapi31) {\n        Optional result = getArraySchema(arraySchema, components, jsonViewAnnotation, openapi31, null);\n        if (result.isPresent()) {\n            return Optional.of((ArraySchema) result.get());\n        }\n        return Optional.empty();\n    }\n    public static Optional<Schema> getArraySchema(io.swagger.v3.oas.annotations.media.ArraySchema arraySchema, Components components, JsonView jsonViewAnnotation, boolean openapi31, Schema existingSchema) {\n        return getArraySchema(arraySchema, components, jsonViewAnnotation, openapi31, existingSchema, false);\n    }\n    public static Optional<Schema> getArraySchema(io.swagger.v3.oas.annotations.media.ArraySchema arraySchema, Components components, JsonView jsonViewAnnotation, boolean openapi31, Schema existingSchema, boolean processSchemaImplementation) {\n        if (arraySchema == null || !hasArrayAnnotation(arraySchema)) {\n            if (existingSchema == null) {\n                return Optional.empty();\n            } else {\n                return Optional.of(existingSchema);\n            }\n        }\n        Schema arraySchemaObject = null;\n        if (!openapi31) {\n            if (existingSchema != null && existingSchema instanceof ArraySchema) {\n                return Optional.of((ArraySchema) existingSchema);\n            }\n            arraySchemaObject = new ArraySchema();\n        } else {\n            if (existingSchema == null) {\n                arraySchemaObject = new JsonSchema().typesItem(\"array\");\n            } else {\n                arraySchemaObject = existingSchema;\n            }\n        }\n\n        if (arraySchema.uniqueItems()) {\n            arraySchemaObject.setUniqueItems(arraySchema.uniqueItems());\n        }\n        if (arraySchema.maxItems() > 0) {\n            arraySchemaObject.setMaxItems(arraySchema.maxItems());\n        }\n\n        if (arraySchema.minItems() < Integer.MAX_VALUE) {\n            arraySchemaObject.setMinItems(arraySchema.minItems());\n        }\n\n        getSchemaFromAnnotation(arraySchema.contains(), components, jsonViewAnnotation, openapi31).ifPresent(arraySchemaObject::setContains);\n        getSchemaFromAnnotation(arraySchema.unevaluatedItems(), components, jsonViewAnnotation, openapi31).ifPresent(arraySchemaObject::setUnevaluatedItems);\n\n        if (arraySchema.maxContains() > 0) {\n            arraySchemaObject.setMaxContains(arraySchema.maxContains());\n        }\n        if (arraySchema.minContains() > 0) {\n            arraySchemaObject.setMinContains(arraySchema.minContains());\n        }\n        if (arraySchema.prefixItems().length > 0) {\n            for (io.swagger.v3.oas.annotations.media.Schema prefixItem : arraySchema.prefixItems()) {\n                getSchemaFromAnnotation(prefixItem, components, jsonViewAnnotation, openapi31).ifPresent(arraySchemaObject::addPrefixItem);\n            }\n        }\n\n        if (arraySchema.extensions().length > 0) {\n            boolean usePrefix = !openapi31;\n            Map<String, Object> extensions = AnnotationsUtils.getExtensions(openapi31, usePrefix, arraySchema.extensions());\n            if (extensions != null) {\n                extensions.forEach(arraySchemaObject::addExtension);\n            }\n        }\n\n        if (arraySchema.schema() != null) {\n            if (arraySchema.schema().implementation().equals(Void.class)) {\n                getSchemaFromAnnotation(arraySchema.schema(), components, jsonViewAnnotation, openapi31, arraySchemaObject.getItems())\n                        .ifPresent(arraySchemaObject::setItems);\n            } else if (processSchemaImplementation) {\n                getSchema(arraySchema.schema(), arraySchema, false, arraySchema.schema().implementation(), components, jsonViewAnnotation, openapi31)\n                        .ifPresent(arraySchemaObject::setItems);\n            }\n        }\n\n        if (arraySchema.arraySchema() != null) {\n            applyArraySchemaAnnotation(arraySchema.arraySchema(), arraySchemaObject, openapi31);\n        }\n\n        return Optional.of(arraySchemaObject);\n    }\n\n    private static void applyArraySchemaAnnotation(io.swagger.v3.oas.annotations.media.Schema arraySchemaAnnotation, Schema arraySchemaObject, boolean openapi31) {\n        if (StringUtils.isNotBlank(arraySchemaAnnotation.description())) {\n            arraySchemaObject.setDescription(arraySchemaAnnotation.description());\n        }\n        if (StringUtils.isNotBlank(arraySchemaAnnotation.title())) {\n            arraySchemaObject.setTitle(arraySchemaAnnotation.title());\n        }\n        if (arraySchemaAnnotation.deprecated()) {\n            arraySchemaObject.deprecated(true);\n        }\n        if (arraySchemaAnnotation.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY)) {\n            arraySchemaObject.setReadOnly(true);\n            arraySchemaObject.setWriteOnly(null);\n        } else if (arraySchemaAnnotation.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.WRITE_ONLY)) {\n            arraySchemaObject.setReadOnly(null);\n            arraySchemaObject.setWriteOnly(true);\n        } else if (arraySchemaAnnotation.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_WRITE)) {\n            arraySchemaObject.setReadOnly(null);\n            arraySchemaObject.setWriteOnly(null);\n        }\n        if (openapi31 && arraySchemaAnnotation.examples().length > 0) {\n            arraySchemaObject.setExamples(parseExamplesArray(arraySchemaAnnotation));\n        }\n    }\n\n    public static Optional<Schema> getSchemaFromAnnotation(io.swagger.v3.oas.annotations.media.Schema schema, JsonView jsonViewAnnotation) {\n        return getSchemaFromAnnotation(schema, jsonViewAnnotation, false);\n    }\n\n    public static Optional<Schema> getSchemaFromAnnotation(io.swagger.v3.oas.annotations.media.Schema schema, JsonView jsonViewAnnotation, boolean openapi31) {\n        return getSchemaFromAnnotation(schema, null, jsonViewAnnotation, openapi31);\n    }\n\n    public static Optional<Schema> getSchemaFromAnnotation(io.swagger.v3.oas.annotations.media.Schema schema, Components components, JsonView jsonViewAnnotation) {\n        return getSchemaFromAnnotation(schema, components, jsonViewAnnotation, false);\n    }\n\n    public static Optional<Schema> getSchemaFromAnnotation(io.swagger.v3.oas.annotations.media.Schema schema, Components components, JsonView jsonViewAnnotation, boolean openapi31) {\n        return getSchemaFromAnnotation(schema, components, jsonViewAnnotation, openapi31, null);\n    }\n    public static Optional<Schema> getSchemaFromAnnotation(\n            io.swagger.v3.oas.annotations.media.Schema schema,\n            Components components,\n            JsonView jsonViewAnnotation,\n            boolean openapi31,\n            Schema existingSchema) {\n        return getSchemaFromAnnotation(schema, components, jsonViewAnnotation, openapi31, existingSchema, null);\n    }\n    public static Optional<Schema> getSchemaFromAnnotation(\n            io.swagger.v3.oas.annotations.media.Schema schema,\n            Components components,\n            JsonView jsonViewAnnotation,\n            boolean openapi31,\n            Schema existingSchema,\n            ModelConverterContext context) {\n        return getSchemaFromAnnotation(schema, components, jsonViewAnnotation, openapi31, existingSchema, Schema.SchemaResolution.DEFAULT, null);\n    }\n    public static Optional<Schema> getSchemaFromAnnotation(\n            io.swagger.v3.oas.annotations.media.Schema schema,\n            Components components,\n            JsonView jsonViewAnnotation,\n            boolean openapi31,\n            Schema existingSchema,\n            Schema.SchemaResolution schemaResolution,\n            ModelConverterContext context) {\n        if (schema == null || !hasSchemaAnnotation(schema)) {\n            if (existingSchema == null || (!openapi31 && Schema.SchemaResolution.DEFAULT.equals(schemaResolution))) {\n                return Optional.empty();\n            } else if (existingSchema != null && (openapi31 || Schema.SchemaResolution.INLINE.equals(schemaResolution))) {\n                return Optional.of(existingSchema);\n            }\n        }\n        Schema schemaObject = null;\n        if (!openapi31) {\n            if (existingSchema != null) {\n                if (!Schema.SchemaResolution.DEFAULT.equals(schemaResolution)) {\n                    schemaObject = existingSchema;\n                } else {\n                    return Optional.of(existingSchema);\n                }\n            }\n            if (Schema.SchemaResolution.DEFAULT.equals(schemaResolution)) {\n                if (schema != null && (schema.oneOf().length > 0 ||\n                        schema.allOf().length > 0 ||\n                        schema.anyOf().length > 0)) {\n                    schemaObject = new ComposedSchema();\n                } else {\n                    schemaObject = new Schema();\n                }\n            } else if (Schema.SchemaResolution.ALL_OF.equals(schemaResolution) || Schema.SchemaResolution.ALL_OF_REF.equals(schemaResolution)) {\n                if (existingSchema == null) {\n                    schemaObject = new Schema();\n                } else {\n                    schemaObject = existingSchema;\n                }\n            }\n        } else {\n            if (existingSchema == null) {\n                schemaObject = new JsonSchema();\n            } else {\n                schemaObject = existingSchema;\n            }\n        }\n        if (schema == null) {\n            return Optional.of(schemaObject);\n        }\n        if (StringUtils.isNotBlank(schema.description())) {\n            schemaObject.setDescription(schema.description());\n        }\n        if (StringUtils.isNotBlank(schema.ref())) {\n            schemaObject.set$ref(schema.ref());\n        }\n        if (StringUtils.isNotBlank(schema.type())) {\n            schemaObject.setType(schema.type());\n        }\n\n        if (schema.types().length > 0) {\n            schemaObject.setTypes(new LinkedHashSet<>(Arrays.asList(schema.types())));\n        }\n        if (StringUtils.isNotBlank(schema.$id())) {\n            schemaObject.set$id(schema.$id());\n        }\n        if (StringUtils.isNotBlank(schema.$schema())) {\n            schemaObject.set$schema(schema.$schema());\n        }\n        if (StringUtils.isNotBlank(schema.$anchor())) {\n            schemaObject.set$anchor(schema.$anchor());\n        }\n        if (StringUtils.isNotBlank(schema.$vocabulary())) {\n            schemaObject.set$vocabulary(schema.$vocabulary());\n        }\n        if (StringUtils.isNotBlank(schema.$dynamicAnchor())) {\n            schemaObject.set$dynamicAnchor(schema.$dynamicAnchor());\n        }\n        if (StringUtils.isNotBlank(schema.$dynamicRef())) {\n            schemaObject.set$dynamicRef(schema.$dynamicRef());\n        }\n        if (StringUtils.isNotBlank(schema.contentEncoding())) {\n            schemaObject.setContentEncoding(schema.contentEncoding());\n        }\n        if (StringUtils.isNotBlank(schema.contentMediaType())) {\n            schemaObject.setContentMediaType(schema.contentMediaType());\n        }\n        if (schema.exclusiveMaximumValue() != Integer.MAX_VALUE && schema.exclusiveMaximumValue() > 0) {\n            schemaObject.setExclusiveMaximumValue(BigDecimal.valueOf(schema.exclusiveMaximumValue()));\n        }\n        if (schema.exclusiveMinimumValue() > 0) {\n            schemaObject.setExclusiveMinimumValue(BigDecimal.valueOf(schema.exclusiveMinimumValue()));\n        }\n        if (!schema.contentSchema().equals(Void.class)) {\n            schemaObject.setContentSchema(resolveSchemaFromType(schema.contentSchema(), components, jsonViewAnnotation, openapi31, null, null, context));\n        }\n        if (!schema.propertyNames().equals(Void.class)) {\n            schemaObject.setPropertyNames(resolveSchemaFromType(schema.propertyNames(), components, jsonViewAnnotation, openapi31, null, null, context));\n        }\n        if (!schema._if().equals(Void.class)) {\n            schemaObject.setIf(resolveSchemaFromType(schema._if(), components, jsonViewAnnotation, openapi31, null, null, context));\n        }\n        if (!schema._else().equals(Void.class)) {\n            schemaObject.setElse(resolveSchemaFromType(schema._else(), components, jsonViewAnnotation, openapi31, null, null, context));\n        }\n        if (!schema.then().equals(Void.class)) {\n            schemaObject.setThen(resolveSchemaFromType(schema.then(), components, jsonViewAnnotation, openapi31, null, null, context));\n        }\n        if (StringUtils.isNotBlank(schema._const())) {\n            try {\n                Object _const;\n                if (openapi31) {\n                    _const = Json31.mapper().readTree(schema._const());\n                } else {\n                    _const = Json.mapper().readTree(schema._const());\n                }\n                schemaObject.setConst(_const);\n            } catch (IOException e) {\n                schemaObject.setConst(schema._const());\n            }\n        }\n        if (StringUtils.isNotBlank(schema.$comment())) {\n            schemaObject.set$comment(schema.$comment());\n        }\n        if (schema.dependentRequiredMap().length > 0) {\n            final Map<String, List<String>> dependentRequired = new LinkedHashMap<>();\n            for (DependentRequired dependentRequiredAnnotation : schema.dependentRequiredMap()) {\n                dependentRequired.put(dependentRequiredAnnotation.name(), Arrays.asList(dependentRequiredAnnotation.value()));\n            }\n            schemaObject.setDependentRequired(dependentRequired);\n        }\n        if (schema.dependentSchemas().length > 0) {\n            final Map<String, Schema> dependentSchema = new LinkedHashMap<>();\n            for (StringToClassMapItem mapItem : schema.dependentSchemas()) {\n                dependentSchema.put(mapItem.key(), resolveSchemaFromType(mapItem.value(), components, jsonViewAnnotation, openapi31, null, null, context));\n            }\n            schemaObject.setDependentSchemas(dependentSchema);\n        }\n        if (schema.patternProperties().length > 0) {\n            final Map<String, Schema> patternProperties = new LinkedHashMap<>();\n            for (StringToClassMapItem mapItem : schema.patternProperties()) {\n                patternProperties.put(mapItem.key(), resolveSchemaFromType(mapItem.value(), components, jsonViewAnnotation, openapi31, null, null, context));\n            }\n            schemaObject.setPatternProperties(patternProperties);\n        }\n        if (schema.properties().length > 0) {\n            final Map<String, Schema> properties = new LinkedHashMap<>();\n            for (StringToClassMapItem mapItem : schema.properties()) {\n                properties.put(mapItem.key(), resolveSchemaFromType(mapItem.value(), components, jsonViewAnnotation, openapi31, null, null, context));\n            }\n            schemaObject.setProperties(properties);\n        }\n        if (!schema.unevaluatedProperties().equals(Void.class)) {\n            schemaObject.setUnevaluatedProperties(resolveSchemaFromType(schema.unevaluatedProperties(), components, jsonViewAnnotation, openapi31, null, null, context));\n        }\n        if (openapi31 && schema.examples().length > 0) {\n            schemaObject.setExamples(parseExamplesArray(schema));\n        }\n\n        if (!DEFAULT_SENTINEL.equals(schema.defaultValue())){\n            setDefaultSchema(schema, openapi31, schemaObject);\n        }\n        if (StringUtils.isNotBlank(schema.example()) &&\n            (!openapi31 || schema.examples().length == 0)) {\n            setExampleSchema(schema, openapi31, schemaObject);\n        }\n        if (StringUtils.isNotBlank(schema.format())) {\n            schemaObject.setFormat(schema.format());\n        }\n        if (StringUtils.isNotBlank(schema.pattern())) {\n            schemaObject.setPattern(schema.pattern());\n        }\n        if (schema.readOnly()) {\n            schemaObject.setReadOnly(schema.readOnly());\n        }\n        if (schema.deprecated()) {\n            schemaObject.setDeprecated(schema.deprecated());\n        }\n        if (schema.exclusiveMaximum()) {\n            schemaObject.setExclusiveMaximum(schema.exclusiveMaximum());\n        }\n        if (schema.exclusiveMinimum()) {\n            schemaObject.setExclusiveMinimum(schema.exclusiveMinimum());\n        }\n        if (schema.maxProperties() > 0) {\n            schemaObject.setMaxProperties(schema.maxProperties());\n        }\n        if (schema.maxLength() != Integer.MAX_VALUE && schema.maxLength() > 0) {\n            schemaObject.setMaxLength(schema.maxLength());\n        }\n        if (schema.minProperties() > 0) {\n            schemaObject.setMinProperties(schema.minProperties());\n        }\n        if (schema.minLength() > 0) {\n            schemaObject.setMinLength(schema.minLength());\n        }\n        if (schema.multipleOf() != 0) {\n            schemaObject.setMultipleOf(BigDecimal.valueOf(schema.multipleOf()));\n        }\n        if (NumberUtils.isCreatable(schema.maximum())) {\n            String filteredMaximum = schema.maximum().replace(Constants.COMMA, StringUtils.EMPTY);\n            schemaObject.setMaximum(new BigDecimal(filteredMaximum));\n        }\n        if (NumberUtils.isCreatable(schema.minimum())) {\n            String filteredMinimum = schema.minimum().replace(Constants.COMMA, StringUtils.EMPTY);\n            schemaObject.setMinimum(new BigDecimal(filteredMinimum));\n        }\n        if (schema.nullable()) {\n            if (openapi31) {\n                schemaObject.addType(\"null\");\n            } else {\n                schemaObject.setNullable(true);\n            }\n        }\n        if (StringUtils.isNotBlank(schema.title())) {\n            schemaObject.setTitle(schema.title());\n        }\n        if (schema.writeOnly()) {\n            schemaObject.setWriteOnly(schema.writeOnly());\n        }\n        // process after readOnly and writeOnly\n        if (schema.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY)) {\n            schemaObject.setReadOnly(true);\n            schemaObject.setWriteOnly(null);\n        } else if (schema.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.WRITE_ONLY)) {\n            schemaObject.setReadOnly(null);\n            schemaObject.setWriteOnly(true);\n        } else if (schema.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_WRITE)) {\n            schemaObject.setReadOnly(null);\n            schemaObject.setWriteOnly(null);\n        }\n        if (schema.requiredProperties().length > 0) {\n            schemaObject.setRequired(Arrays.asList(schema.requiredProperties()));\n        }\n        if (schema.allowableValues().length > 0) {\n            schemaObject.setEnum(Arrays.asList(schema.allowableValues()));\n        }\n\n        if (schema.extensions().length > 0) {\n            boolean usePrefix = !openapi31;\n            Map<String, Object> extensions = AnnotationsUtils.getExtensions(openapi31, usePrefix, schema.extensions());\n            if (extensions != null) {\n                extensions.forEach(schemaObject::addExtension);\n            }\n        }\n\n        getExternalDocumentation(schema.externalDocs(), openapi31).ifPresent(schemaObject::setExternalDocs);\n\n        if (!schema.not().equals(Void.class)) {\n            Class<?> schemaImplementation = schema.not();\n            Schema notSchemaObject = resolveSchemaFromType(schemaImplementation, components, jsonViewAnnotation, openapi31, null, null, context);\n            schemaObject.setNot(notSchemaObject);\n        }\n        if (schema.oneOf().length > 0) {\n            Class<?>[] schemaImplementations = schema.oneOf();\n            for (Class<?> schemaImplementation : schemaImplementations) {\n                Schema oneOfSchemaObject = resolveSchemaFromType(schemaImplementation, components, jsonViewAnnotation, openapi31, null, null, context);\n                schemaObject.addOneOfItem(oneOfSchemaObject);\n            }\n        }\n        if (schema.anyOf().length > 0) {\n            Class<?>[] schemaImplementations = schema.anyOf();\n            for (Class<?> schemaImplementation : schemaImplementations) {\n                Schema anyOfSchemaObject = resolveSchemaFromType(schemaImplementation, components, jsonViewAnnotation, openapi31, null, null, context);\n                schemaObject.addAnyOfItem(anyOfSchemaObject);\n            }\n        }\n        if (schema.allOf().length > 0) {\n            Class<?>[] schemaImplementations = schema.allOf();\n            for (Class<?> schemaImplementation : schemaImplementations) {\n                Schema allOfSchemaObject = resolveSchemaFromType(schemaImplementation, components, jsonViewAnnotation, openapi31, null, null, context);\n                schemaObject.addAllOfItem(allOfSchemaObject);\n            }\n        }\n        if (schema.additionalProperties().equals(io.swagger.v3.oas.annotations.media.Schema.AdditionalPropertiesValue.TRUE)) {\n            schemaObject.additionalProperties(true);\n        } else if (schema.additionalProperties().equals(io.swagger.v3.oas.annotations.media.Schema.AdditionalPropertiesValue.FALSE)) {\n            schemaObject.additionalProperties(false);\n        } else {\n            if (!schema.additionalPropertiesSchema().equals(Void.class)) {\n                schemaObject.additionalProperties(resolveSchemaFromType(schema.additionalPropertiesSchema(), components, jsonViewAnnotation, openapi31, null, null, context));\n            }\n        }\n\n        return Optional.of(schemaObject);\n    }\n\n    private static void setExampleSchema(io.swagger.v3.oas.annotations.media.Schema schema, boolean openapi31, Schema schemaObject) {\n        String exampleValue = schema.example().trim();\n        final ObjectMapper mapper = openapi31 ? Json31.mapper() : Json.mapper();\n\n        try {\n            JsonNode node = mapper.readTree(exampleValue);\n            // Only parse \"null\" as null value when nullable=true\n            if (node.isNull() && schema.nullable()) {\n                schemaObject.setExample(null);\n            } else if (node.isObject() || node.isArray()) {\n                schemaObject.setExample(node);\n            } else {\n                schemaObject.setExample(exampleValue);\n            }\n        } catch (IOException ignored) {\n            schemaObject.setExample(exampleValue);\n        }\n    }\n\n    private static void setDefaultSchema(io.swagger.v3.oas.annotations.media.Schema schema, boolean openapi31, Schema schemaObject) {\n        String defaultValue = schema.defaultValue().trim();\n        final ObjectMapper mapper = openapi31 ? Json31.mapper() : Json.mapper();\n\n        try {\n            JsonNode node = mapper.readTree(defaultValue);\n            // Only parse \"null\" as null value when nullable=true\n            if (node.isNull() && schema.nullable()) {\n                schemaObject.setDefault(null);\n            } else if (node.isObject() || node.isArray()) {\n                schemaObject.setDefault(node);\n            } else {\n                schemaObject.setDefault(defaultValue);\n            }\n        } catch (IOException ignored) {\n            schemaObject.setDefault(defaultValue);\n        }\n    }\n\n    public static List<Object> parseExamplesArray(io.swagger.v3.oas.annotations.media.Schema schema) {\n        String[] examplesArray = schema.examples();\n        List<Object> parsedExamples = new ArrayList<>();\n        final ObjectMapper mapper = Json31.mapper();\n\n        for (String exampleStr : examplesArray) {\n            if (StringUtils.isBlank(exampleStr)) {\n                parsedExamples.add(exampleStr);\n                continue;\n            }\n\n            String trimmed = exampleStr.trim();\n            try {\n                JsonNode node = mapper.readTree(trimmed);\n                // Only parse \"null\" as null value when nullable=true\n                if (node.isNull() && schema.nullable()) {\n                    parsedExamples.add(null);\n                } else if (node.isObject() || node.isArray()) {\n                    parsedExamples.add(node);\n                } else {\n                    parsedExamples.add(trimmed);\n                }\n            } catch (IOException ignored) {\n                parsedExamples.add(trimmed);\n            }\n        }\n\n        return parsedExamples;\n    }\n\n    public static Schema resolveSchemaFromType(Class<?> schemaImplementation, Components components, JsonView jsonViewAnnotation) {\n        return resolveSchemaFromType(schemaImplementation, components, jsonViewAnnotation, false);\n    }\n\n    public static Schema resolveSchemaFromType(Class<?> schemaImplementation, Components components, JsonView jsonViewAnnotation, boolean openapi31) {\n        return resolveSchemaFromType(schemaImplementation, components, jsonViewAnnotation, openapi31, null, null, null);\n    }\n    public static Schema resolveSchemaFromType(Class<?> schemaImplementation, Components components, JsonView jsonViewAnnotation, boolean openapi31, io.swagger.v3.oas.annotations.media.Schema schemaAnnotation, io.swagger.v3.oas.annotations.media.ArraySchema arrayAnnotation, ModelConverterContext context) {\n        Schema schemaObject;\n        PrimitiveType primitiveType = PrimitiveType.fromType(schemaImplementation);\n        if (primitiveType != null) {\n            schemaObject = openapi31 ? primitiveType.createProperty31() : primitiveType.createProperty();\n        } else {\n            schemaObject = new Schema();\n            ResolvedSchema resolvedSchema = null;\n            if (context == null) {\n                resolvedSchema = ModelConverters.getInstance(openapi31).readAllAsResolvedSchema(new AnnotatedType().type(schemaImplementation).components(components).jsonViewAnnotation(jsonViewAnnotation));\n            } else {\n                Schema resSchema = context.resolve(new AnnotatedType().type(schemaImplementation).components(components).jsonViewAnnotation(jsonViewAnnotation));\n                if (resSchema != null) {\n                    resolvedSchema = new ResolvedSchema();\n                    resolvedSchema.schema = resSchema;\n                    resolvedSchema.referencedSchemas = context.getDefinedModels();\n                }\n            }\n            Map<String, Schema> schemaMap;\n            if (resolvedSchema != null) {\n                schemaMap = resolvedSchema.referencedSchemas;\n                if (schemaMap != null) {\n                    schemaMap.forEach((key, referencedSchema) -> {\n                        if (components != null) {\n                            if (context != null) {\n                                context.defineModel(key, referencedSchema);\n                            }\n                            components.addSchemas(key, referencedSchema);\n                        }\n                    });\n                }\n                if (resolvedSchema.schema != null) {\n                    if (StringUtils.isNotBlank(resolvedSchema.schema.getName())) {\n                        schemaObject.set$ref(COMPONENTS_REF + resolvedSchema.schema.getName());\n                    } else {\n                        schemaObject = resolvedSchema.schema;\n                    }\n                }\n            }\n        }\n        // Schema existingSchemaObject = clone(schemaObject, openapi31);\n        Schema existingSchemaObject = schemaObject;\n        if (openapi31) {\n            Optional<Schema> reResolvedSchema = resolveSiblings(existingSchemaObject, components, jsonViewAnnotation, openapi31, schemaAnnotation, arrayAnnotation);\n            if (reResolvedSchema.isPresent()) {\n                existingSchemaObject = reResolvedSchema.get();\n            }\n        }\n        if (StringUtils.isBlank(existingSchemaObject.get$ref()) && StringUtils.isBlank(existingSchemaObject.getType())) {\n            // default to string\n            existingSchemaObject.setType(\"string\");\n        }\n        return existingSchemaObject;\n    }\n\n    private static Optional<Schema> resolveSiblings(Schema existingSchemaObject,\n                                                    Components components,\n                                                    JsonView jsonViewAnnotation,\n                                                    boolean openapi31,\n                                                    io.swagger.v3.oas.annotations.media.Schema schemaAnnotation,\n                                                    io.swagger.v3.oas.annotations.media.ArraySchema arrayAnnotation) {\n        Optional<Schema> reResolvedSchema;\n        reResolvedSchema = getSchemaFromAnnotation(schemaAnnotation, components, jsonViewAnnotation, openapi31, existingSchemaObject);\n        // Return the reResolvedSchema if the schemaAnnotation has incurred differences\n        if (reResolvedSchema.isPresent() && !reResolvedSchema.get().equals(existingSchemaObject)) {\n            return reResolvedSchema;\n        }\n        // If there were no changes based upon the schemaAnnotation, check the arrayAnnotation's schema\n        if (arrayAnnotation != null && arrayAnnotation.schema() != null) {\n            reResolvedSchema = getSchemaFromAnnotation(arrayAnnotation.schema(), components, jsonViewAnnotation, openapi31, existingSchemaObject);\n            if (reResolvedSchema.isPresent()) {\n                return reResolvedSchema;\n            }\n        }\n        // If neither of the schema annotations applied any changes, check the arrayAnnotation\n        return getArraySchema(arrayAnnotation, components, null, openapi31, existingSchemaObject);\n    }\n\n    public static Optional<Set<Tag>> getTags(io.swagger.v3.oas.annotations.tags.Tag[] tags, boolean skipOnlyName) {\n        if (tags == null) {\n            return Optional.empty();\n        }\n        Set<Tag> tagsList = new LinkedHashSet<>();\n        for (io.swagger.v3.oas.annotations.tags.Tag tag : tags) {\n            if (StringUtils.isBlank(tag.name())) {\n                continue;\n            }\n            if (skipOnlyName &&\n                    StringUtils.isBlank(tag.description()) &&\n                    StringUtils.isBlank(tag.externalDocs().description()) &&\n                    StringUtils.isBlank(tag.externalDocs().url())) {\n                continue;\n            }\n            Tag tagObject = new Tag();\n            if (StringUtils.isNotBlank(tag.description())) {\n                tagObject.setDescription(tag.description());\n            }\n            tagObject.setName(tag.name());\n            getExternalDocumentation(tag.externalDocs()).ifPresent(tagObject::setExternalDocs);\n            if (tag.extensions().length > 0) {\n                Map<String, Object> extensions = AnnotationsUtils.getExtensions(tag.extensions());\n                if (extensions != null) {\n                    extensions.forEach(tagObject::addExtension);\n                }\n            }\n            tagsList.add(tagObject);\n        }\n        if (tagsList.isEmpty()) {\n            return Optional.empty();\n        }\n        return Optional.of(tagsList);\n    }\n\n    public static Optional<List<Server>> getServers(io.swagger.v3.oas.annotations.servers.Server[] servers) {\n        if (servers == null) {\n            return Optional.empty();\n        }\n        List<Server> serverObjects = new ArrayList<>();\n        for (io.swagger.v3.oas.annotations.servers.Server server : servers) {\n            getServer(server).ifPresent(serverObjects::add);\n        }\n        if (serverObjects.isEmpty()) {\n            return Optional.empty();\n        }\n        return Optional.of(serverObjects);\n    }\n\n    public static Optional<Server> getServer(io.swagger.v3.oas.annotations.servers.Server server) {\n        if (server == null) {\n            return Optional.empty();\n        }\n\n        Server serverObject = new Server();\n        boolean isEmpty = true;\n        if (StringUtils.isNotBlank(server.url())) {\n            serverObject.setUrl(server.url());\n            isEmpty = false;\n        }\n        if (StringUtils.isNotBlank(server.description())) {\n            serverObject.setDescription(server.description());\n            isEmpty = false;\n        }\n        if (server.extensions().length > 0) {\n            Map<String, Object> extensions = AnnotationsUtils.getExtensions(server.extensions());\n            if (extensions != null) {\n                extensions.forEach(serverObject::addExtension);\n            }\n            isEmpty = false;\n        }\n        if (isEmpty) {\n            return Optional.empty();\n        }\n        io.swagger.v3.oas.annotations.servers.ServerVariable[] serverVariables = server.variables();\n        if (serverVariables.length > 0) {\n            ServerVariables serverVariablesObject = new ServerVariables();\n            for (io.swagger.v3.oas.annotations.servers.ServerVariable serverVariable : serverVariables) {\n                ServerVariable serverVariableObject = new ServerVariable();\n                if (StringUtils.isNotBlank(serverVariable.description())) {\n                    serverVariableObject.setDescription(serverVariable.description());\n                }\n                if (StringUtils.isNotBlank(serverVariable.defaultValue())) {\n                    serverVariableObject.setDefault(serverVariable.defaultValue());\n                }\n                if (serverVariable.allowableValues() != null && serverVariable.allowableValues().length > 0) {\n                    if (StringUtils.isNotBlank(serverVariable.allowableValues()[0])) {\n                        serverVariableObject.setEnum(Arrays.asList(serverVariable.allowableValues()));\n                    }\n                }\n                if (serverVariable.extensions() != null && serverVariable.extensions().length > 0) {\n                    Map<String, Object> extensions = AnnotationsUtils.getExtensions(serverVariable.extensions());\n                    if (extensions != null) {\n                        extensions.forEach(serverVariableObject::addExtension);\n                    }\n                }\n                serverVariablesObject.addServerVariable(serverVariable.name(), serverVariableObject);\n            }\n            serverObject.setVariables(serverVariablesObject);\n        }\n\n        return Optional.of(serverObject);\n    }\n\n    public static Optional<ExternalDocumentation> getExternalDocumentation(io.swagger.v3.oas.annotations.ExternalDocumentation externalDocumentation) {\n        return getExternalDocumentation(externalDocumentation, false);\n    }\n\n    public static Optional<ExternalDocumentation> getExternalDocumentation(io.swagger.v3.oas.annotations.ExternalDocumentation externalDocumentation, boolean openapi31) {\n        if (externalDocumentation == null) {\n            return Optional.empty();\n        }\n        boolean isEmpty = true;\n        ExternalDocumentation external = new ExternalDocumentation();\n        if (StringUtils.isNotBlank(externalDocumentation.description())) {\n            isEmpty = false;\n            external.setDescription(externalDocumentation.description());\n        }\n        if (StringUtils.isNotBlank(externalDocumentation.url())) {\n            isEmpty = false;\n            external.setUrl(externalDocumentation.url());\n        }\n        if (externalDocumentation.extensions() != null && externalDocumentation.extensions().length > 0) {\n            Map<String, Object> extensions = AnnotationsUtils.getExtensions(openapi31, externalDocumentation.extensions());\n            if (extensions != null) {\n                if (openapi31) {\n                    extensions.forEach(external::addExtension31);\n                } else {\n                    extensions.forEach(external::addExtension);\n                }\n                isEmpty = false;\n            }\n        }\n\n        if (isEmpty) {\n            return Optional.empty();\n        }\n        return Optional.of(external);\n    }\n\n    public static Optional<Info> getInfo(io.swagger.v3.oas.annotations.info.Info info) {\n        return getInfo(info, false);\n    }\n\n    public static Optional<Info> getInfo(io.swagger.v3.oas.annotations.info.Info info, boolean openapi31) {\n        if (info == null) {\n            return Optional.empty();\n        }\n        boolean isEmpty = true;\n        Info infoObject = new Info();\n        if (StringUtils.isNotBlank(info.description())) {\n            infoObject.setDescription(info.description());\n            isEmpty = false;\n        }\n        if (StringUtils.isNotBlank(info.termsOfService())) {\n            infoObject.setTermsOfService(info.termsOfService());\n            isEmpty = false;\n        }\n        if (StringUtils.isNotBlank(info.title())) {\n            infoObject.setTitle(info.title());\n            isEmpty = false;\n        }\n        if (StringUtils.isNotBlank(info.version())) {\n            infoObject.setVersion(info.version());\n            isEmpty = false;\n        }\n        if (StringUtils.isNotBlank(info.summary())) {\n            infoObject.setSummary(info.summary());\n            isEmpty = false;\n        }\n        if (info.extensions() != null && info.extensions().length > 0) {\n            Map<String, Object> extensions = AnnotationsUtils.getExtensions(openapi31, info.extensions());\n            if (extensions != null) {\n                if (openapi31) {\n                    extensions.forEach(infoObject::addExtension31);\n                } else {\n                    extensions.forEach(infoObject::addExtension);\n                }\n                isEmpty = false;\n            }\n        }\n        if (isEmpty) {\n            return Optional.empty();\n        }\n        getContact(info.contact()).ifPresent(infoObject::setContact);\n        getLicense(info.license()).ifPresent(infoObject::setLicense);\n\n        return Optional.of(infoObject);\n    }\n\n    public static Optional<Contact> getContact(io.swagger.v3.oas.annotations.info.Contact contact) {\n        return getContact(contact, false);\n    }\n\n    public static Optional<Contact> getContact(io.swagger.v3.oas.annotations.info.Contact contact, boolean openapi31) {\n        if (contact == null) {\n            return Optional.empty();\n        }\n        boolean isEmpty = true;\n        Contact contactObject = new Contact();\n        if (StringUtils.isNotBlank(contact.email())) {\n            contactObject.setEmail(contact.email());\n            isEmpty = false;\n        }\n        if (StringUtils.isNotBlank(contact.name())) {\n            contactObject.setName(contact.name());\n            isEmpty = false;\n        }\n        if (StringUtils.isNotBlank(contact.url())) {\n            contactObject.setUrl(contact.url());\n            isEmpty = false;\n        }\n        if (contact.extensions() != null && contact.extensions().length > 0) {\n            Map<String, Object> extensions = AnnotationsUtils.getExtensions(openapi31, contact.extensions());\n            if (extensions != null) {\n                if(openapi31) {\n                    extensions.forEach(contactObject::addExtension31);\n                } else {\n                    extensions.forEach(contactObject::addExtension);\n                }\n                isEmpty = false;\n            }\n        }\n\n        if (isEmpty) {\n            return Optional.empty();\n        }\n        return Optional.of(contactObject);\n    }\n\n    public static Optional<License> getLicense(io.swagger.v3.oas.annotations.info.License license) {\n        return getLicense(license, false);\n    }\n\n    public static Optional<License> getLicense(io.swagger.v3.oas.annotations.info.License license, boolean openapi31) {\n        if (license == null) {\n            return Optional.empty();\n        }\n        License licenseObject = new License();\n        boolean isEmpty = true;\n        if (StringUtils.isNotBlank(license.name())) {\n            licenseObject.setName(license.name());\n            isEmpty = false;\n        }\n        if (StringUtils.isNotBlank(license.url())) {\n            licenseObject.setUrl(license.url());\n            isEmpty = false;\n        }\n        if (StringUtils.isNotBlank(license.identifier())) {\n            licenseObject.setIdentifier(license.identifier());\n            isEmpty = false;\n        }\n        if (license.extensions() != null && license.extensions().length > 0) {\n            Map<String, Object> extensions = AnnotationsUtils.getExtensions(openapi31, license.extensions());\n            if (extensions != null) {\n                if (openapi31) {\n                    extensions.forEach(licenseObject::addExtension31);\n                } else {\n                    extensions.forEach(licenseObject::addExtension);\n                }\n                isEmpty = false;\n            }\n        }\n        if (isEmpty) {\n            return Optional.empty();\n        }\n        return Optional.of(licenseObject);\n    }\n\n    public static Map<String, Link> getLinks(io.swagger.v3.oas.annotations.links.Link[] links) {\n        return getLinks(links, false);\n    }\n\n    public static Map<String, Link> getLinks(io.swagger.v3.oas.annotations.links.Link[] links, boolean openapi31) {\n        Map<String, Link> linkMap = new HashMap<>();\n        if (links == null) {\n            return linkMap;\n        }\n        for (io.swagger.v3.oas.annotations.links.Link link : links) {\n            getLink(link, openapi31).ifPresent(linkResult -> linkMap.put(link.name(), linkResult));\n        }\n        return linkMap;\n    }\n\n    public static Optional<Link> getLink(io.swagger.v3.oas.annotations.links.Link link) {\n        return getLink(link, false);\n    }\n\n    public static Optional<Link> getLink(io.swagger.v3.oas.annotations.links.Link link, boolean openapi31) {\n        if (link == null) {\n            return Optional.empty();\n        }\n        boolean isEmpty = true;\n        Link linkObject = new Link();\n        if (StringUtils.isNotBlank(link.description())) {\n            linkObject.setDescription(link.description());\n            isEmpty = false;\n        }\n        if (StringUtils.isNotBlank(link.operationId())) {\n            linkObject.setOperationId(link.operationId());\n            isEmpty = false;\n            if (StringUtils.isNotBlank(link.operationRef())) {\n                LOGGER.debug(\"OperationId and OperatonRef are mutually exclusive, there must be only one setted\");\n            }\n        } else {\n            if (StringUtils.isNotBlank(link.operationRef())) {\n                linkObject.setOperationRef(link.operationRef());\n                isEmpty = false;\n            }\n        }\n        if (StringUtils.isNotBlank(link.ref())) {\n            linkObject.set$ref(link.ref());\n            isEmpty = false;\n        }\n        if (link.extensions() != null && link.extensions().length > 0) {\n            Map<String, Object> extensions = AnnotationsUtils.getExtensions(openapi31, link.extensions());\n            if (extensions != null) {\n                if (openapi31) {\n                    extensions.forEach(linkObject::addExtension31);\n                } else {\n                    extensions.forEach(linkObject::addExtension);\n                }\n                isEmpty = false;\n            }\n        }\n        if (isEmpty) {\n            return Optional.empty();\n        }\n        Map<String, String> linkParameters = getLinkParameters(link.parameters());\n        if (linkParameters.size() > 0) {\n            linkObject.setParameters(linkParameters);\n        }\n\n        if (StringUtils.isNotBlank(link.requestBody())) {\n            JsonNode processedValue = null;\n            try {\n                if (openapi31) {\n                    processedValue = Json31.mapper().readTree(link.requestBody());\n                } else {\n                    processedValue = Json.mapper().readTree(link.requestBody());\n                }\n            } catch (Exception e) {\n                // not a json string\n            }\n            if (processedValue == null) {\n                linkObject.requestBody(link.requestBody());\n            } else {\n                linkObject.requestBody(processedValue);\n            }\n        }\n        return Optional.of(linkObject);\n    }\n\n    public static Map<String, String> getLinkParameters(LinkParameter[] linkParameter) {\n        Map<String, String> linkParametersMap = new HashMap<>();\n        if (linkParameter == null) {\n            return linkParametersMap;\n        }\n        for (LinkParameter parameter : linkParameter) {\n            if (StringUtils.isNotBlank(parameter.name())) {\n                linkParametersMap.put(parameter.name(), parameter.expression());\n            }\n        }\n\n        return linkParametersMap;\n    }\n\n    public static Optional<Map<String, Header>> getHeaders(io.swagger.v3.oas.annotations.headers.Header[] annotationHeaders, JsonView jsonViewAnnotation) {\n        return getHeaders(annotationHeaders, null, jsonViewAnnotation);\n    }\n    public static Optional<Map<String, Header>> getHeaders(io.swagger.v3.oas.annotations.headers.Header[] annotationHeaders, Components components, JsonView jsonViewAnnotation) {\n        return getHeaders(annotationHeaders, components, jsonViewAnnotation, false);\n    }\n\n    public static Optional<Map<String, Header>> getHeaders(io.swagger.v3.oas.annotations.headers.Header[] annotationHeaders, JsonView jsonViewAnnotation, boolean openapi31) {\n        return getHeaders(annotationHeaders, null, jsonViewAnnotation, openapi31);\n    }\n\n    public static Optional<Map<String, Header>> getHeaders(io.swagger.v3.oas.annotations.headers.Header[] annotationHeaders, Components components, JsonView jsonViewAnnotation, boolean openapi31) {\n        if (annotationHeaders == null) {\n            return Optional.empty();\n        }\n\n        Map<String, Header> headers = new HashMap<>();\n        for (io.swagger.v3.oas.annotations.headers.Header header : annotationHeaders) {\n            getHeader(header, components, jsonViewAnnotation, openapi31).ifPresent(headerResult -> headers.put(header.name(), headerResult));\n        }\n\n        if (headers.size() == 0) {\n            return Optional.empty();\n        }\n        return Optional.of(headers);\n    }\n\n    public static Optional<Header> getHeader(io.swagger.v3.oas.annotations.headers.Header header, JsonView jsonViewAnnotation) {\n        return getHeader(header, null, jsonViewAnnotation);\n    }\n    public static Optional<Header> getHeader(io.swagger.v3.oas.annotations.headers.Header header, Components components, JsonView jsonViewAnnotation) {\n        return getHeader(header, components, jsonViewAnnotation, false);\n    }\n\n    public static Optional<Header> getHeader(io.swagger.v3.oas.annotations.headers.Header header, JsonView jsonViewAnnotation, boolean openapi31) {\n        return getHeader(header, null, jsonViewAnnotation, openapi31);\n    }\n    public static Optional<Header> getHeader(io.swagger.v3.oas.annotations.headers.Header header, Components components, JsonView jsonViewAnnotation, boolean openapi31) {\n\n        if (header == null || header.hidden()) {\n            return Optional.empty();\n        }\n\n        Header headerObject = new Header();\n        boolean isEmpty = !StringUtils.isNotBlank(header.name());\n        if (StringUtils.isNotBlank(header.description())) {\n            headerObject.setDescription(header.description());\n            isEmpty = false;\n        }\n        if (StringUtils.isNotBlank(header.ref())) {\n            headerObject.set$ref(header.ref());\n            isEmpty = false;\n        }\n        if (StringUtils.isNotBlank(header.example())) {\n            try {\n                headerObject.setExample(Json.mapper().readTree(header.example()));\n            } catch (IOException e) {\n                headerObject.setExample(header.example());\n            }\n        }\n        if (header.deprecated()) {\n            headerObject.setDeprecated(header.deprecated());\n        }\n        if (header.required()) {\n            headerObject.setRequired(header.required());\n            isEmpty = false;\n        }\n        Map<String, Example> exampleMap = new LinkedHashMap<>();\n        if (header.examples().length == 1 && StringUtils.isBlank(header.examples()[0].name())) {\n            Optional<Example> exampleOptional = AnnotationsUtils.getExample(header.examples()[0], true);\n            exampleOptional.ifPresent(headerObject::setExample);\n        } else {\n            for (ExampleObject exampleObject : header.examples()) {\n                AnnotationsUtils.getExample(exampleObject).ifPresent(example -> exampleMap.put(exampleObject.name(), example));\n            }\n        }\n        if (!exampleMap.isEmpty()) {\n            headerObject.setExamples(exampleMap);\n        }\n        headerObject.setStyle(Header.StyleEnum.SIMPLE);\n\n        if (header.schema() != null) {\n            if (header.schema().implementation().equals(Void.class)) {\n                AnnotationsUtils.getSchemaFromAnnotation(header.schema(), jsonViewAnnotation, openapi31).ifPresent(\n                    headerObject::setSchema);\n            }else {\n                AnnotatedType annotatedType = new AnnotatedType()\n                        .type(getSchemaType(header.schema()))\n                        .resolveAsRef(true)\n                        .skipOverride(true)\n                        .jsonViewAnnotation(jsonViewAnnotation);\n\n                final ResolvedSchema resolvedSchema = ModelConverters.getInstance(openapi31).resolveAsResolvedSchema(annotatedType);\n\n                if (resolvedSchema.schema != null) {\n                    headerObject.setSchema(resolvedSchema.schema);\n                }\n                if (resolvedSchema.referencedSchemas != null && components != null) {\n                    resolvedSchema.referencedSchemas.forEach(components::addSchemas);\n                }\n\n            }\n        }\n        if (hasArrayAnnotation(header.array())){\n            AnnotationsUtils.getArraySchema(header.array(), components, jsonViewAnnotation, openapi31, null, true).ifPresent(\n                    headerObject::setSchema);\n        }\n\n        setHeaderExplode(headerObject, header);\n        if (isEmpty) {\n            return Optional.empty();\n        }\n\n        return Optional.of(headerObject);\n    }\n\n    public static void setHeaderExplode (Header header, io.swagger.v3.oas.annotations.headers.Header h) {\n        if (isHeaderExplodable(h, header)) {\n            if (Explode.TRUE.equals(h.explode())) {\n                header.setExplode(Boolean.TRUE);\n            } else if (Explode.FALSE.equals(h.explode())) {\n                header.setExplode(Boolean.FALSE);\n            }\n        }\n    }\n\n    private static boolean isHeaderExplodable(io.swagger.v3.oas.annotations.headers.Header h, Header header) {\n        io.swagger.v3.oas.annotations.media.Schema schema = hasArrayAnnotation(h.array()) ? h.array().schema() : h.schema();\n        boolean explode = true;\n        if (schema != null) {\n            Class implementation = schema.implementation();\n            if (implementation == Void.class) {\n                if (!schema.type().equals(\"object\") && !schema.type().equals(\"array\")) {\n                    explode = false;\n                }\n            }\n        }\n        return explode;\n    }\n\n    public static void addEncodingToMediaType(MediaType mediaType, io.swagger.v3.oas.annotations.media.Encoding encoding, JsonView jsonViewAnnotation) {\n        addEncodingToMediaType(mediaType, encoding, jsonViewAnnotation, false);\n    }\n\n    public static void addEncodingToMediaType(MediaType mediaType, io.swagger.v3.oas.annotations.media.Encoding encoding, JsonView jsonViewAnnotation, boolean openapi31) {\n        if (encoding == null) {\n            return;\n        }\n        if (StringUtils.isNotBlank(encoding.name())) {\n\n            Encoding encodingObject = new Encoding();\n\n            if (StringUtils.isNotBlank(encoding.contentType())) {\n                encodingObject.setContentType(encoding.contentType());\n            }\n            if (StringUtils.isNotBlank(encoding.style())) {\n                encodingObject.setStyle(Encoding.StyleEnum.valueOf(encoding.style()));\n            }\n            if (encoding.explode()) {\n                encodingObject.setExplode(encoding.explode());\n            }\n            if (encoding.allowReserved()) {\n                encodingObject.setAllowReserved(encoding.allowReserved());\n            }\n\n            if (encoding.headers() != null) {\n                getHeaders(encoding.headers(), null, jsonViewAnnotation, openapi31).ifPresent(encodingObject::headers);\n            }\n            if (encoding.extensions() != null && encoding.extensions().length > 0) {\n                Map<String, Object> extensions = AnnotationsUtils.getExtensions(openapi31, encoding.extensions());\n                if (extensions != null) {\n                    if (openapi31) {\n                        extensions.forEach(encodingObject::addExtension31);\n                    } else {\n                        extensions.forEach(encodingObject::addExtension);\n                    }\n                }\n            }\n\n            mediaType.addEncoding(encoding.name(), encodingObject);\n        }\n\n    }\n\n    public static Type getSchemaType(io.swagger.v3.oas.annotations.media.Schema schema) {\n        return getSchemaType(schema, false);\n    }\n\n    public static Type getSchemaType(io.swagger.v3.oas.annotations.media.Schema schema, boolean nullIfNotFound) {\n        if (schema == null) {\n            if (nullIfNotFound) {\n                return null;\n            }\n            return String.class;\n        }\n        String schemaType = schema.type();\n        String schemaFormat = schema.format();\n        Class schemaImplementation = schema.implementation();\n\n        if (!schemaImplementation.equals(Void.class)) {\n            return schemaImplementation;\n        } else if (StringUtils.isBlank(schemaType)) {\n            if (nullIfNotFound) {\n                return null;\n            }\n            return String.class;\n        }\n        switch (schemaType) {\n            case \"number\":\n                if (\"float\".equals(schemaFormat)) {\n                    return Float.class;\n                } else if (\"double\".equals(schemaFormat)) {\n                    return Double.class;\n                } else {\n                    return BigDecimal.class;\n                }\n            case \"integer\":\n                if (\"int32\".equals(schemaFormat)) {\n                    return Integer.class;\n                } else {\n                    return Long.class;\n                }\n            case \"boolean\":\n                return Boolean.class;\n            case \"string\":\n                return String.class;\n            default:\n                if (nullIfNotFound) {\n                    return null;\n                }\n                return String.class;\n        }\n    }\n\n    public static Optional<Content> getContent(io.swagger.v3.oas.annotations.media.Content[] annotationContents, String[] classTypes, String[] methodTypes, Schema schema, Components components, JsonView jsonViewAnnotation) {\n        return getContent(annotationContents, classTypes, methodTypes, schema, components, jsonViewAnnotation, false);\n    }\n\n    public static Schema clone(Schema schema, boolean openapi31) {\n        if(schema == null)\n            return schema;\n        try {\n            String cloneName = schema.getName();\n            if(openapi31) {\n                schema = Json31.mapper().readValue(Json31.pretty(schema), Schema.class);\n            } else {\n                schema = Json.mapper().readValue(Json.pretty(schema), Schema.class);\n            }\n            schema.setName(cloneName);\n        } catch (IOException e) {\n            LOGGER.error(\"Could not clone schema\", e);\n        }\n        return schema;\n    }\n    public static Optional<Content> getContent(io.swagger.v3.oas.annotations.media.Content[] annotationContents, String[] classTypes, String[] methodTypes, Schema schema, Components components, JsonView jsonViewAnnotation, boolean openapi31) {\n        if (annotationContents == null || annotationContents.length == 0) {\n            return Optional.empty();\n        }\n\n        //Encapsulating Content model\n        Content content = new Content();\n\n        for (io.swagger.v3.oas.annotations.media.Content annotationContent : annotationContents) {\n            MediaType mediaType = new MediaType();\n            if (components != null) {\n                Optional annSchema = getSchema(annotationContent, components, jsonViewAnnotation, openapi31);\n                if (annSchema.isPresent()) {\n                    // mediaType.setSchema(clone((Schema)annSchema.get(), openapi31));\n                    mediaType.setSchema((Schema)annSchema.get());\n                }\n                if (annotationContent.schemaProperties().length > 0) {\n                    if (mediaType.getSchema() == null) {\n                        mediaType.schema(openapi31 ? new JsonSchema().typesItem(\"object\") : new Schema<Object>().type(\"object\"));\n                    }\n                    Schema oSchema = mediaType.getSchema();\n                    for (SchemaProperty sp: annotationContent.schemaProperties()) {\n                        Class<?> schemaImplementation = sp.schema().implementation();\n                        boolean isArray = false;\n                        if (schemaImplementation == Void.class) {\n                            schemaImplementation = sp.array().schema().implementation();\n                            if (schemaImplementation != Void.class) {\n                                isArray = true;\n                            }\n                        }\n                        getSchema(sp.schema(), sp.array(), isArray, schemaImplementation, components, jsonViewAnnotation, openapi31)\n                                .ifPresent(s -> {\n                                    if (\"array\".equals(oSchema.getType())) {\n                                        oSchema.getItems().addProperty(sp.name(), s);\n                                    } else {\n                                        oSchema.addProperty(sp.name(), s);\n                                    }\n                                });\n\n                    }\n                }\n                Optional<Schema> arraySchemaResult = getArraySchema(annotationContent.additionalPropertiesArraySchema(), components, jsonViewAnnotation, openapi31, null, true);\n                if (arraySchemaResult.isPresent()) {\n                    if (\"array\".equals(mediaType.getSchema().getType())) {\n                        mediaType.getSchema().getItems().additionalProperties(arraySchemaResult.get());\n                    } else {\n                        mediaType.getSchema().additionalProperties(arraySchemaResult.get());\n                    }\n                } else {\n                    if (\n                        hasSchemaAnnotation(annotationContent.additionalPropertiesSchema()) &&\n                        mediaType.getSchema() != null &&\n                        !Boolean.TRUE.equals(mediaType.getSchema().getAdditionalProperties()) &&\n                        !Boolean.FALSE.equals(mediaType.getSchema().getAdditionalProperties())) {\n                        getSchemaFromAnnotation(annotationContent.additionalPropertiesSchema(), components, jsonViewAnnotation, openapi31)\n                                .ifPresent(s -> {\n                                            if (\"array\".equals(mediaType.getSchema().getType())) {\n                                                mediaType.getSchema().getItems().additionalProperties(s);\n                                            } else {\n                                                mediaType.getSchema().additionalProperties(s);\n                                            }\n                                        }\n                                );\n                    }\n                }\n            } else {\n                mediaType.setSchema(schema);\n            }\n\n            ExampleObject[] examples = annotationContent.examples();\n            if (examples.length == 1 && StringUtils.isBlank(examples[0].name())) {\n                getExample(examples[0], true).ifPresent(exampleObject -> mediaType.example(exampleObject.getValue()));\n            } else {\n                for (ExampleObject example : examples) {\n                    getExample(example).ifPresent(exampleObject -> mediaType.addExamples(example.name(), exampleObject));\n                }\n            }\n            if (annotationContent.extensions() != null && annotationContent.extensions().length > 0) {\n                Map<String, Object> extensions = AnnotationsUtils.getExtensions(openapi31, annotationContent.extensions());\n                if (extensions != null) {\n                    if (openapi31) {\n                        extensions.forEach(mediaType::addExtension31);\n                    } else {\n                        extensions.forEach(mediaType::addExtension);\n                    }\n                }\n            }\n\n            io.swagger.v3.oas.annotations.media.Encoding[] encodings = annotationContent.encoding();\n            for (io.swagger.v3.oas.annotations.media.Encoding encoding : encodings) {\n                addEncodingToMediaType(mediaType, encoding, jsonViewAnnotation, openapi31);\n            }\n            if (StringUtils.isNotBlank(annotationContent.mediaType())) {\n                content.addMediaType(annotationContent.mediaType(), mediaType);\n            } else {\n                applyTypes(classTypes, methodTypes, content, mediaType);\n            }\n\n            DependentSchema[] dependentSchemas = annotationContent.dependentSchemas();\n            if (dependentSchemas.length > 0) {\n                final Map<String, Schema> dependentSchemaMap = new LinkedHashMap<>();\n                for (DependentSchema dependentSchema : dependentSchemas) {\n                    if (\"array\".equals(mediaType.getSchema().getType())) {\n                        getArraySchema(dependentSchema.array(), components, jsonViewAnnotation, openapi31).ifPresent(arraySchema -> dependentSchemaMap.put(dependentSchema.name(), arraySchema));\n                    } else {\n                        getSchemaFromAnnotation(dependentSchema.schema(), components, jsonViewAnnotation, openapi31).ifPresent(schema1 -> dependentSchemaMap.put(dependentSchema.name(), schema1));\n                    }\n                }\n                mediaType.getSchema().setDependentSchemas(dependentSchemaMap);\n            }\n            if (mediaType.getSchema() != null) {\n                getSchemaFromAnnotation(annotationContent.contentSchema(), components, jsonViewAnnotation, openapi31).ifPresent(mediaType.getSchema()::setContentSchema);\n                getSchemaFromAnnotation(annotationContent.propertyNames(), components, jsonViewAnnotation, openapi31).ifPresent(mediaType.getSchema()::setPropertyNames);\n                getSchemaFromAnnotation(annotationContent._if(), components, jsonViewAnnotation, openapi31).ifPresent(mediaType.getSchema()::setIf);\n                getSchemaFromAnnotation(annotationContent._then(), components, jsonViewAnnotation, openapi31).ifPresent(mediaType.getSchema()::setThen);\n                getSchemaFromAnnotation(annotationContent._else(), components, jsonViewAnnotation, openapi31).ifPresent(mediaType.getSchema()::setElse);\n                getSchemaFromAnnotation(annotationContent.not(), components, jsonViewAnnotation, openapi31).ifPresent(mediaType.getSchema()::setNot);\n            }\n            if (annotationContent.oneOf().length > 0) {\n                for (io.swagger.v3.oas.annotations.media.Schema oneOfSchema : annotationContent.oneOf()) {\n                    getSchemaFromAnnotation(oneOfSchema, components, jsonViewAnnotation).ifPresent(mediaType.getSchema()::addOneOfItem);\n                }\n            }\n            if (annotationContent.anyOf().length > 0) {\n                for (io.swagger.v3.oas.annotations.media.Schema anyOfSchema : annotationContent.anyOf()) {\n                    getSchemaFromAnnotation(anyOfSchema, components, jsonViewAnnotation).ifPresent(mediaType.getSchema()::addAnyOfItem);\n                }\n            }\n            if (annotationContent.allOf().length > 0) {\n                for (io.swagger.v3.oas.annotations.media.Schema anyOfSchema : annotationContent.allOf()) {\n                    getSchemaFromAnnotation(anyOfSchema, components, jsonViewAnnotation).ifPresent(mediaType.getSchema()::addAllOfItem);\n                }\n            }\n        }\n\n        if (content.size() == 0) {\n            return Optional.empty();\n        }\n        return Optional.of(content);\n    }\n\n    public static Optional<? extends Schema> getSchema(io.swagger.v3.oas.annotations.media.Content annotationContent, Components components, JsonView jsonViewAnnotation) {\n        return getSchema(annotationContent, components, jsonViewAnnotation, false);\n    }\n\n    public static Optional<? extends Schema> getSchema(io.swagger.v3.oas.annotations.media.Content annotationContent, Components components, JsonView jsonViewAnnotation, boolean openapi31) {\n        Class<?> schemaImplementation = annotationContent.schema().implementation();\n        boolean isArray = false;\n        if (schemaImplementation == Void.class) {\n            schemaImplementation = annotationContent.array().schema().implementation();\n            if (schemaImplementation != Void.class) {\n                isArray = true;\n            }\n        }\n        return getSchema(annotationContent.schema(), annotationContent.array(), isArray, schemaImplementation, components, jsonViewAnnotation, openapi31);\n    }\n\n    public static Optional<? extends Schema> getSchema(io.swagger.v3.oas.annotations.media.Schema schemaAnnotation,\n                                                       io.swagger.v3.oas.annotations.media.ArraySchema arrayAnnotation,\n                                                       boolean isArray,\n                                                       Class<?> schemaImplementation,\n                                                       Components components,\n                                                       JsonView jsonViewAnnotation) {\n        return getSchema(schemaAnnotation, arrayAnnotation, isArray, schemaImplementation, components, jsonViewAnnotation, false);\n\n    }\n\n    public static Optional<? extends Schema> getSchema(io.swagger.v3.oas.annotations.media.Schema schemaAnnotation,\n                                                       io.swagger.v3.oas.annotations.media.ArraySchema arrayAnnotation,\n                                                       boolean isArray,\n                                                       Class<?> schemaImplementation,\n                                                       Components components,\n                                                       JsonView jsonViewAnnotation,\n                                                       boolean openapi31) {\n        if (schemaImplementation != Void.class) {\n            Schema schemaObject = resolveSchemaFromType(schemaImplementation, components, jsonViewAnnotation, openapi31, schemaAnnotation, arrayAnnotation, null);\n            if (StringUtils.isNotBlank(schemaAnnotation.format())) {\n               schemaObject.setFormat(schemaAnnotation.format());\n            }\n            if (isArray) {\n                Optional<Schema> arraySchema = AnnotationsUtils.getArraySchema(arrayAnnotation, components, jsonViewAnnotation, openapi31, null);\n                if (arraySchema.isPresent()) {\n                    arraySchema.get().setItems(schemaObject);\n                    return arraySchema;\n                } else {\n                    return Optional.empty();\n                }\n            } else {\n                return Optional.of(schemaObject);\n            }\n\n        } else {\n            Optional<Schema> schemaFromAnnotation = AnnotationsUtils.getSchemaFromAnnotation(schemaAnnotation, components, jsonViewAnnotation, openapi31);\n            if (schemaFromAnnotation.isPresent()) {\n                if (StringUtils.isBlank(schemaFromAnnotation.get().get$ref()) && StringUtils.isBlank(schemaFromAnnotation.get().getType()) && !(schemaFromAnnotation.get() instanceof ComposedSchema)) {\n                    // default to string\n                    schemaFromAnnotation.get().setType(\"string\");\n                }\n                return Optional.of(schemaFromAnnotation.get());\n            } else {\n                Optional<Schema> arraySchemaFromAnnotation = AnnotationsUtils.getArraySchema(arrayAnnotation, components, jsonViewAnnotation, openapi31, null);\n                if (arraySchemaFromAnnotation.isPresent()) {\n                    if (arraySchemaFromAnnotation.get().getItems() != null && StringUtils.isBlank(arraySchemaFromAnnotation.get().getItems().get$ref()) && StringUtils.isBlank(arraySchemaFromAnnotation.get().getItems().getType())) {\n                        // default to string\n                        arraySchemaFromAnnotation.get().getItems().setType(\"string\");\n                    }\n                    return Optional.of(arraySchemaFromAnnotation.get());\n                }\n            }\n        }\n        return Optional.empty();\n    }\n\n\n    public static void applyTypes(String[] classTypes, String[] methodTypes, Content content, MediaType mediaType) {\n        if (methodTypes != null && methodTypes.length > 0) {\n            for (String value : methodTypes) {\n                content.addMediaType(value, mediaType);\n            }\n        } else if (classTypes != null && classTypes.length > 0) {\n            for (String value : classTypes) {\n                content.addMediaType(value, mediaType);\n            }\n        } else {\n            content.addMediaType(ParameterProcessor.MEDIA_TYPE, mediaType);\n        }\n\n    }\n\n    public static io.swagger.v3.oas.annotations.media.Schema getSchemaAnnotation(Annotated a) {\n        if (a == null) {\n            return null;\n        }\n        io.swagger.v3.oas.annotations.media.ArraySchema arraySchema = a.getAnnotation(io.swagger.v3.oas.annotations.media.ArraySchema.class);\n        if (arraySchema != null) {\n            return arraySchema.schema();\n        } else {\n            return a.getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n        }\n    }\n\n    public static io.swagger.v3.oas.annotations.media.Schema getSchemaDeclaredAnnotation(Annotated a) {\n        if (a == null) {\n            return null;\n        }\n        io.swagger.v3.oas.annotations.media.ArraySchema arraySchema = a.getRawType().getDeclaredAnnotation(io.swagger.v3.oas.annotations.media.ArraySchema.class);\n        if (arraySchema != null) {\n            return arraySchema.schema();\n        } else {\n            return a.getRawType().getDeclaredAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n        }\n    }\n\n    public static io.swagger.v3.oas.annotations.media.Schema getSchemaAnnotation(Class<?> cls) {\n        if (cls == null) {\n            return null;\n        }\n        io.swagger.v3.oas.annotations.media.Schema mp = null;\n        io.swagger.v3.oas.annotations.media.ArraySchema as = cls.getAnnotation(io.swagger.v3.oas.annotations.media.ArraySchema.class);\n        if (as != null) {\n            mp = as.schema();\n        } else {\n            mp = cls.getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n        }\n        return mp;\n    }\n\n    public static io.swagger.v3.oas.annotations.media.Schema getSchemaDeclaredAnnotation(Class<?> cls) {\n        if (cls == null) {\n            return null;\n        }\n        io.swagger.v3.oas.annotations.media.Schema mp = null;\n        io.swagger.v3.oas.annotations.media.ArraySchema as = cls.getDeclaredAnnotation(io.swagger.v3.oas.annotations.media.ArraySchema.class);\n        if (as != null) {\n            mp = as.schema();\n        } else {\n            mp = cls.getDeclaredAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n        }\n        return mp;\n    }\n\n    public static Map<String, Object> getExtensions(Extension... extensions) {\n        return getExtensions(false, true, extensions);\n    }\n\n    public static Map<String, Object> getExtensions(boolean openapi31, Extension... extensions) {\n        return getExtensions(openapi31, true, extensions);\n    }\n\n    public static Map<String, Object> getExtensions(boolean openapi31, boolean usePrefix, Extension... extensions) {\n        final Map<String, Object> map = new HashMap<>();\n        for (Extension extension : extensions) {\n            final String name = extension.name();\n            String decoratedName = usePrefix\n                    ? StringUtils.prependIfMissing(name, \"x-\")\n                    : name;\n            final String key = name.isEmpty() ? name : decoratedName;\n\n            for (ExtensionProperty property : extension.properties()) {\n                final String propertyName = property.name();\n                final String propertyValue = property.value();\n                JsonNode processedValue;\n                final boolean propertyAsJson = property.parseValue();\n                if (StringUtils.isNotBlank(propertyName) && StringUtils.isNotBlank(propertyValue)) {\n                    if (key.isEmpty()) {\n                        if (propertyAsJson) {\n                            try {\n                                if (openapi31) {\n                                    processedValue = Json31.mapper().readTree(propertyValue);\n                                } else {\n                                    processedValue = Json.mapper().readTree(propertyValue);\n                                }\n                                decoratedName = usePrefix ? StringUtils.prependIfMissing(propertyName, \"x-\") : propertyName;\n                                map.put(decoratedName, processedValue);\n                            } catch (Exception e) {\n                                decoratedName = usePrefix ? StringUtils.prependIfMissing(propertyName, \"x-\") : propertyName;\n                                map.put(decoratedName, propertyValue);\n                            }\n                        } else {\n                            decoratedName = usePrefix ? StringUtils.prependIfMissing(propertyName, \"x-\") : propertyName;\n                            map.put(decoratedName, propertyValue);\n                        }\n                    } else {\n                        Object value = map.get(key);\n                        if (!(value instanceof Map)) {\n                            value = new HashMap<String, Object>();\n                            map.put(key, value);\n                        }\n                        @SuppressWarnings(\"unchecked\") final Map<String, Object> mapValue = (Map<String, Object>) value;\n                        if (propertyAsJson) {\n                            try {\n                                if (openapi31) {\n                                    processedValue = Json31.mapper().readTree(propertyValue);\n                                } else {\n                                    processedValue = Json.mapper().readTree(propertyValue);\n                                }\n                                mapValue.put(propertyName, processedValue);\n                            } catch (Exception e) {\n                                mapValue.put(propertyName, propertyValue);\n                            }\n                        } else {\n                            mapValue.put(propertyName, propertyValue);\n                        }\n                    }\n                }\n            }\n        }\n\n        return map;\n    }\n\n    public static io.swagger.v3.oas.annotations.media.Schema getSchemaAnnotation(Annotation... annotations) {\n        if (annotations == null) {\n            return null;\n        }\n        for (Annotation annotation : annotations) {\n            if (annotation instanceof io.swagger.v3.oas.annotations.media.Schema) {\n                return (io.swagger.v3.oas.annotations.media.Schema) annotation;\n            }\n        }\n        return null;\n    }\n\n    public static io.swagger.v3.oas.annotations.media.ArraySchema getArraySchemaAnnotation(Annotation... annotations) {\n        if (annotations == null) {\n            return null;\n        }\n        for (Annotation annotation : annotations) {\n            if (annotation instanceof io.swagger.v3.oas.annotations.media.ArraySchema) {\n                return (io.swagger.v3.oas.annotations.media.ArraySchema) annotation;\n            }\n        }\n        return null;\n    }\n\n    public static <T> T getAnnotation(Class<T> cls, Annotation... annotations) {\n        if (annotations == null) {\n            return null;\n        }\n        for (Annotation annotation : annotations) {\n            if (cls.isAssignableFrom(annotation.getClass())) {\n                return (T)annotation;\n            }\n        }\n        return null;\n    }\n\n    public static Annotation[] removeAnnotations(Annotation[] annotations, Class ... classes) {\n        if (annotations == null) {\n            return null;\n        }\n        List<Annotation> result = new ArrayList<>();\n        for (Annotation annotation : annotations) {\n            boolean found = false;\n            for (Class cls : classes) {\n                if (cls.isAssignableFrom(annotation.getClass())) {\n                    found = true;\n                }\n            }\n            if (!found) {\n                result.add(annotation);\n            }\n        }\n        return result.toArray(new Annotation[result.size()]);\n    }\n\n\n    public static void updateAnnotation(Class<?> clazz, io.swagger.v3.oas.annotations.media.Schema newAnnotation) {\n        try {\n            Field field = Class.class.getDeclaredField(\"annotations\");\n            field.setAccessible(true);\n            Map<Class<? extends Annotation>, Annotation> annotations = (Map<Class<? extends Annotation>, Annotation>) field.get(clazz);\n            annotations.put(io.swagger.v3.oas.annotations.media.Schema.class, newAnnotation);\n        } catch (NoSuchFieldException e) {\n            //\n        } catch (IllegalAccessException e) {\n            //\n        }\n\n    }\n\n    public static Annotation mergeSchemaAnnotations(\n            Annotation[] ctxAnnotations, JavaType type) {\n        return mergeSchemaAnnotations(ctxAnnotations, type, false);\n    }\n    /*\n     * returns null if no annotations, otherwise either ArraySchema or Schema\n     */\n    public static Annotation mergeSchemaAnnotations(\n            Annotation[] ctxAnnotations, JavaType type, boolean contextWins) {\n        // get type array and schema\n        io.swagger.v3.oas.annotations.media.Schema tS = type.getRawClass().getDeclaredAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n        if (!hasSchemaAnnotation(tS)) {\n            tS = null;\n        }\n        io.swagger.v3.oas.annotations.media.ArraySchema tA = type.getRawClass().getDeclaredAnnotation(io.swagger.v3.oas.annotations.media.ArraySchema.class);\n        if (!hasArrayAnnotation(tA)) {\n            tA = null;\n        }\n\n        io.swagger.v3.oas.annotations.media.Schema tAs = tA == null ? null : tA.schema();\n        if (!hasSchemaAnnotation(tAs)) {\n            tAs = null;\n        }\n        // get ctx array and schema\n        io.swagger.v3.oas.annotations.media.Schema cS = getSchemaAnnotation(ctxAnnotations);\n        if (!hasSchemaAnnotation(cS)) {\n            cS = null;\n        }\n        io.swagger.v3.oas.annotations.media.ArraySchema cA = getArraySchemaAnnotation(ctxAnnotations);\n        if (!hasArrayAnnotation(cA)) {\n            cA = null;\n        }\n        io.swagger.v3.oas.annotations.media.Schema cAs = cA == null ? null : cA.schema();\n        if (!hasSchemaAnnotation(cAs)) {\n            cAs = null;\n        }\n\n        if (tS == null && tA == null && cS == null && cA == null) {\n            return null;\n        }\n\n        else if (tS == null && tA == null && cS != null) {\n            return cS;\n        }\n\n        else if (tS == null && tA == null && cS == null && cA != null) {\n            return cA;\n        }\n\n        else if (tS == null && tA != null && cS == null && cA == null) {\n            return tA;\n        }\n\n        else if (tS == null && tA != null && cS != null && cA == null) {\n            if (tAs != null) {\n                return tA;\n            }\n            return mergeArrayWithSchemaAnnotation(tA, cS);\n        }\n\n        else if (tS != null && tA == null && cS == null && cA != null) {\n            if (cAs != null) {\n                return cA;\n            }\n            return mergeArrayWithSchemaAnnotation(cA, tS);\n        }\n\n        else if (tA != null && cA != null) {\n            if (contextWins) {\n                return mergeArraySchemaAnnotations(tA, cA);\n            }\n            return mergeArraySchemaAnnotations(cA, tA);\n        }\n\n        else if (tS != null && cS == null && cA == null) {\n            return tS;\n        }\n\n        else if (tS != null && cS != null) {\n            if (contextWins) {\n                return mergeSchemaAnnotations(cS, tS);\n            }\n            return mergeSchemaAnnotations(tS, cS);\n        }\n\n        else {\n            return tS;\n        }\n\n\n    }\n    public static io.swagger.v3.oas.annotations.media.Schema mergeSchemaAnnotations(\n            io.swagger.v3.oas.annotations.media.Schema master,\n            io.swagger.v3.oas.annotations.media.Schema patch) {\n        if (master == null) {\n            return patch;\n        } else if (patch == null) {\n            return master;\n        } else if (!hasSchemaAnnotation(patch)) {\n            return master;\n        }\n        Annotation schema = new io.swagger.v3.oas.annotations.media.Schema() {\n            @Override\n            public Class<?> implementation() {\n                if (!master.implementation().equals(Void.class) || patch.implementation().equals(Void.class)) {\n                    return master.implementation();\n                }\n                return patch.implementation();\n            }\n\n            @Override\n            public Class<?> not() {\n                if (!master.not().equals(Void.class) || patch.not().equals(Void.class)) {\n                    return master.not();\n                }\n                return patch.not();\n            }\n\n            @Override\n            public Class<?>[] oneOf() {\n                if (master.oneOf().length > 0 || patch.oneOf().length == 0) {\n                    return master.oneOf();\n                }\n                return patch.oneOf();\n            }\n\n            @Override\n            public Class<?>[] anyOf() {\n                if (master.anyOf().length > 0 || patch.anyOf().length == 0) {\n                    return master.anyOf();\n                }\n                return patch.anyOf();\n            }\n\n            @Override\n            public Class<?>[] allOf() {\n                if (master.allOf().length > 0 || patch.allOf().length == 0) {\n                    return master.allOf();\n                }\n                return patch.allOf();\n            }\n\n            @Override\n            public String name() {\n                if (StringUtils.isNotBlank(master.name()) || StringUtils.isBlank(patch.name())) {\n                    return master.name();\n                }\n                return patch.name();\n            }\n\n            @Override\n            public String title() {\n                if (StringUtils.isNotBlank(master.title()) || StringUtils.isBlank(patch.title())) {\n                    return master.title();\n                }\n                return patch.title();\n            }\n\n            @Override\n            public double multipleOf() {\n                if (master.multipleOf() != 0 || patch.multipleOf() == 0) {\n                    return master.multipleOf();\n                }\n                return patch.multipleOf();\n\n            }\n\n            @Override\n            public String maximum() {\n                if (StringUtils.isNotBlank(master.maximum()) || StringUtils.isBlank(patch.maximum())) {\n                    return master.maximum();\n                }\n                return patch.maximum();\n            }\n\n            @Override\n            public boolean exclusiveMaximum() {\n                if (master.exclusiveMaximum() || !patch.exclusiveMaximum()) {\n                    return master.exclusiveMaximum();\n                }\n                return patch.exclusiveMaximum();\n            }\n\n            @Override\n            public String minimum() {\n                if (StringUtils.isNotBlank(master.minimum()) || StringUtils.isBlank(patch.minimum())) {\n                    return master.minimum();\n                }\n                return patch.minimum();\n            }\n\n            @Override\n            public boolean exclusiveMinimum() {\n                if (master.exclusiveMinimum() || !patch.exclusiveMinimum()) {\n                    return master.exclusiveMinimum();\n                }\n                return patch.exclusiveMinimum();\n            }\n\n            @Override\n            public int maxLength() {\n                if ((   master.maxLength() != Integer.MAX_VALUE && master.maxLength() > 0) ||\n                        (patch.maxLength() == Integer.MAX_VALUE || patch.maxLength() == 0)   ) {\n                    return master.maxLength();\n                }\n                return patch.maxLength();\n            }\n\n            @Override\n            public int minLength() {\n                if (master.minLength() != 0 || patch.minLength() == 0) {\n                    return master.minLength();\n                }\n                return patch.minLength();\n            }\n\n            @Override\n            public String pattern() {\n                if (StringUtils.isNotBlank(master.pattern()) || StringUtils.isBlank(patch.pattern())) {\n                    return master.pattern();\n                }\n                return patch.pattern();\n            }\n\n            @Override\n            public int maxProperties() {\n                if (master.maxProperties() != 0 || patch.maxProperties() == 0) {\n                    return master.maxProperties();\n                }\n                return patch.maxProperties();\n            }\n\n            @Override\n            public int minProperties() {\n                if (master.minProperties() != 0 || patch.minProperties() == 0) {\n                    return master.minProperties();\n                }\n                return patch.minProperties();\n            }\n\n            @Override\n            public String[] requiredProperties() {\n                if (master.requiredProperties().length > 0 || patch.requiredProperties().length == 0) {\n                    return master.requiredProperties();\n                }\n                return patch.requiredProperties();\n            }\n\n            @Override\n            public boolean required() {\n                if (master.required() || !patch.required()) {\n                    return master.required();\n                }\n                return patch.required();\n            }\n\n            @Override\n            public RequiredMode requiredMode() {\n                if (!master.requiredMode().equals(RequiredMode.AUTO) || patch.requiredMode().equals(RequiredMode.AUTO)) {\n                    return master.requiredMode();\n                }\n                return patch.requiredMode();\n            }\n\n            @Override\n            public String description() {\n                if (StringUtils.isNotBlank(master.description()) || StringUtils.isBlank(patch.description())) {\n                    return master.description();\n                }\n                return patch.description();\n            }\n\n            @Override\n            public String format() {\n                if (StringUtils.isNotBlank(master.format()) || StringUtils.isBlank(patch.format())) {\n                    return master.format();\n                }\n                return patch.format();\n            }\n\n            @Override\n            public String ref() {\n                if (StringUtils.isNotBlank(master.ref()) || StringUtils.isBlank(patch.ref())) {\n                    return master.ref();\n                }\n                return patch.ref();\n            }\n\n            @Override\n            public boolean nullable() {\n                if (master.nullable() || !patch.nullable()) {\n                    return master.nullable();\n                }\n                return patch.nullable();\n            }\n\n            @Override\n            public boolean readOnly() {\n                if (master.readOnly() || !patch.readOnly()) {\n                    return master.readOnly();\n                }\n                return patch.readOnly();\n            }\n\n            @Override\n            public boolean writeOnly() {\n                if (master.writeOnly() || !patch.writeOnly()) {\n                    return master.writeOnly();\n                }\n                return patch.writeOnly();\n            }\n\n            @Override\n            public AccessMode accessMode() {\n                if (!master.accessMode().equals(AccessMode.AUTO) || patch.accessMode().equals(AccessMode.AUTO)) {\n                    return master.accessMode();\n                }\n                return patch.accessMode();\n            }\n\n            @Override\n            public String example() {\n                if (StringUtils.isNotBlank(master.example()) || StringUtils.isBlank(patch.example())) {\n                    return master.example();\n                }\n                return patch.example();\n            }\n\n            @Override\n            public io.swagger.v3.oas.annotations.ExternalDocumentation externalDocs() {\n                if (getExternalDocumentation(master.externalDocs()).isPresent() || !getExternalDocumentation(patch.externalDocs()).isPresent()) {\n                    return master.externalDocs();\n                }\n                return patch.externalDocs();\n            }\n\n            @Override\n            public boolean deprecated() {\n                if (master.deprecated() || !patch.deprecated()) {\n                    return master.deprecated();\n                }\n                return patch.deprecated();\n            }\n\n            @Override\n            public String type() {\n                if (StringUtils.isNotBlank(master.type()) || StringUtils.isBlank(patch.type())) {\n                    return master.type();\n                }\n                return patch.type();\n            }\n\n            @Override\n            public String[] allowableValues() {\n                if (master.allowableValues().length > 0 || patch.allowableValues().length == 0) {\n                    return master.allowableValues();\n                }\n                return patch.allowableValues();\n            }\n\n            @Override\n            public String defaultValue() {\n                if (!DEFAULT_SENTINEL.equals(master.defaultValue())) {\n                    return master.defaultValue();\n                }\n                if (!DEFAULT_SENTINEL.equals(patch.defaultValue())) {\n                    return patch.defaultValue();\n                }\n                return master.defaultValue();\n            }\n\n            @Override\n            public String discriminatorProperty() {\n                if (StringUtils.isNotBlank(master.discriminatorProperty()) || StringUtils.isBlank(patch.discriminatorProperty())) {\n                    return master.discriminatorProperty();\n                }\n                return patch.discriminatorProperty();\n            }\n\n            @Override\n            public DiscriminatorMapping[] discriminatorMapping() {\n                if (master.discriminatorMapping().length > 0 || patch.discriminatorMapping().length == 0) {\n                    return master.discriminatorMapping();\n                }\n                return patch.discriminatorMapping();\n            }\n\n            @Override\n            public boolean hidden() {\n                if (master.hidden() || !patch.hidden()) {\n                    return master.hidden();\n                }\n                return patch.hidden();\n            }\n\n            @Override\n            public boolean enumAsRef() {\n                if (master.enumAsRef() || !patch.enumAsRef()) {\n                    return master.enumAsRef();\n                }\n                return patch.enumAsRef();\n            }\n\n            @Override\n            public Class<?>[] subTypes() {\n                if (master.subTypes().length > 0 || patch.subTypes().length == 0) {\n                    return master.subTypes();\n                }\n                return patch.subTypes();\n            }\n\n            @Override\n            public Extension[] extensions() {\n                if (master.extensions().length > 0 || patch.extensions().length == 0) {\n                    return master.extensions();\n                }\n                return patch.extensions();\n            }\n\n            @Override\n            public Class<?>[] prefixItems() {\n                if (master.prefixItems().length > 0 || patch.prefixItems().length == 0) {\n                    return master.prefixItems();\n                }\n                return patch.prefixItems();\n            }\n\n            @Override\n            public String[] types() {\n                if (master.types().length > 0 || patch.types().length == 0) {\n                    return master.types();\n                }\n                return patch.types();\n            }\n\n            @Override\n            public int exclusiveMaximumValue() {\n                if (master.exclusiveMaximumValue() != 0 || patch.exclusiveMaximumValue() == 0) {\n                    return master.exclusiveMaximumValue();\n                }\n                return patch.exclusiveMaximumValue();\n            }\n\n            @Override\n            public int exclusiveMinimumValue() {\n                if (master.exclusiveMinimumValue() != 0 || patch.exclusiveMinimumValue() == 0) {\n                    return master.exclusiveMaximumValue();\n                }\n                return patch.exclusiveMinimumValue();\n            }\n\n            @Override\n            public Class<?> contains() {\n                if (!master.contains().equals(Void.class) || patch.contains().equals(Void.class)) {\n                    return master.contains();\n                }\n                return patch.contains();\n            }\n\n            @Override\n            public String $id() {\n                if (StringUtils.isNotBlank(master.$id()) || StringUtils.isBlank(patch.$id())) {\n                    return master.$id();\n                }\n                return patch.$id();\n            }\n\n            @Override\n            public String $schema() {\n                if (StringUtils.isNotBlank(master.$schema()) || StringUtils.isBlank(patch.$schema())) {\n                    return master.$schema();\n                }\n                return patch.$schema();\n            }\n\n            @Override\n            public String $anchor() {\n                if (StringUtils.isNotBlank(master.$anchor()) || StringUtils.isBlank(patch.$anchor())) {\n                    return master.$anchor();\n                }\n                return patch.$anchor();\n            }\n\n            @Override\n            public String $vocabulary() {\n                if (StringUtils.isNotBlank(master.$vocabulary()) || StringUtils.isBlank(patch.$vocabulary())) {\n                    return master.$vocabulary();\n                }\n                return patch.$vocabulary();\n            }\n\n            @Override\n            public String $dynamicAnchor() {\n                if (StringUtils.isNotBlank(master.$dynamicAnchor()) || StringUtils.isBlank(patch.$dynamicAnchor())) {\n                    return master.$dynamicAnchor();\n                }\n                return patch.$dynamicAnchor();\n            }\n\n            @Override\n            public String $dynamicRef() {\n                if (StringUtils.isNotBlank(master.$dynamicRef()) || StringUtils.isBlank(patch.$dynamicRef())) {\n                    return master.$dynamicRef();\n                }\n                return patch.$dynamicRef();\n            }\n\n            @Override\n            public String contentEncoding() {\n                if (StringUtils.isNotBlank(master.contentEncoding()) || StringUtils.isBlank(patch.contentEncoding())) {\n                    return master.contentEncoding();\n                }\n                return patch.contentEncoding();\n            }\n\n            @Override\n            public String contentMediaType() {\n                if (StringUtils.isNotBlank(master.contentMediaType()) || StringUtils.isBlank(patch.contentMediaType())) {\n                    return master.contentMediaType();\n                }\n                return patch.contentMediaType();\n            }\n\n            @Override\n            public Class<?> contentSchema() {\n                if (!master.contentSchema().equals(Void.class) || patch.contentSchema().equals(Void.class)) {\n                    return master.contentSchema();\n                }\n                return patch.contentSchema();\n            }\n\n            @Override\n            public Class<?> propertyNames() {\n                if (!master.propertyNames().equals(Void.class) || patch.propertyNames().equals(Void.class)) {\n                    return master.propertyNames();\n                }\n                return patch.propertyNames();\n            }\n\n            @Override\n            public int maxContains() {\n                if (master.maxContains() != 0 || patch.maxContains() == 0) {\n                    return master.maxContains();\n                }\n                return patch.maxContains();\n            }\n\n            @Override\n            public int minContains() {\n                if (master.minContains() != 0 || patch.minContains() == 0) {\n                    return master.minContains();\n                }\n                return patch.minContains();\n            }\n\n            @Override\n            public Class<?> additionalItems() {\n                if (!master.additionalItems().equals(Void.class) || patch.additionalItems().equals(Void.class)) {\n                    return master.additionalItems();\n                }\n                return patch.additionalItems();\n            }\n\n            @Override\n            public Class<?> unevaluatedItems() {\n                if (!master.unevaluatedItems().equals(Void.class) || patch.unevaluatedItems().equals(Void.class)) {\n                    return master.unevaluatedItems();\n                }\n                return patch.unevaluatedItems();\n            }\n\n            @Override\n            public Class<?> _if() {\n                if (!master._if().equals(Void.class) || patch._if().equals(Void.class)) {\n                    return master._if();\n                }\n                return patch._if();\n            }\n\n            @Override\n            public Class<?> _else() {\n                if (!master._else().equals(Void.class) || patch._else().equals(Void.class)) {\n                    return master._else();\n                }\n                return patch._else();\n            }\n\n            @Override\n            public Class<?> then() {\n                if (!master.then().equals(Void.class) || patch.then().equals(Void.class)) {\n                    return master.then();\n                }\n                return patch.then();\n            }\n\n            @Override\n            public String $comment() {\n                if (StringUtils.isNotBlank(master.$comment()) || StringUtils.isBlank(patch.$comment())) {\n                    return master.$comment();\n                }\n                return patch.$comment();\n            }\n\n            @Override\n            public String[] examples() {\n                if (master.examples().length > 0 || patch.examples().length == 0) {\n                    return master.examples();\n                }\n                return patch.examples();\n            }\n\n            @Override\n            public Class[] exampleClasses() {\n                if (master.exampleClasses().length > 0 || patch.exampleClasses().length == 0) {\n                    return master.exampleClasses();\n                }\n                return patch.exampleClasses();\n            }\n\n            @Override\n            public String _const() {\n                if (!master._const().equals(Void.class) || patch._const().equals(Void.class)) {\n                    return master._const();\n                }\n                return patch._const();\n            }\n\n            @Override\n            public Class<? extends Annotation> annotationType() {\n                return io.swagger.v3.oas.annotations.media.Schema.class;\n            }\n\n            @Override\n            public AdditionalPropertiesValue additionalProperties() {\n                if (!master.additionalProperties().equals(AdditionalPropertiesValue.USE_ADDITIONAL_PROPERTIES_ANNOTATION) || patch.additionalProperties().equals(AdditionalPropertiesValue.USE_ADDITIONAL_PROPERTIES_ANNOTATION)) {\n                    return master.additionalProperties();\n                }\n                return patch.additionalProperties();\n            }\n\n            @Override\n            public DependentRequired[] dependentRequiredMap() {\n                if (master.dependentRequiredMap().length > 0 || patch.dependentRequiredMap().length == 0) {\n                    return master.dependentRequiredMap();\n                }\n                return patch.dependentRequiredMap();\n            }\n\n            @Override\n            public StringToClassMapItem[] dependentSchemas() {\n                if (master.dependentSchemas().length > 0 || patch.dependentSchemas().length == 0) {\n                    return master.dependentSchemas();\n                }\n                return patch.dependentSchemas();\n            }\n\n            @Override\n            public StringToClassMapItem[] patternProperties() {\n                if (master.patternProperties().length > 0 || patch.patternProperties().length == 0) {\n                    return master.patternProperties();\n                }\n                return patch.patternProperties();\n            }\n\n            @Override\n            public StringToClassMapItem[] properties() {\n                if (master.properties().length > 0 || patch.properties().length == 0) {\n                    return master.properties();\n                }\n                return patch.properties();\n            }\n\n            @Override\n            public Class<?> unevaluatedProperties() {\n                if (!master.unevaluatedProperties().equals(Void.class) || patch.unevaluatedProperties().equals(Void.class)) {\n                    return master.unevaluatedProperties();\n                }\n                return patch.unevaluatedProperties();\n            }\n\n            @Override\n            public Class<?> additionalPropertiesSchema() {\n                if (!master.additionalPropertiesSchema().equals(Void.class) || patch.additionalPropertiesSchema().equals(Void.class)) {\n                    return master.additionalPropertiesSchema();\n                }\n                return patch.additionalPropertiesSchema();\n            }\n\n            /* We always want the patch to take precedence in schema resolution behavior */\n            @Override\n            public SchemaResolution schemaResolution() {\n                if (!patch.schemaResolution().equals(SchemaResolution.DEFAULT) || master.schemaResolution().equals(SchemaResolution.DEFAULT)) {\n                    return patch.schemaResolution();\n                }\n                return master.schemaResolution();\n            }\n\n        };\n\n        return (io.swagger.v3.oas.annotations.media.Schema)schema;\n    }\n\n    public static io.swagger.v3.oas.annotations.media.ArraySchema mergeArraySchemaAnnotations(\n            io.swagger.v3.oas.annotations.media.ArraySchema master,\n            io.swagger.v3.oas.annotations.media.ArraySchema patch) {\n        if (master == null) {\n            return patch;\n        } else if (patch == null) {\n            return master;\n        } else if (!hasArrayAnnotation(patch)) {\n            return master;\n        }\n        Annotation newArraySchema = new io.swagger.v3.oas.annotations.media.ArraySchema() {\n\n            @Override\n            public Class<? extends Annotation> annotationType() {\n                return io.swagger.v3.oas.annotations.media.ArraySchema.class;\n            }\n\n            @Override\n            public io.swagger.v3.oas.annotations.media.Schema schema() {\n                io.swagger.v3.oas.annotations.media.Schema patchSchema = patch.schema();\n                if (!hasSchemaAnnotation(patchSchema)) {\n                    patchSchema = null;\n                }\n\n                if (patchSchema == null) {\n                    return master.schema();\n                } else {\n                    return mergeSchemaAnnotations(master.schema(), patch.schema());\n                }\n            }\n\n            @Override\n            public io.swagger.v3.oas.annotations.media.Schema arraySchema() {\n                io.swagger.v3.oas.annotations.media.Schema patchSchema = patch.arraySchema();\n                if (!hasSchemaAnnotation(patchSchema)) {\n                    patchSchema = null;\n                }\n\n                if (patchSchema == null) {\n                    return master.arraySchema();\n                } else {\n                    return mergeSchemaAnnotations(master.arraySchema(), patch.arraySchema());\n                }\n            }\n\n            @Override\n            public int maxItems() {\n                if (master.maxItems() != 0 || patch.maxItems() == 0) {\n                    return master.maxItems();\n                }\n                return patch.maxItems();\n            }\n\n            @Override\n            public int minItems() {\n                if (master.minItems() != 0 || patch.minItems() == 0) {\n                    return master.minItems();\n                }\n                return patch.minItems();\n            }\n\n            @Override\n            public boolean uniqueItems() {\n                if (master.uniqueItems() || !patch.uniqueItems()) {\n                    return master.uniqueItems();\n                }\n                return patch.uniqueItems();\n            }\n\n            @Override\n            public Extension[] extensions() {\n                if (master.extensions().length > 0 || patch.extensions().length == 0) {\n                    return master.extensions();\n                }\n                return patch.extensions();\n            }\n\n            @Override\n            public io.swagger.v3.oas.annotations.media.Schema[] prefixItems() {\n                if (master.prefixItems().length > 0 || patch.prefixItems().length == 0) {\n                    return master.prefixItems();\n                }\n                return patch.prefixItems();\n            }\n\n            @Override\n            public io.swagger.v3.oas.annotations.media.Schema contains() {\n                if (!master.contains().equals(Void.class) || patch.contains().equals(Void.class)) {\n                    return master.contains();\n                }\n                return patch.contains();\n            }\n\n            @Override\n            public int maxContains() {\n                if (master.maxContains() > 0) {\n                    return master.maxContains();\n                }\n                return patch.maxContains();\n            }\n\n            @Override\n            public int minContains() {\n                if (master.minContains() > 0) {\n                    return master.minContains();\n                }\n                return patch.minContains();\n            }\n\n            @Override\n            public io.swagger.v3.oas.annotations.media.Schema unevaluatedItems() {\n                if (!master.unevaluatedItems().equals(Void.class) || patch.unevaluatedItems().equals(Void.class)) {\n                    return master.unevaluatedItems();\n                }\n                return patch.unevaluatedItems();\n            }\n\n            @Override\n            public io.swagger.v3.oas.annotations.media.Schema items() {\n                if (!master.items().equals(Void.class) || patch.items().equals(Void.class)) {\n                    return master.items();\n                }\n                return patch.items();\n            }\n\n\n        };\n\n        return (io.swagger.v3.oas.annotations.media.ArraySchema)newArraySchema;\n    }\n\n    public static io.swagger.v3.oas.annotations.media.ArraySchema mergeArrayWithSchemaAnnotation(\n            io.swagger.v3.oas.annotations.media.ArraySchema arraySchema,\n            io.swagger.v3.oas.annotations.media.Schema schema) {\n        if (arraySchema == null || schema == null) {\n            return arraySchema;\n        }\n        if (!hasSchemaAnnotation(schema)) {\n            return arraySchema;\n        }\n        Annotation newArraySchema = new io.swagger.v3.oas.annotations.media.ArraySchema() {\n\n            @Override\n            public Class<? extends Annotation> annotationType() {\n                return io.swagger.v3.oas.annotations.media.ArraySchema.class;\n            }\n\n            @Override\n            public io.swagger.v3.oas.annotations.media.Schema items() {\n                return arraySchema.items();\n            }\n\n            @Override\n            public io.swagger.v3.oas.annotations.media.Schema schema() {\n                return schema;\n            }\n\n            @Override\n            public io.swagger.v3.oas.annotations.media.Schema arraySchema() {\n                return arraySchema.arraySchema();\n            }\n\n            @Override\n            public int maxItems() {\n                return arraySchema.maxItems();\n            }\n\n            @Override\n            public int minItems() {\n                return arraySchema.minItems();\n            }\n\n            @Override\n            public boolean uniqueItems() {\n                return arraySchema.uniqueItems();\n            }\n\n            @Override\n            public Extension[] extensions() {\n                return arraySchema.extensions();\n            }\n\n            @Override\n            public io.swagger.v3.oas.annotations.media.Schema contains() {\n                return arraySchema.contains();\n            }\n\n            @Override\n            public int maxContains() {\n                return arraySchema.maxContains();\n            }\n\n            @Override\n            public int minContains() {\n                return arraySchema.minContains();\n            }\n\n            @Override\n            public io.swagger.v3.oas.annotations.media.Schema unevaluatedItems() {\n                return arraySchema.unevaluatedItems();\n            }\n\n            @Override\n            public io.swagger.v3.oas.annotations.media.Schema[] prefixItems() {\n                return arraySchema.prefixItems();\n            }\n        };\n\n        return (io.swagger.v3.oas.annotations.media.ArraySchema)newArraySchema;\n    }\n\n    public static Schema.SchemaResolution resolveSchemaResolution(Schema.SchemaResolution globalSchemaResolution, io.swagger.v3.oas.annotations.media.Schema schemaAnnotation) {\n        if (schemaAnnotation != null && !io.swagger.v3.oas.annotations.media.Schema.SchemaResolution.AUTO.equals(schemaAnnotation.schemaResolution())) {\n            return Schema.SchemaResolution.valueOf(schemaAnnotation.schemaResolution().toString());\n        }\n        return globalSchemaResolution;\n    }\n\n    public static boolean computeEnumAsRef(io.swagger.v3.oas.annotations.media.Schema ctxSchema, io.swagger.v3.oas.annotations.media.ArraySchema ctxArraySchema) {\n        if (ctxSchema != null && ctxSchema.enumAsRef()) {\n            return ctxSchema.enumAsRef();\n        } else if(ctxArraySchema != null && ctxArraySchema.schema() != null && ctxArraySchema.schema().enumAsRef()) {\n             return ctxArraySchema.schema().enumAsRef();\n        }\n        return false;\n    }\n\n    public static boolean areSiblingsAllowed(Schema.SchemaResolution resolvedSchemaResolution, boolean openapi31) {\n        return Schema.SchemaResolution.ALL_OF.equals(resolvedSchemaResolution) || Schema.SchemaResolution.ALL_OF_REF.equals(resolvedSchemaResolution) || openapi31;\n    }\n\n    public static AnnotatedType addTypeWhenSiblingsAllowed(AnnotatedType aType, io.swagger.v3.oas.annotations.media.Schema ctxSchema, boolean areSiblingsAllowed) {\n        if (areSiblingsAllowed && ctxSchema != null) {\n            if (!Void.class.equals(ctxSchema.implementation())) {\n                aType.setType(ctxSchema.implementation());\n            } else if (StringUtils.isNotBlank(ctxSchema.type())) {\n                aType.setType(ctxSchema.type().getClass());\n            }\n        }\n        return aType;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/ApiResponses31Deserializer.java",
    "content": "package io.swagger.v3.core.util;\n\npublic class ApiResponses31Deserializer extends ApiResponsesDeserializer {\n\n    public ApiResponses31Deserializer() {\n        this.openapi31 = true;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/ApiResponsesDeserializer.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.core.JsonParser;\nimport com.fasterxml.jackson.databind.DeserializationContext;\nimport com.fasterxml.jackson.databind.JsonDeserializer;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.node.ObjectNode;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\n\nimport java.io.IOException;\nimport java.util.Iterator;\nimport java.util.LinkedHashMap;\nimport java.util.Map;\n\npublic class ApiResponsesDeserializer extends JsonDeserializer<ApiResponses> {\n\n    protected boolean openapi31;\n\n    @Override\n    public ApiResponses deserialize(JsonParser jp, DeserializationContext ctxt)\n            throws IOException {\n\n        final ObjectMapper mapper;\n        if (openapi31) {\n            mapper = Json31.mapper();\n        } else {\n            mapper = Json.mapper();\n        }\n        ApiResponses result = new ApiResponses();\n        JsonNode node = jp.getCodec().readTree(jp);\n        ObjectNode objectNode = (ObjectNode) node;\n        Map<String, Object> extensions = new LinkedHashMap<>();\n        for (Iterator<String> it = objectNode.fieldNames(); it.hasNext(); ) {\n            String childName = it.next();\n            JsonNode child = objectNode.get(childName);\n            // if name start with `x-` consider it an extension\n            if (childName.startsWith(\"x-\")) {\n                extensions.put(childName, mapper.convertValue(child, Object.class));\n            } else {\n                result.put(childName, mapper.convertValue(child, ApiResponse.class));\n            }\n        }\n        if (!extensions.isEmpty()) {\n            result.setExtensions(extensions);\n        }\n        return result;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/Callback31Deserializer.java",
    "content": "package io.swagger.v3.core.util;\n\npublic class Callback31Deserializer extends CallbackDeserializer {\n\n    public Callback31Deserializer() {\n        openapi31 = true;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/CallbackDeserializer.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.core.JsonParser;\nimport com.fasterxml.jackson.databind.DeserializationContext;\nimport com.fasterxml.jackson.databind.JsonDeserializer;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.node.ObjectNode;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.callbacks.Callback;\n\nimport java.io.IOException;\nimport java.util.Iterator;\nimport java.util.LinkedHashMap;\nimport java.util.Map;\n\npublic class CallbackDeserializer extends JsonDeserializer<Callback> {\n\n    protected boolean openapi31;\n\n    @Override\n    public Callback deserialize(JsonParser jp, DeserializationContext ctxt)\n            throws IOException {\n\n        final ObjectMapper mapper;\n        if (openapi31) {\n            mapper = Json31.mapper();\n        } else {\n            mapper = Json.mapper();\n        }\n        Callback result = new Callback();\n        JsonNode node = jp.getCodec().readTree(jp);\n        ObjectNode objectNode = (ObjectNode)node;\n        Map<String, Object> extensions = new LinkedHashMap<>();\n        for (Iterator<String> it = objectNode.fieldNames(); it.hasNext(); ) {\n            String childName = it.next();\n            JsonNode child = objectNode.get(childName);\n            // if name start with `x-` consider it an extension\n            if (childName.startsWith(\"x-\")) {\n                extensions.put(childName, mapper.convertValue(child, Object.class));\n            } else if (childName.equals(\"$ref\")) {\n                result.$ref(child.asText());\n            } else {\n                result.put(childName, mapper.convertValue(child, PathItem.class));\n            }\n        }\n        if (!extensions.isEmpty()) {\n            result.setExtensions(extensions);\n        }\n        return result;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/Configuration.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.Map;\nimport java.util.Set;\n\npublic class Configuration {\n\n    public enum GroupsValidationStrategy {\n        @JsonProperty(\"default\")\n        DEFAULT(\"default\"),\n        @JsonProperty(\"never\")\n        NEVER(\"never\"),\n        @JsonProperty(\"always\")\n        ALWAYS(\"always\"),\n        @JsonProperty(\"neverIfNoContext\")\n        NEVER_IF_NO_CONTEXT(\"neverIfNoContext\");\n\n        private String value;\n\n        GroupsValidationStrategy(String value) {\n            this.value = value;\n        }\n\n        @Override\n        public String toString() {\n            return String.valueOf(value);\n        }\n    }\n\n    private Map<String, Object> userDefinedOptions;\n    private OpenAPI openAPI;\n    private Set<String> modelConverterClasses;\n    private String objectMapperProcessorClass;\n    private Boolean openAPI31 = false;\n    private Schema.SchemaResolution schemaResolution = Schema.SchemaResolution.DEFAULT;\n    private String openAPIVersion = \"3.0.1\";\n    private GroupsValidationStrategy groupsValidationStrategy = GroupsValidationStrategy.DEFAULT;\n    private String validatorProcessorClass;\n\n    public OpenAPI getOpenAPI() {\n        return openAPI;\n    }\n\n    public void setOpenAPI(OpenAPI openAPI) {\n        this.openAPI = openAPI;\n    }\n\n    public Configuration openAPI(OpenAPI openAPI) {\n        this.openAPI = openAPI;\n        return this;\n    }\n\n    public Map<String, Object> getUserDefinedOptions() {\n        return userDefinedOptions;\n    }\n\n    public void setUserDefinedOptions(Map<String, Object> userDefinedOptions) {\n        this.userDefinedOptions = userDefinedOptions;\n    }\n\n    public Configuration userDefinedOptions(Map<String, Object> userDefinedOptions) {\n        this.userDefinedOptions = userDefinedOptions;\n        return this;\n    }\n\n    public Configuration objectMapperProcessorClass(String objectMapperProcessorClass) {\n        this.objectMapperProcessorClass = objectMapperProcessorClass;\n        return this;\n    }\n\n    public String getObjectMapperProcessorClass() {\n        return objectMapperProcessorClass;\n    }\n\n    public void setObjectMapperProcessorClass(String objectMapperProcessorClass) {\n        this.objectMapperProcessorClass = objectMapperProcessorClass;\n    }\n\n    public Set<String> getModelConverterClasses() {\n        return modelConverterClasses;\n    }\n\n    public void setModelConverterClassess(Set<String> modelConverterClasses) {\n        this.modelConverterClasses = modelConverterClasses;\n    }\n\n    public Configuration modelConverterClasses(Set<String> modelConverterClasses) {\n        this.modelConverterClasses = modelConverterClasses;\n        return this;\n    }\n\n    public Boolean isOpenAPI31() {\n        return openAPI31;\n    }\n\n    public void setOpenAPI31(Boolean openAPI31) {\n        this.openAPI31 = openAPI31;\n    }\n\n    public Configuration openAPI31(Boolean openAPI31) {\n        this.openAPI31 = openAPI31;\n        return this;\n    }\n\n    public Schema.SchemaResolution getSchemaResolution() {\n        return schemaResolution;\n    }\n\n    public void setSchemaResolution(Schema.SchemaResolution schemaResolution) {\n        this.schemaResolution = schemaResolution;\n    }\n\n    public Configuration schemaResolution(Schema.SchemaResolution schemaResolution) {\n        this.setSchemaResolution(schemaResolution);\n        return this;\n    }\n\n    public String getOpenAPIVersion() {\n        return openAPIVersion;\n    }\n\n    public void setOpenAPIVersion(String openAPIVersion) {\n        this.openAPIVersion = openAPIVersion;\n    }\n\n    public Configuration openAPIVersion(String openAPIVersion) {\n        this.setOpenAPIVersion(openAPIVersion);\n        return this;\n    }\n\n    public void setModelConverterClasses(Set<String> modelConverterClasses) {\n        this.modelConverterClasses = modelConverterClasses;\n    }\n\n    public GroupsValidationStrategy getGroupsValidationStrategy() {\n        return groupsValidationStrategy;\n    }\n\n    public void setGroupsValidationStrategy(GroupsValidationStrategy groupsValidationStrategy) {\n        this.groupsValidationStrategy = groupsValidationStrategy;\n    }\n\n    public Configuration groupsValidationStrategy(GroupsValidationStrategy groupsValidationStrategy) {\n        this.groupsValidationStrategy = groupsValidationStrategy;\n        return this;\n    }\n\n    public String getValidatorProcessorClass() {\n        return validatorProcessorClass;\n    }\n\n    public void setValidatorProcessorClass(String validatorProcessorClass) {\n        this.validatorProcessorClass = validatorProcessorClass;\n    }\n\n    public Configuration validatorProcessorClass(String validatorProcessorClass) {\n        this.validatorProcessorClass = validatorProcessorClass;\n        return this;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/Constants.java",
    "content": "package io.swagger.v3.core.util;\n\npublic final class Constants {\n    public static final String COMMA = \",\";\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/DeserializationModule.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.databind.module.SimpleModule;\nimport io.swagger.v3.oas.models.Paths;\nimport io.swagger.v3.oas.models.callbacks.Callback;\nimport io.swagger.v3.oas.models.headers.Header;\nimport io.swagger.v3.oas.models.media.Encoding;\nimport io.swagger.v3.oas.models.media.EncodingProperty;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.security.SecurityScheme;\n\npublic class DeserializationModule extends SimpleModule {\n\n    public DeserializationModule() {\n\n        this.addDeserializer(Schema.class, new ModelDeserializer());\n        this.addDeserializer(Parameter.class, new ParameterDeserializer());\n        this.addDeserializer(Header.StyleEnum.class, new HeaderStyleEnumDeserializer());\n        this.addDeserializer(Encoding.StyleEnum.class, new EncodingStyleEnumDeserializer());\n        this.addDeserializer(EncodingProperty.StyleEnum.class, new EncodingPropertyStyleEnumDeserializer());\n\n        this.addDeserializer(SecurityScheme.class, new SecuritySchemeDeserializer());\n\n        this.addDeserializer(ApiResponses.class, new ApiResponsesDeserializer());\n        this.addDeserializer(Paths.class, new PathsDeserializer());\n        this.addDeserializer(Callback.class, new CallbackDeserializer());\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/DeserializationModule31.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.databind.BeanDescription;\nimport com.fasterxml.jackson.databind.DeserializationConfig;\nimport com.fasterxml.jackson.databind.JsonDeserializer;\nimport com.fasterxml.jackson.databind.deser.BeanDeserializerModifier;\nimport com.fasterxml.jackson.databind.module.SimpleModule;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Paths;\nimport io.swagger.v3.oas.models.callbacks.Callback;\nimport io.swagger.v3.oas.models.headers.Header;\nimport io.swagger.v3.oas.models.media.Encoding;\nimport io.swagger.v3.oas.models.media.EncodingProperty;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.security.SecurityScheme;\n\npublic class DeserializationModule31 extends SimpleModule {\n\n    public DeserializationModule31() {\n\n        this.addDeserializer(Schema.class, new Model31Deserializer());\n        this.addDeserializer(Parameter.class, new Parameter31Deserializer());\n        this.addDeserializer(Header.StyleEnum.class, new HeaderStyleEnumDeserializer());\n        this.addDeserializer(Encoding.StyleEnum.class, new EncodingStyleEnumDeserializer());\n        this.addDeserializer(EncodingProperty.StyleEnum.class, new EncodingPropertyStyleEnumDeserializer());\n\n        this.addDeserializer(SecurityScheme.class, new SecurityScheme31Deserializer());\n\n        this.addDeserializer(ApiResponses.class, new ApiResponses31Deserializer());\n        this.addDeserializer(Paths.class, new Paths31Deserializer());\n        this.addDeserializer(Callback.class, new Callback31Deserializer());\n\n        this.setDeserializerModifier(new BeanDeserializerModifier()\n        {\n            @Override public JsonDeserializer<?> modifyDeserializer(DeserializationConfig config, BeanDescription beanDesc, JsonDeserializer<?> deserializer) {\n                if (beanDesc.getBeanClass() == OpenAPI.class) {\n                    return new OpenAPI31Deserializer(deserializer);\n                }\n                return deserializer;\n            }\n        });\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/EncodingPropertyStyleEnumDeserializer.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.core.JsonParser;\nimport com.fasterxml.jackson.databind.DeserializationContext;\nimport com.fasterxml.jackson.databind.JsonDeserializer;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport io.swagger.v3.oas.models.media.EncodingProperty;\n\nimport java.io.IOException;\nimport java.util.Arrays;\nimport java.util.stream.Collectors;\n\npublic class EncodingPropertyStyleEnumDeserializer extends JsonDeserializer<EncodingProperty.StyleEnum> {\n    @Override\n    public EncodingProperty.StyleEnum deserialize(JsonParser jp, DeserializationContext ctxt)\n            throws IOException {\n        JsonNode node = jp.getCodec().readTree(jp);\n        if (node != null) {\n            String value = node.asText();\n            return getStyleEnum(value);\n        }\n        return null;\n    }\n\n    private EncodingProperty.StyleEnum getStyleEnum(String value) {\n        return Arrays.stream(\n                EncodingProperty.StyleEnum.values())\n                .filter(i -> i.toString().equals(value))\n                .findFirst()\n                .orElseThrow(() -> new RuntimeException(\n                        String.format(\"Can not deserialize value of type EncodingProperty.StyleEnum from String \\\"%s\\\": value not one of declared Enum instance names: %s\",\n                                value,\n                                Arrays.stream(EncodingProperty.StyleEnum.values()).map(EncodingProperty.StyleEnum::toString).collect(Collectors.joining(\", \", \"[\", \"]\")))));\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/EncodingStyleEnumDeserializer.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.core.JsonParser;\nimport com.fasterxml.jackson.databind.DeserializationContext;\nimport com.fasterxml.jackson.databind.JsonDeserializer;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport io.swagger.v3.oas.models.media.Encoding;\n\nimport java.io.IOException;\nimport java.util.Arrays;\nimport java.util.stream.Collectors;\n\npublic class EncodingStyleEnumDeserializer extends JsonDeserializer<Encoding.StyleEnum> {\n    @Override\n    public Encoding.StyleEnum deserialize(JsonParser jp, DeserializationContext ctxt)\n            throws IOException {\n        JsonNode node = jp.getCodec().readTree(jp);\n        if (node != null) {\n            String value = node.asText();\n            return getStyleEnum(value);\n        }\n        return null;\n    }\n\n    private Encoding.StyleEnum getStyleEnum(String value) {\n        return Arrays.stream(\n                Encoding.StyleEnum.values())\n                .filter(i -> i.toString().equals(value))\n                .findFirst()\n                .orElseThrow(() -> new RuntimeException(\n                        String.format(\"Can not deserialize value of type Encoding.StyleEnum from String \\\"%s\\\": value not one of declared Enum instance names: %s\",\n                                value,\n                                Arrays.stream(Encoding.StyleEnum.values()).map(Encoding.StyleEnum::toString).collect(Collectors.joining(\", \", \"[\", \"]\")))));\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/HeaderStyleEnumDeserializer.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.core.JsonParser;\nimport com.fasterxml.jackson.databind.DeserializationContext;\nimport com.fasterxml.jackson.databind.JsonDeserializer;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport io.swagger.v3.oas.models.headers.Header;\n\nimport java.io.IOException;\nimport java.util.Arrays;\nimport java.util.stream.Collectors;\n\npublic class HeaderStyleEnumDeserializer extends JsonDeserializer<Header.StyleEnum> {\n    @Override\n    public Header.StyleEnum deserialize(JsonParser jp, DeserializationContext ctxt)\n            throws IOException {\n        JsonNode node = jp.getCodec().readTree(jp);\n        if (node != null) {\n            String value = node.asText();\n            return getStyleEnum(value);\n        }\n        return null;\n    }\n\n    private Header.StyleEnum getStyleEnum(String value) {\n        return Arrays.stream(\n                Header.StyleEnum.values())\n                .filter(i -> i.toString().equals(value))\n                .findFirst()\n                .orElseThrow(() -> new RuntimeException(\n                        String.format(\"Can not deserialize value of type Header.StyleEnum from String \\\"%s\\\": value not one of declared Enum instance names: %s\",\n                                value,\n                                Arrays.stream(Header.StyleEnum.values()).map(Header.StyleEnum::toString).collect(Collectors.joining(\", \", \"[\", \"]\")))));\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/Json.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.core.util.DefaultPrettyPrinter;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.ObjectWriter;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class Json {\n\n    private static final class ObjectMapperHolder {\n        private static final ObjectMapper MAPPER = ObjectMapperFactory.createJson();\n    }\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(Json.class);\n\n    public static ObjectMapper mapper() {\n        return ObjectMapperHolder.MAPPER;\n    }\n\n    public static ObjectWriter pretty() {\n        return mapper().writer(new DefaultPrettyPrinter());\n    }\n\n    public static String pretty(Object o) {\n        try {\n            return pretty().writeValueAsString(o);\n        } catch (Exception e) {\n            PrettyPrintHelper.emitError(LOGGER, \"Error serializing object to JSON\", e);\n            return null;\n        }\n    }\n\n    public static void prettyPrint(Object o) {\n        try {\n            String prettyString = pretty().writeValueAsString(o).replace(\"\\r\", \"\");\n            PrettyPrintHelper.emit(LOGGER, prettyString);\n        } catch (Exception e) {\n            PrettyPrintHelper.emitError(LOGGER, \"Error pretty-printing JSON\", e);\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/Json31.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.core.JsonProcessingException;\nimport com.fasterxml.jackson.core.util.DefaultPrettyPrinter;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.ObjectWriter;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.util.Map;\n\npublic class Json31 {\n\n    private static final class ObjectMapperHolder {\n        private static final ObjectMapper MAPPER = ObjectMapperFactory.createJson31();\n    }\n\n    private static final class ConverterMapperHolder {\n        private static final ObjectMapper MAPPER = ObjectMapperFactory.createJsonConverter();\n    }\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(Json31.class);\n\n    public static ObjectMapper mapper() {\n        return ObjectMapperHolder.MAPPER;\n    }\n\n    public static ObjectMapper converterMapper() {\n        return ConverterMapperHolder.MAPPER;\n    }\n\n    public static ObjectWriter pretty() {\n        return mapper().writer(new DefaultPrettyPrinter());\n    }\n\n    public static String pretty(Object o) {\n        try {\n            return pretty().writeValueAsString(o);\n        } catch (Exception e) {\n            PrettyPrintHelper.emitError(LOGGER, \"Error serializing object to JSON (3.1)\", e);\n            return null;\n        }\n    }\n\n    public static void prettyPrint(Object o) {\n        try {\n            String prettyString = pretty().writeValueAsString(o).replace(\"\\r\", \"\");\n            PrettyPrintHelper.emit(LOGGER, prettyString);\n        } catch (Exception e) {\n            PrettyPrintHelper.emitError(LOGGER, \"Error pretty-printing JSON (3.1)\", e);\n        }\n    }\n\n    public static Map<String, Object> jsonSchemaAsMap(String jsonSchema) {\n        try {\n            return mapper().readValue(jsonSchema, Map.class);\n        } catch (JsonProcessingException e) {\n            LOGGER.error(\"Exception converting jsonSchema to Map\", e);\n            return null;\n        }\n    }\n\n    public static Map<String, Object> jsonSchemaAsMap(Schema schema) {\n        try {\n            return mapper().readValue(mapper().writeValueAsString(schema), Map.class);\n        } catch (JsonProcessingException e) {\n            LOGGER.error(\"Exception converting jsonSchema to Map\", e);\n            return null;\n        }\n    }\n\n    public static Map<String, Object> jsonSchemaAsMap(JsonNode schema) {\n        try {\n            return mapper().readValue(mapper().writeValueAsString(schema), Map.class);\n        } catch (JsonProcessingException e) {\n            LOGGER.error(\"Exception converting jsonSchema to Map\", e);\n            return null;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/KotlinDetector.java",
    "content": "package io.swagger.v3.core.util;\n\nimport java.lang.annotation.Annotation;\n\npublic class KotlinDetector {\n    private static final Boolean kotlinAvailable;\n    private static final Class<? extends Annotation> kotlinDeprecated;\n\n    static {\n        kotlinAvailable = loadByClassOrNull(\"kotlin.Metadata\") != null;\n        kotlinDeprecated = loadByClassOrNull(\"kotlin.Deprecated\");\n    }\n\n    private static <T> Class<T> loadByClassOrNull(String className) {\n        try {\n            return (Class<T>) ReflectionUtils.loadClassByName(className);\n        } catch (ClassNotFoundException ex) {\n            return null;\n        }\n    }\n\n    public static boolean isKotlinPresent() {\n        return kotlinAvailable;\n    }\n\n    public static Class<? extends Annotation> getKotlinDeprecated() {\n        return kotlinDeprecated;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/Model31Deserializer.java",
    "content": "package io.swagger.v3.core.util;\n\npublic class Model31Deserializer extends ModelDeserializer {\n\n    public Model31Deserializer() {this.openapi31 = true;}\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/ModelDeserializer.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.core.JsonParser;\nimport com.fasterxml.jackson.databind.DeserializationContext;\nimport com.fasterxml.jackson.databind.JsonDeserializer;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.node.ArrayNode;\nimport com.fasterxml.jackson.databind.node.ObjectNode;\nimport com.fasterxml.jackson.databind.node.TextNode;\nimport io.swagger.v3.oas.models.media.ArbitrarySchema;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.BooleanSchema;\nimport io.swagger.v3.oas.models.media.ComposedSchema;\nimport io.swagger.v3.oas.models.media.DateSchema;\nimport io.swagger.v3.oas.models.media.DateTimeSchema;\nimport io.swagger.v3.oas.models.media.EmailSchema;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.JsonSchema;\nimport io.swagger.v3.oas.models.media.MapSchema;\nimport io.swagger.v3.oas.models.media.NumberSchema;\nimport io.swagger.v3.oas.models.media.ObjectSchema;\nimport io.swagger.v3.oas.models.media.PasswordSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport io.swagger.v3.oas.models.media.UUIDSchema;\nimport org.apache.commons.lang3.StringUtils;\n\nimport java.io.IOException;\nimport java.util.Arrays;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Set;\n\npublic class ModelDeserializer extends JsonDeserializer<Schema> {\n\n    static Boolean useArbitrarySchema = false;\n    static {\n        if (System.getenv(Schema.USE_ARBITRARY_SCHEMA_PROPERTY) != null) {\n            useArbitrarySchema = Boolean.parseBoolean(System.getenv(Schema.USE_ARBITRARY_SCHEMA_PROPERTY));\n        } else if (System.getProperty(Schema.USE_ARBITRARY_SCHEMA_PROPERTY) != null) {\n            useArbitrarySchema = Boolean.parseBoolean(System.getProperty(Schema.USE_ARBITRARY_SCHEMA_PROPERTY));\n        }\n    }\n\n    protected boolean openapi31 = false;\n    @Override\n    public Schema deserialize(JsonParser jp, DeserializationContext ctxt)\n            throws IOException {\n        JsonNode node = jp.getCodec().readTree(jp);\n\n        Schema schema = null;\n\n        if (openapi31) {\n            schema = deserializeJsonSchema(node);\n            return schema;\n        }\n        if (node.isBoolean()) {\n            return new Schema().booleanSchemaValue(node.booleanValue());\n        }\n\n        List<String> composed = Arrays.asList(\"allOf\", \"anyOf\", \"oneOf\");\n        for (String field: composed) {\n            if (node.get(field) != null) {\n                return Json.mapper().convertValue(node, ComposedSchema.class);\n            }\n        }\n\n        JsonNode type = node.get(\"type\");\n        String format = node.get(\"format\") == null ? \"\" : node.get(\"format\").textValue();\n\n        if (type != null && \"array\".equals(((TextNode) type).textValue())) {\n            schema = Json.mapper().convertValue(node, ArraySchema.class);\n        } else if (type != null) {\n            if (type.textValue().equals(\"integer\")) {\n                schema = Json.mapper().convertValue(node, IntegerSchema.class);\n                if (StringUtils.isBlank(format)) {\n                    schema.setFormat(null);\n                }\n            } else if (type.textValue().equals(\"number\")) {\n                schema = Json.mapper().convertValue(node, NumberSchema.class);\n            } else if (type.textValue().equals(\"boolean\")) {\n                schema = Json.mapper().convertValue(node, BooleanSchema.class);\n            } else if (type.textValue().equals(\"string\")) {\n                if (\"date\".equals(format)) {\n                    schema = Json.mapper().convertValue(node, DateSchema.class);\n                } else if (\"date-time\".equals(format)) {\n                    schema = Json.mapper().convertValue(node, DateTimeSchema.class);\n                } else if (\"email\".equals(format)) {\n                    schema = Json.mapper().convertValue(node, EmailSchema.class);\n                } else if (\"password\".equals(format)) {\n                    schema = Json.mapper().convertValue(node, PasswordSchema.class);\n                } else if (\"uuid\".equals(format)) {\n                    schema = Json.mapper().convertValue(node, UUIDSchema.class);\n                } else {\n                    schema = Json.mapper().convertValue(node, StringSchema.class);\n                }\n            } else if (type.textValue().equals(\"object\")) {\n                schema = deserializeArbitraryOrObjectSchema(node, true);\n            }\n        } else if (node.get(\"$ref\") != null) {\n            schema = new Schema().$ref(node.get(\"$ref\").asText());\n        } else {\n            schema = deserializeArbitraryOrObjectSchema(node, false);\n        }\n\n        return schema;\n    }\n\n    private Schema deserializeArbitraryOrObjectSchema(JsonNode node, boolean alwaysObject) {\n        JsonNode additionalProperties = node.get(\"additionalProperties\");\n        Schema schema = null;\n        if (additionalProperties != null) {\n            if (additionalProperties.isBoolean()) {\n                Boolean additionalPropsBoolean = Json.mapper().convertValue(additionalProperties, Boolean.class);\n                ((ObjectNode)node).remove(\"additionalProperties\");\n                if (additionalPropsBoolean) {\n                    schema = Json.mapper().convertValue(node, MapSchema.class);\n                } else {\n                    schema = Json.mapper().convertValue(node, ObjectSchema.class);\n                }\n                schema.setAdditionalProperties(additionalPropsBoolean);\n            } else {\n                Schema innerSchema = Json.mapper().convertValue(additionalProperties, Schema.class);\n                ((ObjectNode)node).remove(\"additionalProperties\");\n                MapSchema ms = Json.mapper().convertValue(node, MapSchema.class);\n                ms.setAdditionalProperties(innerSchema);\n                schema = ms;\n            }\n        } else {\n            if (!Boolean.TRUE.equals(useArbitrarySchema) || alwaysObject) {\n                schema = Json.mapper().convertValue(node, ObjectSchema.class);\n            } else {\n                schema = Json.mapper().convertValue(node, ArbitrarySchema.class);\n            }\n        }\n        if (schema != null) {\n            schema.jsonSchema(Json31.jsonSchemaAsMap(node));\n        }\n        return schema;\n    }\n\n    private Schema deserializeJsonSchema(JsonNode node) {\n        if (node.isBoolean()) {\n            return new Schema().booleanSchemaValue(node.booleanValue());\n        }\n        JsonNode additionalProperties = node.get(\"additionalProperties\");\n        JsonNode type = node.get(\"type\");\n        Schema schema = null;\n\n        if (type != null || additionalProperties != null) {\n            if (type != null) {\n                ((ObjectNode)node).remove(\"type\");\n            }\n            if (additionalProperties != null) {\n                ((ObjectNode)node).remove(\"additionalProperties\");\n            }\n            schema = Json31.mapper().convertValue(node, JsonSchema.class);\n            if (type instanceof TextNode) {\n                schema.types(new LinkedHashSet<>(Arrays.asList(type.textValue())));\n            } else if (type instanceof ArrayNode){\n                Set<String> types = new LinkedHashSet<>();\n                ((ArrayNode)type).elements().forEachRemaining( n -> {\n                    types.add(n.textValue());\n                });\n                schema.types(types);\n            }\n            if (additionalProperties != null) {\n                try {\n                    if (additionalProperties.isBoolean()) {\n                        schema.setAdditionalProperties(additionalProperties.booleanValue());\n                    } else {\n                        Schema innerSchema = deserializeJsonSchema(additionalProperties);\n                        schema.setAdditionalProperties(innerSchema);\n                    }\n                } catch (Exception e) {\n                    Boolean additionalPropsBoolean = Json31.mapper().convertValue(additionalProperties, Boolean.class);\n                    schema.setAdditionalProperties(additionalPropsBoolean);\n                }\n            }\n\n        } else {\n            schema = Json31.mapper().convertValue(node, JsonSchema.class);\n        }\n        return schema;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/ObjectMapperFactory.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport com.fasterxml.jackson.core.JsonFactory;\nimport com.fasterxml.jackson.databind.BeanDescription;\nimport com.fasterxml.jackson.databind.DeserializationFeature;\nimport com.fasterxml.jackson.databind.JsonSerializer;\nimport com.fasterxml.jackson.databind.Module;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.SerializationConfig;\nimport com.fasterxml.jackson.databind.SerializationFeature;\nimport com.fasterxml.jackson.databind.module.SimpleModule;\nimport com.fasterxml.jackson.databind.ser.BeanSerializerModifier;\nimport com.fasterxml.jackson.dataformat.yaml.YAMLFactory;\nimport com.fasterxml.jackson.dataformat.yaml.YAMLGenerator;\nimport com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;\nimport io.swagger.v3.core.jackson.ExampleSerializer;\nimport io.swagger.v3.core.jackson.Schema31Serializer;\nimport io.swagger.v3.core.jackson.MediaTypeSerializer;\nimport io.swagger.v3.core.jackson.SchemaSerializer;\nimport io.swagger.v3.core.jackson.mixin.Components31Mixin;\nimport io.swagger.v3.core.jackson.mixin.ComponentsMixin;\nimport io.swagger.v3.core.jackson.mixin.DateSchemaMixin;\nimport io.swagger.v3.core.jackson.mixin.Discriminator31Mixin;\nimport io.swagger.v3.core.jackson.mixin.DiscriminatorMixin;\nimport io.swagger.v3.core.jackson.mixin.ExampleMixin;\nimport io.swagger.v3.core.jackson.mixin.ExtensionsMixin;\nimport io.swagger.v3.core.jackson.mixin.InfoMixin;\nimport io.swagger.v3.core.jackson.mixin.LicenseMixin;\nimport io.swagger.v3.core.jackson.mixin.MediaTypeMixin;\nimport io.swagger.v3.core.jackson.mixin.OpenAPI31Mixin;\nimport io.swagger.v3.core.jackson.mixin.OpenAPIMixin;\nimport io.swagger.v3.core.jackson.mixin.OperationMixin;\nimport io.swagger.v3.core.jackson.mixin.Schema31Mixin;\nimport io.swagger.v3.core.jackson.mixin.SchemaConverterMixin;\nimport io.swagger.v3.core.jackson.mixin.SchemaMixin;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.ExternalDocumentation;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.Paths;\nimport io.swagger.v3.oas.models.callbacks.Callback;\nimport io.swagger.v3.oas.models.examples.Example;\nimport io.swagger.v3.oas.models.headers.Header;\nimport io.swagger.v3.oas.models.info.Contact;\nimport io.swagger.v3.oas.models.info.Info;\nimport io.swagger.v3.oas.models.info.License;\nimport io.swagger.v3.oas.models.links.Link;\nimport io.swagger.v3.oas.models.links.LinkParameter;\nimport io.swagger.v3.oas.models.media.DateSchema;\nimport io.swagger.v3.oas.models.media.Discriminator;\nimport io.swagger.v3.oas.models.media.Encoding;\nimport io.swagger.v3.oas.models.media.EncodingProperty;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.XML;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.security.OAuthFlow;\nimport io.swagger.v3.oas.models.security.OAuthFlows;\nimport io.swagger.v3.oas.models.security.Scopes;\nimport io.swagger.v3.oas.models.security.SecurityScheme;\nimport io.swagger.v3.oas.models.servers.Server;\nimport io.swagger.v3.oas.models.servers.ServerVariable;\nimport io.swagger.v3.oas.models.servers.ServerVariables;\nimport io.swagger.v3.oas.models.tags.Tag;\n\nimport java.util.LinkedHashMap;\nimport java.util.Map;\n\npublic class ObjectMapperFactory {\n\n    public static ObjectMapper createJson(JsonFactory jsonFactory) {\n        return create(jsonFactory, false);\n    }\n\n    public static ObjectMapper createJson() {\n        return create(null, false);\n    }\n\n    public static ObjectMapper createYaml(YAMLFactory yamlFactory) {\n        return create(yamlFactory, false);\n    }\n\n    public static ObjectMapper createYaml() {\n        return createYaml(false);\n    }\n\n    public static ObjectMapper createYaml(boolean openapi31) {\n        YAMLFactory factory = new YAMLFactory();\n        factory.disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER);\n        factory.enable(YAMLGenerator.Feature.MINIMIZE_QUOTES);\n        factory.enable(YAMLGenerator.Feature.SPLIT_LINES);\n        factory.enable(YAMLGenerator.Feature.ALWAYS_QUOTE_NUMBERS_AS_STRINGS);\n\n        return create(factory, openapi31);\n    }\n\n    public static ObjectMapper createJson31(JsonFactory jsonFactory) {\n        return create(jsonFactory, true);\n    }\n\n    public static ObjectMapper createJson31() {\n        return create(null, true);\n    }\n\n    public static ObjectMapper createYaml31(YAMLFactory yamlFactory) {\n        return create(yamlFactory, true);\n    }\n\n    public static ObjectMapper createYaml31() {\n        return createYaml(true);\n    }\n\n    public static ObjectMapper create(JsonFactory jsonFactory, boolean openapi31) {\n        ObjectMapper mapper = jsonFactory == null ? new ObjectMapper() : new ObjectMapper(jsonFactory);\n\n        if (!openapi31) {\n            // handle ref schema serialization skipping all other props\n            mapper.registerModule(new SimpleModule() {\n                @Override\n                public void setupModule(SetupContext context) {\n                    super.setupModule(context);\n                    context.addBeanSerializerModifier(new BeanSerializerModifier() {\n                        @Override\n                        public JsonSerializer<?> modifySerializer(\n                                SerializationConfig config, BeanDescription desc, JsonSerializer<?> serializer) {\n                            if (Schema.class.isAssignableFrom(desc.getBeanClass())) {\n                                return new SchemaSerializer((JsonSerializer<Object>) serializer);\n                            } else if (MediaType.class.isAssignableFrom(desc.getBeanClass())) {\n                                return new MediaTypeSerializer((JsonSerializer<Object>) serializer);\n                            } else if (Example.class.isAssignableFrom(desc.getBeanClass())) {\n                                return new ExampleSerializer((JsonSerializer<Object>) serializer);\n                            }\n                            return serializer;\n                        }\n                    });\n                }\n            });\n        } else {\n            mapper.registerModule(new SimpleModule() {\n                @Override\n                public void setupModule(SetupContext context) {\n                    super.setupModule(context);\n                    context.addBeanSerializerModifier(new BeanSerializerModifier() {\n                        @Override\n                        public JsonSerializer<?> modifySerializer(\n                                SerializationConfig config, BeanDescription desc, JsonSerializer<?> serializer) {\n                            if (Schema.class.isAssignableFrom(desc.getBeanClass())) {\n                                return new Schema31Serializer((JsonSerializer<Object>) serializer);\n                            } else if (MediaType.class.isAssignableFrom(desc.getBeanClass())) {\n                                return new MediaTypeSerializer((JsonSerializer<Object>) serializer);\n                            } else if (Example.class.isAssignableFrom(desc.getBeanClass())) {\n                                return new ExampleSerializer((JsonSerializer<Object>) serializer);\n                            }\n                            return serializer;\n                        }\n                    });\n                }\n            });\n        }\n\n        if (!openapi31) {\n            Module deserializerModule = new DeserializationModule();\n            mapper.registerModule(deserializerModule);\n        } else {\n            Module deserializerModule = new DeserializationModule31();\n            mapper.registerModule(deserializerModule);\n        }\n        mapper.registerModule(new JavaTimeModule());\n\n        Map<Class<?>, Class<?>> sourceMixins = new LinkedHashMap<>();\n\n        sourceMixins.put(ApiResponses.class, ExtensionsMixin.class);\n        sourceMixins.put(Contact.class, ExtensionsMixin.class);\n        sourceMixins.put(Encoding.class, ExtensionsMixin.class);\n        sourceMixins.put(EncodingProperty.class, ExtensionsMixin.class);\n        sourceMixins.put(Example.class, ExampleMixin.class);\n        sourceMixins.put(ExternalDocumentation.class, ExtensionsMixin.class);\n        sourceMixins.put(Link.class, ExtensionsMixin.class);\n        sourceMixins.put(LinkParameter.class, ExtensionsMixin.class);\n        sourceMixins.put(MediaType.class, MediaTypeMixin.class);\n        sourceMixins.put(OAuthFlow.class, ExtensionsMixin.class);\n        sourceMixins.put(OAuthFlows.class, ExtensionsMixin.class);\n        sourceMixins.put(Operation.class, OperationMixin.class);\n        sourceMixins.put(PathItem.class, ExtensionsMixin.class);\n        sourceMixins.put(Paths.class, ExtensionsMixin.class);\n        sourceMixins.put(Scopes.class, ExtensionsMixin.class);\n        sourceMixins.put(Server.class, ExtensionsMixin.class);\n        sourceMixins.put(ServerVariable.class, ExtensionsMixin.class);\n        sourceMixins.put(ServerVariables.class, ExtensionsMixin.class);\n        sourceMixins.put(Tag.class, ExtensionsMixin.class);\n        sourceMixins.put(XML.class, ExtensionsMixin.class);\n        sourceMixins.put(ApiResponse.class, ExtensionsMixin.class);\n        sourceMixins.put(Parameter.class, ExtensionsMixin.class);\n        sourceMixins.put(RequestBody.class, ExtensionsMixin.class);\n        sourceMixins.put(Header.class, ExtensionsMixin.class);\n        sourceMixins.put(SecurityScheme.class, ExtensionsMixin.class);\n        sourceMixins.put(Callback.class, ExtensionsMixin.class);\n\n\n        if (!openapi31) {\n            sourceMixins.put(Schema.class, SchemaMixin.class);\n            sourceMixins.put(DateSchema.class, DateSchemaMixin.class);\n            sourceMixins.put(Components.class, ComponentsMixin.class);\n            sourceMixins.put(Info.class, InfoMixin.class);\n            sourceMixins.put(License.class, LicenseMixin.class);\n            sourceMixins.put(OpenAPI.class, OpenAPIMixin.class);\n            sourceMixins.put(Discriminator.class, DiscriminatorMixin.class);\n        } else {\n            sourceMixins.put(Info.class, ExtensionsMixin.class);\n            sourceMixins.put(Schema.class, Schema31Mixin.class);\n            sourceMixins.put(Components.class, Components31Mixin.class);\n            sourceMixins.put(OpenAPI.class, OpenAPI31Mixin.class);\n            sourceMixins.put(DateSchema.class, DateSchemaMixin.class);\n            sourceMixins.put(Discriminator.class, Discriminator31Mixin.class);\n        }\n        mapper.setMixIns(sourceMixins);\n        mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);\n        mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);\n        mapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);\n        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n        mapper.configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false);\n        mapper.configure(SerializationFeature.WRITE_BIGDECIMAL_AS_PLAIN, true);\n        mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);\n\n        return mapper;\n    }\n\n    public static ObjectMapper createJsonConverter() {\n\n        ObjectMapper mapper = new ObjectMapper();\n\n\n        Module deserializerModule = new DeserializationModule();\n        mapper.registerModule(deserializerModule);\n        mapper.registerModule(new JavaTimeModule());\n\n        Map<Class<?>, Class<?>> sourceMixins = new LinkedHashMap<>();\n\n        sourceMixins.put(ApiResponses.class, ExtensionsMixin.class);\n        sourceMixins.put(ApiResponse.class, ExtensionsMixin.class);\n        sourceMixins.put(Callback.class, ExtensionsMixin.class);\n        sourceMixins.put(Components.class, ComponentsMixin.class);\n        sourceMixins.put(Contact.class, ExtensionsMixin.class);\n        sourceMixins.put(Encoding.class, ExtensionsMixin.class);\n        sourceMixins.put(EncodingProperty.class, ExtensionsMixin.class);\n        sourceMixins.put(Example.class, ExampleMixin.class);\n        sourceMixins.put(ExternalDocumentation.class, ExtensionsMixin.class);\n        sourceMixins.put(Header.class, ExtensionsMixin.class);\n        sourceMixins.put(Info.class, ExtensionsMixin.class);\n        sourceMixins.put(License.class, ExtensionsMixin.class);\n        sourceMixins.put(Link.class, ExtensionsMixin.class);\n        sourceMixins.put(LinkParameter.class, ExtensionsMixin.class);\n        sourceMixins.put(MediaType.class, MediaTypeMixin.class);\n        sourceMixins.put(OAuthFlow.class, ExtensionsMixin.class);\n        sourceMixins.put(OAuthFlows.class, ExtensionsMixin.class);\n        sourceMixins.put(OpenAPI.class, OpenAPIMixin.class);\n        sourceMixins.put(Operation.class, OperationMixin.class);\n        sourceMixins.put(Parameter.class, ExtensionsMixin.class);\n        sourceMixins.put(PathItem.class, ExtensionsMixin.class);\n        sourceMixins.put(Paths.class, ExtensionsMixin.class);\n        sourceMixins.put(RequestBody.class, ExtensionsMixin.class);\n        sourceMixins.put(Scopes.class, ExtensionsMixin.class);\n        sourceMixins.put(SecurityScheme.class, ExtensionsMixin.class);\n        sourceMixins.put(Server.class, ExtensionsMixin.class);\n        sourceMixins.put(ServerVariable.class, ExtensionsMixin.class);\n        sourceMixins.put(ServerVariables.class, ExtensionsMixin.class);\n        sourceMixins.put(Tag.class, ExtensionsMixin.class);\n        sourceMixins.put(XML.class, ExtensionsMixin.class);\n\n        sourceMixins.put(Schema.class, SchemaConverterMixin.class);\n        mapper.setMixIns(sourceMixins);\n        mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);\n        mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);\n        mapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);\n        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n        mapper.configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false);\n        mapper.configure(SerializationFeature.WRITE_BIGDECIMAL_AS_PLAIN, true);\n        mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);\n\n        return mapper;\n    }\n\n\n    public static ObjectMapper buildStrictGenericObjectMapper() {\n        ObjectMapper mapper = new ObjectMapper();\n        mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);\n        mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);\n        mapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);\n        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n        mapper.configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false);\n        try {\n            mapper.configure(DeserializationFeature.valueOf(\"FAIL_ON_TRAILING_TOKENS\"), true);\n        } catch (Throwable e) {\n            // add only if supported by Jackson version 2.9+\n        }\n        mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);\n        return mapper;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/OpenAPI30To31.java",
    "content": "package io.swagger.v3.core.util;\n\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.SpecVersion;\n\nimport java.util.Map;\nimport java.util.Set;\n\npublic class OpenAPI30To31 {\n\n    public void process(OpenAPI openAPI) {\n        openAPI.openapi(\"3.1.0\")\n                .jsonSchemaDialect(\"https://spec.openapis.org/oas/3.1/dialect/base\")\n                .specVersion(SpecVersion.V31);\n\n        removeReservedExtensionsName(openAPI.getExtensions());\n\n        if (openAPI.getInfo() != null) {\n            removeReservedExtensionsName(openAPI.getInfo().getExtensions());\n        }\n\n        if (openAPI.getPaths() != null) {\n            removeReservedExtensionsName(openAPI.getPaths().getExtensions());\n        }\n\n        if (openAPI.getComponents() != null) {\n            removeReservedExtensionsName(openAPI.getComponents().getExtensions());\n        }\n    }\n\n    private void removeReservedExtensionsName(Map<String, Object> extensions) {\n        if (extensions == null || extensions.isEmpty()) {\n            return;\n        }\n        final Set<String> keys = extensions.keySet();\n        for (String key : keys) {\n            if (key.startsWith(\"x-oas-\") || key.startsWith(\"x-oai-\")) {\n                extensions.remove(key);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/OpenAPI31Deserializer.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.core.JsonParser;\nimport com.fasterxml.jackson.core.JsonProcessingException;\nimport com.fasterxml.jackson.databind.DeserializationContext;\nimport com.fasterxml.jackson.databind.JsonDeserializer;\nimport com.fasterxml.jackson.databind.JsonMappingException;\nimport com.fasterxml.jackson.databind.deser.ResolvableDeserializer;\nimport com.fasterxml.jackson.databind.deser.std.StdDeserializer;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.SpecVersion;\n\nimport java.io.IOException;\n\npublic class OpenAPI31Deserializer extends StdDeserializer<OpenAPI> implements ResolvableDeserializer {\n\n    private final JsonDeserializer<?> defaultDeserializer;\n\n    public OpenAPI31Deserializer(JsonDeserializer<?> defaultDeserializer)\n    {\n        super(OpenAPI.class);\n        this.defaultDeserializer = defaultDeserializer;\n    }\n\n    @Override\n    public OpenAPI deserialize(JsonParser jp, DeserializationContext ctxt)\n            throws IOException, JsonProcessingException {\n        OpenAPI openAPI = (OpenAPI) defaultDeserializer.deserialize(jp, ctxt);\n        openAPI.setSpecVersion(SpecVersion.V31);\n        return openAPI;\n    }\n    @Override public void resolve(DeserializationContext ctxt) throws JsonMappingException {\n        ((ResolvableDeserializer) defaultDeserializer).resolve(ctxt);\n    }\n}\n\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/OpenAPISchema2JsonSchema.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.oas.models.SpecVersion;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.LinkedHashSet;\nimport java.util.Map;\n\npublic class OpenAPISchema2JsonSchema {\n\n    protected final ObjectMapper converterMapper = Json31.converterMapper();\n\n    public void process(Schema<?> schema) {\n        schema.specVersion(SpecVersion.V31);\n        Map<String, Object> jsonSchema = converterMapper.convertValue(schema, Map.class);\n\n        // handle nullable\n        if (schema.getType() != null || Boolean.TRUE.equals(schema.getNullable())) {\n            schema.types(new LinkedHashSet<>());\n        }\n        if (schema.getType() != null) {\n            schema.getTypes().add(schema.getType());\n        }\n        schema.type(null);\n        if (Boolean.TRUE.equals(schema.getNullable())) {\n            schema.nullable(null);\n            schema.getTypes().add(\"null\");\n        }\n\n        if (schema.getMinimum() != null && Boolean.TRUE.equals(schema.getExclusiveMinimum())) {\n            schema.setExclusiveMinimumValue(schema.getMinimum());\n        }\n        if (schema.getMaximum() != null && Boolean.TRUE.equals(schema.getExclusiveMaximum())) {\n            schema.setExclusiveMaximumValue(schema.getMaximum());\n        }\n\n        schema.jsonSchema(jsonSchema);\n\n        if (schema.getAdditionalProperties() instanceof Schema) {\n            process((Schema<?>) schema.getAdditionalProperties());\n        }\n        if (schema.getAllOf() != null) {\n            schema.getAllOf().forEach(this::process);\n        }\n        if (schema.getAnyOf() != null) {\n            schema.getAnyOf().forEach(this::process);\n        }\n        if (schema.getOneOf() != null) {\n            schema.getOneOf().forEach(this::process);\n        }\n        if (schema.getProperties() != null) {\n            schema.getProperties().values().forEach(this::process);\n        }\n        if (schema.getItems() != null) {\n            process(schema.getItems());\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/Parameter31Deserializer.java",
    "content": "package io.swagger.v3.core.util;\n\npublic class Parameter31Deserializer extends ParameterDeserializer {\n\n    public Parameter31Deserializer() {\n        this.openapi31 = true;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/ParameterDeserializer.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.core.JsonParser;\nimport com.fasterxml.jackson.databind.DeserializationContext;\nimport com.fasterxml.jackson.databind.DeserializationFeature;\nimport com.fasterxml.jackson.databind.JsonDeserializer;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.ObjectReader;\nimport io.swagger.v3.oas.models.parameters.CookieParameter;\nimport io.swagger.v3.oas.models.parameters.HeaderParameter;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.parameters.PathParameter;\nimport io.swagger.v3.oas.models.parameters.QueryParameter;\n\nimport java.io.IOException;\n\npublic class ParameterDeserializer extends JsonDeserializer<Parameter> {\n\n    protected boolean openapi31;\n\n    @Override\n    public Parameter deserialize(JsonParser jp, DeserializationContext ctxt)\n            throws IOException {\n        Parameter result = null;\n\n        JsonNode node = jp.getCodec().readTree(jp);\n        JsonNode sub = node.get(\"$ref\");\n        JsonNode inNode = node.get(\"in\");\n        JsonNode desc = node.get(\"description\");\n\n        if (sub != null) {\n            result = new Parameter().$ref(sub.asText());\n            if (desc != null && openapi31) {\n                result.description(desc.asText());\n            }\n\n        } else if (inNode != null) {\n            String in = inNode.asText();\n\n            ObjectReader reader = null;\n            ObjectMapper mapper = null;\n            if (openapi31) {\n                mapper = Json31.mapper();\n            } else {\n                mapper = Json.mapper();\n            }\n\n\n            if (\"query\".equals(in)) {\n                reader = mapper.readerFor(QueryParameter.class);\n            } else if (\"header\".equals(in)) {\n                reader = mapper.readerFor(HeaderParameter.class);\n            } else if (\"path\".equals(in)) {\n                reader = mapper.readerFor(PathParameter.class);\n            } else if (\"cookie\".equals(in)) {\n                reader = mapper.readerFor(CookieParameter.class);\n            }\n            if (reader != null) {\n                result = reader.with(DeserializationFeature.READ_ENUMS_USING_TO_STRING).readValue(node);\n            }\n        }\n\n        return result;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/ParameterProcessor.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.annotation.JsonView;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.converter.ResolvedSchema;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.examples.Example;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.Content;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport org.apache.commons.lang3.StringUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.io.IOException;\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Type;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.LinkedHashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\npublic class ParameterProcessor {\n    static Logger LOGGER = LoggerFactory.getLogger(ParameterProcessor.class);\n\n    public static Parameter applyAnnotations(Parameter parameter, Type type, List<Annotation> annotations, Components components, String[] classTypes, String[] methodTypes, JsonView jsonViewAnnotation) {\n        return applyAnnotations(parameter, type, annotations, components, classTypes, methodTypes, jsonViewAnnotation, false);\n    }\n\n    public static Parameter applyAnnotations(\n            Parameter parameter,\n            Type type,\n            List<Annotation> annotations,\n            Components components,\n            String[] classTypes,\n            String[] methodTypes,\n            JsonView jsonViewAnnotation,\n            boolean openapi31) {\n        return applyAnnotations(parameter, type, annotations, components, classTypes, methodTypes, jsonViewAnnotation, openapi31, null);\n    }\n\n    public static Parameter applyAnnotations(\n            Parameter parameter,\n            Type type,\n            List<Annotation> annotations,\n            Components components,\n            String[] classTypes,\n            String[] methodTypes,\n            JsonView jsonViewAnnotation,\n            boolean openapi31,\n            Schema.SchemaResolution schemaResolution) {\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(openapi31);\n        configuration.setSchemaResolution(schemaResolution);\n        return applyAnnotations(parameter, type, annotations, components, classTypes, methodTypes, jsonViewAnnotation, configuration);\n    }\n    public static Parameter applyAnnotations(\n            Parameter parameter,\n            Type type,\n            List<Annotation> annotations,\n            Components components,\n            String[] classTypes,\n            String[] methodTypes,\n            JsonView jsonViewAnnotation,\n            Configuration configuration) {\n\n        boolean openapi31 = configuration != null && configuration.isOpenAPI31() != null && configuration.isOpenAPI31();\n        Schema.SchemaResolution schemaResolution = configuration.getSchemaResolution();;\n        final AnnotationsHelper helper = new AnnotationsHelper(annotations, type);\n        if (helper.isContext()) {\n            return null;\n        }\n        if (parameter == null) {\n            // consider it to be body param\n            parameter = new Parameter();\n        }\n\n        // first handle schema\n        List<Annotation> reworkedAnnotations = new ArrayList<>(annotations);\n        Annotation paramSchemaOrArrayAnnotation = getParamSchemaAnnotation(annotations);\n\n        if (paramSchemaOrArrayAnnotation != null) {\n            reworkedAnnotations.add(paramSchemaOrArrayAnnotation);\n        }\n        io.swagger.v3.oas.annotations.media.Schema ctxSchema = AnnotationsUtils.getSchemaAnnotation(annotations.toArray(new Annotation[0]));\n        io.swagger.v3.oas.annotations.media.ArraySchema ctxArraySchema = AnnotationsUtils.getArraySchemaAnnotation(annotations.toArray(new Annotation[0]));\n        Annotation[] ctxAnnotation31 = null;\n\n        if (Schema.SchemaResolution.ALL_OF.equals(schemaResolution) || Schema.SchemaResolution.ALL_OF_REF.equals(schemaResolution)) {\n            List<Annotation> ctxAnnotations31List = new ArrayList<>();\n            if (annotations != null) {\n                for (Annotation a : annotations) {\n                    if (\n                            !(a instanceof io.swagger.v3.oas.annotations.media.Schema) &&\n                                    !(a instanceof io.swagger.v3.oas.annotations.media.ArraySchema)) {\n                        ctxAnnotations31List.add(a);\n                    }\n                }\n                ctxAnnotation31 = ctxAnnotations31List.toArray(new Annotation[ctxAnnotations31List.size()]);\n            }\n        }\n        AnnotatedType annotatedType = new AnnotatedType()\n                .type(type)\n                .resolveAsRef(true)\n                .skipOverride(true)\n                .jsonViewAnnotation(jsonViewAnnotation);\n\n        if (Schema.SchemaResolution.ALL_OF.equals(schemaResolution) || Schema.SchemaResolution.ALL_OF_REF.equals(schemaResolution)) {\n            annotatedType.ctxAnnotations(ctxAnnotation31);\n        } else {\n            annotatedType.ctxAnnotations(reworkedAnnotations.toArray(new Annotation[reworkedAnnotations.size()]));\n        }\n\n        final ResolvedSchema resolvedSchema = ModelConverters.getInstance(configuration).resolveAsResolvedSchema(annotatedType);\n\n        if (resolvedSchema.schema != null) {\n            Schema resSchema = AnnotationsUtils.clone(resolvedSchema.schema, openapi31);\n            Schema ctxSchemaObject = null;\n            if (Schema.SchemaResolution.ALL_OF.equals(schemaResolution) || Schema.SchemaResolution.ALL_OF_REF.equals(schemaResolution)) {\n                Optional<Schema> reResolvedSchema = AnnotationsUtils.getSchemaFromAnnotation(ctxSchema, annotatedType.getComponents(), null, openapi31, null, schemaResolution, null);\n                if (reResolvedSchema.isPresent()) {\n                    ctxSchemaObject = reResolvedSchema.get();\n                }\n                reResolvedSchema = AnnotationsUtils.getArraySchema(ctxArraySchema, annotatedType.getComponents(), null, openapi31, ctxSchemaObject);\n                if (reResolvedSchema.isPresent()) {\n                    ctxSchemaObject = reResolvedSchema.get();\n                }\n\n            }\n            if (Schema.SchemaResolution.ALL_OF.equals(schemaResolution) && ctxSchemaObject != null) {\n                resSchema = new Schema()\n                        .addAllOfItem(ctxSchemaObject)\n                        .addAllOfItem(resolvedSchema.schema);\n            } else if (Schema.SchemaResolution.ALL_OF_REF.equals(schemaResolution) && ctxSchemaObject != null) {\n                resSchema = ctxSchemaObject\n                        .addAllOfItem(resolvedSchema.schema);\n            }\n            parameter.setSchema(resSchema);\n        }\n        resolvedSchema.referencedSchemas.forEach(components::addSchemas);\n\n        // handle first FormParam as it affects Explode resolving\n        for (Annotation annotation : annotations) {\n            if (annotation.annotationType().getName().equals(\"javax.ws.rs.FormParam\")) {\n                try {\n                    String name = (String) annotation.annotationType().getMethod(\"value\").invoke(annotation);\n                    if (StringUtils.isNotBlank(name)) {\n                        parameter.setName(name);\n                    }\n                } catch (Exception e) {\n                }\n                // set temporarily to \"form\" to inform caller that we need to further process along other form parameters\n                parameter.setIn(\"form\");\n            } else if (annotation.annotationType().getName().endsWith(\"FormDataParam\")) {\n                try {\n                    String name = (String) annotation.annotationType().getMethod(\"value\").invoke(annotation);\n                    if (StringUtils.isNotBlank(name)) {\n                        parameter.setName(name);\n                    }\n                } catch (Exception e) {\n                }\n                // set temporarily to \"form\" to inform caller that we need to further process along other form parameters\n                parameter.setIn(\"form\");\n            }\n        }\n\n        for (Annotation annotation : annotations) {\n            if (annotation instanceof io.swagger.v3.oas.annotations.Parameter) {\n                io.swagger.v3.oas.annotations.Parameter p = (io.swagger.v3.oas.annotations.Parameter) annotation;\n                if (p.hidden()) {\n                    return null;\n                }\n                if (StringUtils.isNotBlank(p.ref())) {\n                    parameter = new Parameter().$ref(p.ref());\n                    return parameter;\n                }\n\n                if (StringUtils.isNotBlank(p.description())) {\n                    parameter.setDescription(p.description());\n                }\n                if (StringUtils.isNotBlank(p.name())) {\n                    parameter.setName(p.name());\n                }\n                if (StringUtils.isNotBlank(p.in().toString())) {\n                    parameter.setIn(p.in().toString());\n                }\n                if (StringUtils.isNotBlank(p.example())) {\n                    try {\n                        parameter.setExample(Json.mapper().readTree(p.example()));\n                    } catch (IOException e) {\n                        parameter.setExample(p.example());\n                    }\n                }\n                if (p.deprecated()) {\n                    parameter.setDeprecated(p.deprecated());\n                }\n                if (p.required()) {\n                    parameter.setRequired(p.required());\n                }\n                if (p.allowEmptyValue()) {\n                    parameter.setAllowEmptyValue(p.allowEmptyValue());\n                }\n                if (p.allowReserved()) {\n                    parameter.setAllowReserved(p.allowReserved());\n                }\n\n                Map<String, Example> exampleMap = new LinkedHashMap<>();\n                if (p.examples().length == 1 && StringUtils.isBlank(p.examples()[0].name())) {\n                    Optional<Example> exampleOptional = AnnotationsUtils.getExample(p.examples()[0], true);\n                    if (exampleOptional.isPresent()) {\n                        parameter.setExample(exampleOptional.get());\n                    }\n                } else {\n                    for (ExampleObject exampleObject : p.examples()) {\n                        AnnotationsUtils.getExample(exampleObject).ifPresent(example -> exampleMap.put(exampleObject.name(), example));\n                    }\n                }\n                if (exampleMap.size() > 0) {\n                    parameter.setExamples(exampleMap);\n                }\n\n                if (p.extensions().length > 0) {\n                    Map<String, Object> extensionMap = AnnotationsUtils.getExtensions(openapi31, p.extensions());\n                    if (extensionMap != null && ! extensionMap.isEmpty()) {\n                        extensionMap.forEach(parameter::addExtension);\n                    }\n                }\n\n                Optional<Content> content = AnnotationsUtils.getContent(p.content(), classTypes, methodTypes, parameter.getSchema(), null, jsonViewAnnotation);\n                if (content.isPresent()) {\n                    parameter.setContent(content.get());\n                    parameter.setSchema(null);\n                }\n                setParameterStyle(parameter, p);\n                setParameterExplode(parameter, p);\n\n            } else if (annotation.annotationType().getName().equals(\"javax.ws.rs.PathParam\")) {\n                try {\n                    String name = (String) annotation.annotationType().getMethod(\"value\").invoke(annotation);\n                    if (StringUtils.isNotBlank(name)) {\n                        parameter.setName(name);\n                    }\n                } catch (Exception e) {\n                }\n            } else if (annotation.annotationType().getName().equals(\"javax.validation.constraints.Size\")) {\n                try {\n                    if (parameter.getSchema() == null) {\n                        parameter.setSchema(new ArraySchema());\n                    }\n                    if (isArraySchema(parameter.getSchema())) {\n                        Schema as = parameter.getSchema();\n                        Integer min = (Integer) annotation.annotationType().getMethod(\"min\").invoke(annotation);\n                        if (min != null) {\n                            as.setMinItems(min);\n                        }\n                        Integer max = (Integer) annotation.annotationType().getMethod(\"max\").invoke(annotation);\n                        if (max != null) {\n                            as.setMaxItems(max);\n                        }\n                    }\n\n                } catch (Exception e) {\n                    LOGGER.error(\"failed on \" + annotation.annotationType().getName(), e);\n                }\n            } else if (ModelResolver.NOT_NULL_ANNOTATIONS.contains(annotation.annotationType().getSimpleName())) {\n                parameter.setRequired(true);\n            }\n        }\n        final String defaultValue = helper.getDefaultValue();\n\n        Schema paramSchema = parameter.getSchema();\n        if (paramSchema == null) {\n            if (parameter.getContent() != null && !parameter.getContent().values().isEmpty()) {\n                paramSchema = parameter.getContent().values().iterator().next().getSchema();\n            }\n        }\n        if (paramSchema != null) {\n            if (isArraySchema(paramSchema)) {\n                if (defaultValue != null) {\n                    paramSchema.getItems().setDefault(defaultValue);\n                }\n            } else {\n                if (defaultValue != null) {\n                    paramSchema.setDefault(defaultValue);\n                }\n            }\n        }\n        return parameter;\n    }\n\n    public static boolean isArraySchema(Schema schema) {\n        return \"array\".equals(schema.getType()) || (schema.getTypes() != null && schema.getTypes().contains(\"array\"));\n    }\n\n    public static void setParameterExplode(Parameter parameter, io.swagger.v3.oas.annotations.Parameter p) {\n        if (isExplodable(p, parameter)) {\n            if (Explode.TRUE.equals(p.explode())) {\n                parameter.setExplode(Boolean.TRUE);\n            } else if (Explode.FALSE.equals(p.explode())) {\n                parameter.setExplode(Boolean.FALSE);\n            }\n        }\n    }\n\n    private static boolean isExplodable(io.swagger.v3.oas.annotations.Parameter p, Parameter parameter) {\n        io.swagger.v3.oas.annotations.media.Schema schema = AnnotationsUtils.hasArrayAnnotation(p.array()) ? p.array().schema() : p.schema();\n        boolean explode = true;\n        if (schema != null) {\n            Class implementation = schema.implementation();\n            if (implementation == Void.class) {\n                if (!schema.type().equals(\"object\") && !schema.type().equals(\"array\") && !schema.type().isEmpty()) {\n                    explode = false;\n                }\n                if (schema.types().length != 0 &&\n                        (!Arrays.asList(schema.types()).contains(\"array\") && !Arrays.asList(schema.types()).contains(\"object\"))) {\n                    explode = false;\n                }\n            }\n        }\n        return explode;\n    }\n\n    public static void setParameterStyle(Parameter parameter, io.swagger.v3.oas.annotations.Parameter p) {\n        if (StringUtils.isNotBlank(p.style().toString())) {\n            parameter.setStyle(Parameter.StyleEnum.valueOf(p.style().toString().toUpperCase()));\n        }\n    }\n\n    public static Annotation getParamSchemaAnnotation(List<Annotation> annotations) {\n        if (annotations == null) {\n            return null;\n        }\n        io.swagger.v3.oas.annotations.media.Schema rootSchema = null;\n        io.swagger.v3.oas.annotations.media.ArraySchema rootArraySchema = null;\n        io.swagger.v3.oas.annotations.media.Schema contentSchema = null;\n        io.swagger.v3.oas.annotations.media.Schema paramSchema = null;\n        io.swagger.v3.oas.annotations.media.ArraySchema paramArraySchema = null;\n        for (Annotation annotation : annotations) {\n            if (annotation instanceof io.swagger.v3.oas.annotations.media.Schema) {\n                rootSchema = (io.swagger.v3.oas.annotations.media.Schema) annotation;\n            } else if (annotation instanceof io.swagger.v3.oas.annotations.media.ArraySchema) {\n                rootArraySchema = (io.swagger.v3.oas.annotations.media.ArraySchema) annotation;\n            } else if (annotation instanceof io.swagger.v3.oas.annotations.Parameter) {\n                io.swagger.v3.oas.annotations.Parameter paramAnnotation = (io.swagger.v3.oas.annotations.Parameter) annotation;\n                if (paramAnnotation.content().length > 0) {\n                    if (AnnotationsUtils.hasSchemaAnnotation(paramAnnotation.content()[0].schema())) {\n                        contentSchema = paramAnnotation.content()[0].schema();\n                    }\n                }\n                if (AnnotationsUtils.hasSchemaAnnotation(paramAnnotation.schema())) {\n                    paramSchema = paramAnnotation.schema();\n                }\n                if (AnnotationsUtils.hasArrayAnnotation(paramAnnotation.array())) {\n                    paramArraySchema = paramAnnotation.array();\n                }\n            }\n        }\n        if (rootSchema != null || rootArraySchema != null) {\n            return null;\n        }\n        if (contentSchema != null) {\n            return contentSchema;\n        }\n        if (paramSchema != null) {\n            return paramSchema;\n        }\n        if (paramArraySchema != null) {\n            return paramArraySchema;\n        }\n        return null;\n    }\n\n    public static Type getParameterType(io.swagger.v3.oas.annotations.Parameter paramAnnotation) {\n        return getParameterType(paramAnnotation, false);\n    }\n    public static Type getParameterType(io.swagger.v3.oas.annotations.Parameter paramAnnotation, boolean nullIfNotFound) {\n        if (paramAnnotation == null) {\n            return null;\n        }\n        io.swagger.v3.oas.annotations.media.Schema contentSchema = null;\n        io.swagger.v3.oas.annotations.media.Schema paramSchema = null;\n        io.swagger.v3.oas.annotations.media.ArraySchema paramArraySchema = null;\n\n        if (paramAnnotation.content().length > 0) {\n            if (AnnotationsUtils.hasSchemaAnnotation(paramAnnotation.content()[0].schema())) {\n                contentSchema = paramAnnotation.content()[0].schema();\n            }\n        }\n        if (AnnotationsUtils.hasSchemaAnnotation(paramAnnotation.schema())) {\n            paramSchema = paramAnnotation.schema();\n        }\n        if (AnnotationsUtils.hasArrayAnnotation(paramAnnotation.array())) {\n            paramArraySchema = paramAnnotation.array();\n        }\n        if (contentSchema != null) {\n            return AnnotationsUtils.getSchemaType(contentSchema, nullIfNotFound);\n        }\n        if (paramSchema != null) {\n            return AnnotationsUtils.getSchemaType(paramSchema, nullIfNotFound);\n        }\n        if (paramArraySchema != null) {\n            return AnnotationsUtils.getSchemaType(paramArraySchema.schema(), nullIfNotFound);\n        }\n        if (nullIfNotFound) {\n            return null;\n        }\n        return String.class;\n    }\n\n    public static final String MEDIA_TYPE = \"*/*\";\n\n    /**\n     * The <code>AnnotationsHelper</code> class defines helper methods for\n     * accessing supported parameter annotations.\n     */\n    private static class AnnotationsHelper {\n        private boolean context;\n        private String defaultValue;\n\n        /**\n         * Constructs an instance.\n         *\n         * @param annotations array or parameter annotations\n         */\n        public AnnotationsHelper(List<Annotation> annotations, Type _type) {\n            String rsDefault = null;\n            if (annotations != null) {\n                for (Annotation item : annotations) {\n                    if (\"javax.ws.rs.core.Context\".equals(item.annotationType().getName())) {\n                        context = true;\n                    } else if (\"javax.ws.rs.DefaultValue\".equals(item.annotationType().getName())) {\n                        try {\n                            rsDefault = (String) item.annotationType().getMethod(\"value\").invoke(item);\n                        } catch (Exception ex) {\n                            LOGGER.error(\"Invocation of value method failed\", ex);\n                        }\n                    }\n                }\n            }\n            defaultValue = rsDefault;\n\n        }\n\n        /**\n         */\n        public boolean isContext() {\n            return context;\n        }\n\n        /**\n         * Returns default value from annotation.\n         *\n         * @return default value from annotation\n         */\n        public String getDefaultValue() {\n            return defaultValue;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/PathUtils.java",
    "content": "package io.swagger.v3.core.util;\n\nimport org.apache.commons.lang3.StringUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.text.CharacterIterator;\nimport java.text.StringCharacterIterator;\nimport java.util.Map;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\npublic class PathUtils {\n    private static Logger LOGGER = LoggerFactory.getLogger(PathUtils.class);\n    private static final char COLON = ':';\n    private static final char OPEN = '{';\n    private static final char CLOSE = '}';\n    private static final char SLASH = '/';\n    private static final Pattern TRIM_PATTERN = Pattern.compile(\"^/*(.*?)/*$\");\n\n    public static String parsePath(String uri, Map<String, String> patterns) {\n        if (uri == null) {\n            return null;\n        } else if (StringUtils.isBlank(uri)) {\n            return String.valueOf(SLASH);\n        }\n        CharacterIterator ci = new StringCharacterIterator(uri);\n        StringBuilder pathBuffer = new StringBuilder();\n        char c = ci.first();\n        if (c == CharacterIterator.DONE) {\n            return String.valueOf(SLASH);\n        }\n        do {\n            if (c == OPEN) {\n                String regexBuffer = cutParameter(ci, patterns);\n                if (regexBuffer == null) {\n                    LOGGER.warn(\"Operation path \\\"{}\\\" contains syntax error.\", uri);\n                    return null;\n                }\n                pathBuffer.append(regexBuffer);\n            } else {\n                int length = pathBuffer.length();\n                if (!(c == SLASH && (length != 0 && pathBuffer.charAt(length - 1) == SLASH))) {\n                    pathBuffer.append(c);\n                }\n            }\n        } while ((c = ci.next()) != CharacterIterator.DONE);\n        return pathBuffer.toString();\n    }\n\n    public static String collectPath(String... pathParts) {\n        final StringBuilder sb = new StringBuilder();\n        for (String item : pathParts) {\n            if (StringUtils.isBlank(item)) {\n                continue;\n            }\n            final String path = trimPath(item);\n            if (StringUtils.isNotBlank(path)) {\n                sb.append(SLASH).append(path);\n            }\n        }\n        return sb.length() > 0 ? sb.toString() : String.valueOf(SLASH);\n    }\n\n    private static String trimPath(String value) {\n        final Matcher matcher = TRIM_PATTERN.matcher(value);\n        return matcher.find() && StringUtils.isNotBlank(matcher.group(1)) ? matcher.group(1) : null;\n    }\n\n    private static String cutParameter(CharacterIterator ci, Map<String, String> patterns) {\n        StringBuilder regexBuffer = new StringBuilder();\n        int braceCount = 1;\n        for (char regexChar = ci.next(); regexChar != CharacterIterator.DONE; regexChar = ci.next()) {\n            if (regexChar == OPEN) {\n                braceCount++;\n            } else if (regexChar == CLOSE) {\n                braceCount--;\n                if (braceCount == 0) {\n                    break;\n                }\n            }\n            regexBuffer.append(regexChar);\n        }\n        if (braceCount != 0) {\n            return null;\n        }\n        String regex = StringUtils.trimToNull(regexBuffer.toString());\n        if (regex == null) {\n            return null;\n        }\n        StringBuilder pathBuffer = new StringBuilder();\n        pathBuffer.append(OPEN);\n        int index = regex.indexOf(COLON);\n        if (index != -1) {\n            final String name = StringUtils.trimToNull(regex.substring(0, index));\n            final String value = StringUtils.trimToNull(regex.substring(index + 1, regex.length()));\n            if (name != null) {\n                pathBuffer.append(name);\n                if (value != null) {\n                    patterns.put(name, value);\n                }\n            } else {\n                return null;\n            }\n        } else {\n            pathBuffer.append(regex);\n        }\n        pathBuffer.append(CLOSE);\n        return pathBuffer.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/Paths31Deserializer.java",
    "content": "package io.swagger.v3.core.util;\n\npublic class Paths31Deserializer extends PathsDeserializer {\n\n    public Paths31Deserializer() {\n        this.openapi31 = true;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/PathsDeserializer.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.core.JsonParser;\nimport com.fasterxml.jackson.databind.DeserializationContext;\nimport com.fasterxml.jackson.databind.JsonDeserializer;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.node.ObjectNode;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.Paths;\n\nimport java.io.IOException;\nimport java.util.Iterator;\nimport java.util.LinkedHashMap;\nimport java.util.Map;\n\npublic class PathsDeserializer extends JsonDeserializer<Paths> {\n\n    protected boolean openapi31;\n\n    @Override\n    public Paths deserialize(JsonParser jp, DeserializationContext ctxt)\n            throws IOException {\n\n        final ObjectMapper mapper;\n        if (openapi31) {\n            mapper = Json31.mapper();\n        } else {\n            mapper = Json.mapper();\n        }\n\n        Paths result = new Paths();\n        JsonNode node = jp.getCodec().readTree(jp);\n        ObjectNode objectNode = (ObjectNode)node;\n        Map<String, Object> extensions = new LinkedHashMap<>();\n        for (Iterator<String> it = objectNode.fieldNames(); it.hasNext(); ) {\n            String childName = it.next();\n            JsonNode child = objectNode.get(childName);\n            // if name start with `x-` consider it an extesion\n            if (childName.startsWith(\"x-\")) {\n                extensions.put(childName, mapper.convertValue(child, Object.class));\n            } else {\n                result.put(childName, mapper.convertValue(child, PathItem.class));\n            }\n        }\n        if (!extensions.isEmpty()) {\n            result.setExtensions(extensions);\n        }\n        return result;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/PrettyPrintHelper.java",
    "content": "package io.swagger.v3.core.util;\n\nimport org.slf4j.Logger;\n\nimport java.io.PrintWriter;\nimport java.io.StringWriter;\nimport java.util.function.Consumer;\n\nclass PrettyPrintHelper {\n\n    private static final ThreadLocal<Consumer<String>> OVERRIDE = new ThreadLocal<>();\n\n    private PrettyPrintHelper() {\n        // utility class\n    }\n\n    static void setOverride(Consumer<String> consumer) {\n        OVERRIDE.set(consumer);\n    }\n\n    static void clearOverride() {\n        OVERRIDE.remove();\n    }\n\n    static void emit(Logger logger, String message) {\n        Consumer<String> consumer = OVERRIDE.get();\n        if (consumer != null) {\n            consumer.accept(message);\n        } else {\n            logger.debug(message);\n        }\n    }\n\n    static void emitError(Logger logger, String message, Throwable throwable) {\n        Consumer<String> consumer = OVERRIDE.get();\n        if (consumer != null) {\n            StringBuilder builder = new StringBuilder(message);\n            if (throwable != null) {\n                builder.append(System.lineSeparator());\n                StringWriter writer = new StringWriter();\n                throwable.printStackTrace(new PrintWriter(writer));\n                builder.append(writer);\n            }\n            consumer.accept(builder.toString());\n        }\n        logger.error(message, throwable);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/PrimitiveType.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.databind.type.TypeFactory;\nimport io.swagger.v3.oas.models.media.BinarySchema;\nimport io.swagger.v3.oas.models.media.BooleanSchema;\nimport io.swagger.v3.oas.models.media.ByteArraySchema;\nimport io.swagger.v3.oas.models.media.DateSchema;\nimport io.swagger.v3.oas.models.media.DateTimeSchema;\nimport io.swagger.v3.oas.models.media.FileSchema;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.JsonSchema;\nimport io.swagger.v3.oas.models.media.NumberSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport io.swagger.v3.oas.models.media.UUIDSchema;\nimport org.apache.commons.lang3.StringUtils;\n\nimport java.lang.reflect.Type;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.TreeMap;\nimport java.util.concurrent.ConcurrentHashMap;\n\n/**\n * The <code>PrimitiveType</code> enumeration defines a mapping of limited set\n * of classes into Swagger primitive types.\n */\npublic enum PrimitiveType {\n\n    STRING(String.class, \"string\") {\n        @Override\n        public Schema createProperty() {\n            return new StringSchema();\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"string\");\n        }\n    },\n    BOOLEAN(Boolean.class, \"boolean\") {\n        @Override\n        public Schema createProperty() {\n            return new BooleanSchema();\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"boolean\");\n        }\n    },\n    BYTE(Byte.class, \"byte\") {\n        @Override\n        public Schema createProperty() {\n            if (\n                    (System.getProperty(Schema.BINARY_STRING_CONVERSION_PROPERTY) != null && System.getProperty(Schema.BINARY_STRING_CONVERSION_PROPERTY).equals(Schema.BynaryStringConversion.BINARY_STRING_CONVERSION_STRING_SCHEMA.toString())) ||\n                    (System.getenv(Schema.BINARY_STRING_CONVERSION_PROPERTY) != null && System.getenv(Schema.BINARY_STRING_CONVERSION_PROPERTY).equals(Schema.BynaryStringConversion.BINARY_STRING_CONVERSION_STRING_SCHEMA.toString()))) {\n                return new StringSchema().format(\"byte\");\n            }\n            return new ByteArraySchema();\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"string\").format(\"byte\");\n        }\n    },\n    BINARY(Byte.class, \"binary\") {\n        @Override\n        public Schema createProperty() {\n            if (\n                    (System.getProperty(Schema.BINARY_STRING_CONVERSION_PROPERTY) != null && System.getProperty(Schema.BINARY_STRING_CONVERSION_PROPERTY).equals(Schema.BynaryStringConversion.BINARY_STRING_CONVERSION_STRING_SCHEMA.toString())) ||\n                    (System.getenv(Schema.BINARY_STRING_CONVERSION_PROPERTY) != null && System.getenv(Schema.BINARY_STRING_CONVERSION_PROPERTY).equals(Schema.BynaryStringConversion.BINARY_STRING_CONVERSION_STRING_SCHEMA.toString()))) {\n                return new StringSchema().format(\"binary\");\n            }\n            return new BinarySchema();\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"string\").format(\"binary\");\n        }\n    },\n    URI(java.net.URI.class, \"uri\") {\n        @Override\n        public Schema createProperty() {\n            return new StringSchema().format(\"uri\");\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"string\").format(\"uri\");\n        }\n    },\n    URL(java.net.URL.class, \"url\") {\n        @Override\n        public Schema createProperty() {\n            return new StringSchema().format(\"url\");\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"string\").format(\"url\");\n        }\n    },\n    EMAIL(String.class, \"email\") {\n        @Override\n        public Schema createProperty() {\n            return new StringSchema().format(\"email\");\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"string\").format(\"email\");\n        }\n    },\n    UUID(java.util.UUID.class, \"uuid\") {\n        @Override\n        public UUIDSchema createProperty() {\n            return new UUIDSchema();\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"string\").format(\"uuid\");\n        }\n    },\n    INT(Integer.class, \"integer\") {\n        @Override\n        public IntegerSchema createProperty() {\n            return new IntegerSchema();\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"integer\").format(\"int32\");\n        }\n    },\n    LONG(Long.class, \"long\") {\n        @Override\n        public Schema createProperty() {\n            return new IntegerSchema().format(\"int64\");\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"integer\").format(\"int64\");\n        }\n    },\n    FLOAT(Float.class, \"float\") {\n        @Override\n        public Schema createProperty() {\n            return new NumberSchema().format(\"float\");\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"number\").format(\"float\");\n        }\n    },\n    DOUBLE(Double.class, \"double\") {\n        @Override\n        public Schema createProperty() {\n            return new NumberSchema().format(\"double\");\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"number\").format(\"double\");\n        }\n    },\n    INTEGER(java.math.BigInteger.class) {\n        @Override\n        public Schema createProperty() {\n            return new IntegerSchema().format(null);\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"integer\");\n        }\n    },\n    DECIMAL(java.math.BigDecimal.class, \"number\") {\n        @Override\n        public Schema createProperty() {\n            return new NumberSchema();\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"number\");\n        }\n    },\n    NUMBER(Number.class, \"number\") {\n        @Override\n        public Schema createProperty() {\n            return new NumberSchema();\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"number\");\n        }\n    },\n    DATE(DateStub.class, \"date\") {\n        @Override\n        public DateSchema createProperty() {\n            return new DateSchema();\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"string\").format(\"date\");\n        }\n    },\n    DATE_TIME(java.util.Date.class, \"date-time\") {\n        @Override\n        public DateTimeSchema createProperty() {\n            return new DateTimeSchema();\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"string\").format(\"date-time\");\n        }\n    },\n    PARTIAL_TIME(java.time.LocalTime.class, \"partial-time\") {\n        @Override\n        public Schema createProperty() {\n            return new StringSchema().format(\"partial-time\");\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"string\").format(\"partial-time\");\n        }\n    },\n    FILE(java.io.File.class, \"file\") {\n        @Override\n        public FileSchema createProperty() {\n            return new FileSchema();\n        }\n        @Override\n        public Schema createProperty31() {\n            return new JsonSchema().typesItem(\"string\").format(\"binary\");\n        }\n    },\n    OBJECT(Object.class) {\n\n        @Override\n        public Schema createProperty() {\n            return explicitObjectType == null || explicitObjectType ? new Schema().type(\"object\"): new Schema();\n        }\n        @Override\n        public Schema createProperty31() {\n            return explicitObjectType == null || explicitObjectType ? new JsonSchema().typesItem(\"object\") : new JsonSchema();\n        }\n    };\n\n    public static Boolean explicitObjectType;\n    private static final Map<Class<?>, PrimitiveType> KEY_CLASSES;\n    private static final Map<Class<?>, Collection<PrimitiveType>> MULTI_KEY_CLASSES;\n    private static final Map<Class<?>, PrimitiveType> BASE_CLASSES;\n    /**\n     * Adds support of a small number of \"well-known\" types, specifically for\n     * Joda lib.\n     */\n    private static final Map<String, PrimitiveType> EXTERNAL_CLASSES;\n\n    /**\n     * Allows to exclude specific classes from KEY_CLASSES mappings to primitive\n     *\n     */\n    private static Set<String> customExcludedClasses = ConcurrentHashMap.newKeySet();\n\n    /**\n     * Allows to exclude specific classes from EXTERNAL_CLASSES mappings to primitive\n     *\n     */\n    private static Set<String> customExcludedExternalClasses = ConcurrentHashMap.newKeySet();\n\n\n    /**\n     * Adds support for custom mapping of classes to primitive types\n     */\n    private static Map<String, PrimitiveType> customClasses = new ConcurrentHashMap<>();\n\n    /**\n     * class qualified names prefixes to be considered as \"system\" types\n     */\n    private static Set<String> systemPrefixes = ConcurrentHashMap.newKeySet();\n    /**\n     * class qualified names NOT to be considered as \"system\" types\n     */\n    private static Set<String> nonSystemTypes = ConcurrentHashMap.newKeySet();\n    /**\n     * package names NOT to be considered as \"system\" types\n     */\n    private static Set<String> nonSystemTypePackages = ConcurrentHashMap.newKeySet();\n\n    /**\n     * Alternative names for primitive types that have to be supported for\n     * backward compatibility.\n     */\n    private static final Map<String, PrimitiveType> NAMES;\n    private final Class<?> keyClass;\n    private final String commonName;\n\n    public static final Map<String, String> datatypeMappings;\n\n    static {\n        systemPrefixes.add(\"java.\");\n        systemPrefixes.add(\"javax.\");\n        nonSystemTypes.add(\"java.time.LocalTime\");\n\n        final Map<String, String> dms = new HashMap<>();\n        dms.put(\"integer_int32\", \"integer\");\n        dms.put(\"integer_\", \"integer\");\n        dms.put(\"integer_int64\", \"long\");\n        dms.put(\"number_\", \"number\");\n        dms.put(\"number_float\", \"float\");\n        dms.put(\"number_double\", \"double\");\n        dms.put(\"string_\", \"string\");\n        dms.put(\"string_byte\", \"byte\");\n        dms.put(\"string_email\", \"email\");\n        dms.put(\"string_binary\", \"binary\");\n        dms.put(\"string_uri\", \"uri\");\n        dms.put(\"string_url\", \"url\");\n        dms.put(\"string_uuid\", \"uuid\");\n        dms.put(\"string_date\", \"date\");\n        dms.put(\"string_date-time\", \"date-time\");\n        dms.put(\"string_partial-time\", \"partial-time\");\n        dms.put(\"string_password\", \"password\");\n        dms.put(\"boolean_\", \"boolean\");\n        dms.put(\"object_\", \"object\");\n        datatypeMappings = Collections.unmodifiableMap(dms);\n\n        final Map<Class<?>, PrimitiveType> keyClasses = new HashMap<>();\n        addKeys(keyClasses, BOOLEAN, Boolean.class, Boolean.TYPE);\n        addKeys(keyClasses, STRING, String.class, Character.class, Character.TYPE);\n        addKeys(keyClasses, BYTE, Byte.class, Byte.TYPE);\n        addKeys(keyClasses, URL, java.net.URL.class);\n        addKeys(keyClasses, URI, java.net.URI.class);\n        addKeys(keyClasses, UUID, java.util.UUID.class);\n        addKeys(keyClasses, INT, Integer.class, Integer.TYPE, Short.class, Short.TYPE);\n        addKeys(keyClasses, LONG, Long.class, Long.TYPE);\n        addKeys(keyClasses, FLOAT, Float.class, Float.TYPE);\n        addKeys(keyClasses, DOUBLE, Double.class, Double.TYPE);\n        addKeys(keyClasses, INTEGER, java.math.BigInteger.class);\n        addKeys(keyClasses, DECIMAL, java.math.BigDecimal.class);\n        addKeys(keyClasses, NUMBER, Number.class);\n        addKeys(keyClasses, DATE, DateStub.class);\n        addKeys(keyClasses, DATE_TIME, java.util.Date.class);\n        addKeys(keyClasses, FILE, java.io.File.class);\n        addKeys(keyClasses, OBJECT, Object.class);\n        KEY_CLASSES = Collections.unmodifiableMap(keyClasses);\n\n        final Map<Class<?>, Collection<PrimitiveType>> multiKeyClasses = new HashMap<>();\n        addMultiKeys(multiKeyClasses, BYTE, byte[].class);\n        addMultiKeys(multiKeyClasses, BINARY, byte[].class);\n        MULTI_KEY_CLASSES = Collections.unmodifiableMap(multiKeyClasses);\n\n        final Map<Class<?>, PrimitiveType> baseClasses = new HashMap<>();\n        addKeys(baseClasses, DATE_TIME, java.util.Date.class, java.util.Calendar.class);\n        BASE_CLASSES = Collections.unmodifiableMap(baseClasses);\n\n        final Map<String, PrimitiveType> externalClasses = new HashMap<>();\n        addKeys(externalClasses, DATE, \"org.joda.time.LocalDate\", \"java.time.LocalDate\");\n        addKeys(externalClasses, DATE_TIME,\n                \"java.time.LocalDateTime\",\n                \"java.time.ZonedDateTime\",\n                \"java.time.OffsetDateTime\",\n                \"javax.xml.datatype.XMLGregorianCalendar\",\n                \"org.joda.time.LocalDateTime\",\n                \"org.joda.time.ReadableDateTime\",\n                \"org.joda.time.DateTime\",\n                \"java.time.Instant\");\n        EXTERNAL_CLASSES = Collections.unmodifiableMap(externalClasses);\n\n        final Map<String, PrimitiveType> names = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n        for (PrimitiveType item : values()) {\n            final String name = item.getCommonName();\n            if (name != null) {\n                addKeys(names, item, name);\n            }\n        }\n        addKeys(names, INT, \"int\");\n        addKeys(names, OBJECT, \"object\");\n        NAMES = Collections.unmodifiableMap(names);\n\n        if (System.getenv(Schema.EXPLICIT_OBJECT_SCHEMA_PROPERTY) != null) {\n            explicitObjectType = Boolean.parseBoolean(System.getenv(Schema.EXPLICIT_OBJECT_SCHEMA_PROPERTY));\n        } else if (System.getProperty(Schema.EXPLICIT_OBJECT_SCHEMA_PROPERTY) != null) {\n            explicitObjectType = Boolean.parseBoolean(System.getProperty(Schema.EXPLICIT_OBJECT_SCHEMA_PROPERTY));\n        }\n    }\n\n    private PrimitiveType(Class<?> keyClass) {\n        this(keyClass, null);\n    }\n\n    private PrimitiveType(Class<?> keyClass, String commonName) {\n        this.keyClass = keyClass;\n        this.commonName = commonName;\n    }\n\n\n    /**\n     * Adds support for custom mapping of classes to primitive types\n     *\n     * @return Map of custom classes to primitive type\n     * @since 2.0.6\n     */\n    public static Set<String> customExcludedClasses() {\n        return customExcludedClasses;\n    }\n\n    /**\n     * Adds support for custom mapping of classes to primitive types\n     *\n     * @return Map of custom classes to primitive type\n     * @since 2.1.2\n     */\n    public static Set<String> customExcludedExternalClasses() {\n        return customExcludedExternalClasses;\n    }\n\n    /**\n     * Adds support for custom mapping of classes to primitive types\n     *\n     * @return Map of custom classes to primitive type\n     * @since 2.0.6\n     */\n    public static Map<String, PrimitiveType> customClasses() {\n        return customClasses;\n    }\n\n    /**\n     * class qualified names prefixes to be considered as \"system\" types\n     *\n     * @return Mutable set of class qualified names prefixes to be considered as \"system\" types\n     * @since 2.0.6\n     */\n    public static Set<String> systemPrefixes() {\n        return systemPrefixes;\n    }\n\n    /**\n     * class qualified names NOT to be considered as \"system\" types\n     *\n     * @return Mutable set of class qualified names NOT to be considered as \"system\" types\n     * @since 2.0.6\n     */\n    public static Set<String> nonSystemTypes() {\n        return nonSystemTypes;\n    }\n\n    /**\n     * package names NOT to be considered as \"system\" types\n     *\n     * @return Mutable set of package names NOT to be considered as \"system\" types\n     * @since 2.0.6\n     */\n    public static Set<String> nonSystemTypePackages() {\n        return nonSystemTypePackages;\n    }\n\n    public static PrimitiveType fromTypeAndFormat(Type type, String format) {\n        final Class<?> raw = TypeFactory.defaultInstance().constructType(type).getRawClass();\n        final Collection<PrimitiveType> keys = MULTI_KEY_CLASSES.get(raw);\n        if (keys == null || keys.isEmpty() || StringUtils.isBlank(format)) {\n            return fromType(type);\n        } else {\n            return keys\n                .stream()\n                .filter(t -> t.getCommonName().equalsIgnoreCase(format))\n                .findAny()\n                .orElse(null);\n        }\n    }\n    \n    public static PrimitiveType fromType(Type type) {\n        final Class<?> raw = TypeFactory.defaultInstance().constructType(type).getRawClass();\n        final PrimitiveType key = KEY_CLASSES.get(raw);\n        if (key != null) {\n            if (!customExcludedClasses.contains(raw.getName())) {\n                return key;\n            }\n        }\n        \n        final Collection<PrimitiveType> keys = MULTI_KEY_CLASSES.get(raw);\n        if (keys != null && !keys.isEmpty()) {\n            final PrimitiveType first = keys.iterator().next();\n            if (!customExcludedClasses.contains(raw.getName())) {\n                return first;\n            }\n        }\n\n        final PrimitiveType custom = customClasses.get(raw.getName());\n        if (custom != null) {\n            return custom;\n        }\n\n        final PrimitiveType external = EXTERNAL_CLASSES.get(raw.getName());\n        if (external != null) {\n            if (!customExcludedExternalClasses().contains(raw.getName())) {\n                return external;\n            }\n\n        }\n\n        for (Map.Entry<Class<?>, PrimitiveType> entry : BASE_CLASSES.entrySet()) {\n            if (entry.getKey().isAssignableFrom(raw)) {\n                return entry.getValue();\n            }\n        }\n        return null;\n    }\n\n    public static PrimitiveType fromName(String name) {\n        if (name == null) {\n            return null;\n        }\n        PrimitiveType fromName = NAMES.get(name);\n        if (fromName == null) {\n            if (!customExcludedExternalClasses().contains(name)) {\n                fromName = EXTERNAL_CLASSES.get(name);\n            }\n        }\n        return fromName;\n    }\n\n    public static PrimitiveType fromTypeAndFormat(String type, String format) {\n        if (StringUtils.isNotBlank(type) && type.equals(\"object\")) {\n            return null;\n        }\n        return fromName(datatypeMappings.get(String.format(\"%s_%s\", StringUtils.isBlank(type) ? \"\" : type, StringUtils.isBlank(format) ? \"\" : format)));\n    }\n\n    public static Schema createProperty(Type type) {\n        return createProperty(type, false);\n    }\n\n    public static Schema createProperty(Type type, boolean openapi31) {\n        final PrimitiveType item = fromType(type);\n        return item == null ? null : openapi31 ? item.createProperty31() : item.createProperty();\n    }\n\n    public static Schema createProperty(String name) {\n        return createProperty(name, false);\n    }\n\n    public static Schema createProperty(String name, boolean openapi31) {\n        final PrimitiveType item = fromName(name);\n        return item == null ? null : openapi31 ? item.createProperty31() : item.createProperty();\n    }\n\n    public static String getCommonName(Type type) {\n        final PrimitiveType item = fromType(type);\n        return item == null ? null : item.getCommonName();\n    }\n\n    public Class<?> getKeyClass() {\n        return keyClass;\n    }\n\n    public String getCommonName() {\n        return commonName;\n    }\n\n    public abstract Schema createProperty();\n    public abstract Schema createProperty31();\n\n    private static <K> void addKeys(Map<K, PrimitiveType> map, PrimitiveType type, K... keys) {\n        for (K key : keys) {\n            map.put(key, type);\n        }\n    }\n\n    private static <K> void addMultiKeys(Map<K, Collection<PrimitiveType>> map, PrimitiveType type, K... keys) {\n        for (K key : keys) {\n            if (!map.containsKey(key)) {\n                map.put(key, new ArrayList<>());\n            }\n            map.get(key).add(type);\n        }\n    }\n\n    private static class DateStub {\n        private DateStub() {\n        }\n    }\n\n    /**\n     * Convenience method to map LocalTime to string primitive with rfc3339 format partial-time.\n     * See https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14\n     *\n     * @since 2.0.6\n     */\n    public static void enablePartialTime() {\n        customClasses().put(\"org.joda.time.LocalTime\", PrimitiveType.PARTIAL_TIME);\n        customClasses().put(\"java.time.LocalTime\", PrimitiveType.PARTIAL_TIME);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/RefUtils.java",
    "content": "package io.swagger.v3.core.util;\n\nimport io.swagger.v3.oas.models.Components;\nimport org.apache.commons.lang3.StringUtils;\nimport org.apache.commons.lang3.tuple.ImmutablePair;\nimport org.apache.commons.lang3.tuple.Pair;\n\npublic class RefUtils {\n\n    public static String constructRef(String simpleRef) {\n        return Components.COMPONENTS_SCHEMAS_REF + simpleRef;\n    }\n\n    public static String constructRef(String simpleRef, String prefix) {\n        return prefix + simpleRef;\n    }\n\n    public static Pair extractSimpleName(String ref) {\n        int idx = ref.lastIndexOf('/');\n        if (idx > 0) {\n            String simple = ref.substring(idx + 1);\n            if (!StringUtils.isBlank(simple)) {\n                return new ImmutablePair<>(simple, ref.substring(0, idx + 1));\n            }\n        }\n        return new ImmutablePair<>(ref, null);\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/ReferenceTypeUtils.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.databind.JavaType;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.util.Arrays;\n\npublic abstract class ReferenceTypeUtils {\n\n    private static Logger LOGGER = LoggerFactory.getLogger(ReferenceTypeUtils.class);\n\n    public static boolean _isReferenceType(JavaType jtype) {\n\n        return Arrays.asList(\"com.google.common.base.Optional\", \"java.util.Optional\")\n                .contains(jtype.getRawClass().getCanonicalName()) || jtype.isReferenceType();\n    }\n\n    /**\n     * check if type is a reference type, returns the unwrapped type in case, otherwise null\n     *\n     * @param type\n     */\n    public static AnnotatedType unwrapReference(AnnotatedType type) {\n\n        if (type == null) {\n            return type;\n        } else if (type.getType() == null) {\n            return null;\n        }\n        try {\n            final JavaType jtype;\n            if (type.getType() instanceof JavaType) {\n                jtype = (JavaType) type.getType();\n            } else {\n                jtype = Json.mapper().constructType(type.getType());\n            }\n\n            if (_isReferenceType(jtype)) {\n                AnnotatedType aType = new AnnotatedType()\n                        .type(jtype.containedType(0))\n                        .name(type.getName())\n                        .parent(type.getParent())\n                        .jsonUnwrappedHandler(type.getJsonUnwrappedHandler())\n                        .skipOverride(type.isSkipOverride())\n                        .schemaProperty(type.isSchemaProperty())\n                        .ctxAnnotations(type.getCtxAnnotations())\n                        .resolveAsRef(type.isResolveAsRef())\n                        .jsonViewAnnotation(type.getJsonViewAnnotation())\n                        .skipSchemaName(type.isSkipSchemaName())\n                        .skipJsonIdentity(type.isSkipJsonIdentity())\n                        .components(type.getComponents())\n                        .propertyName(type.getPropertyName());\n                return aType;\n            } else {\n                return null;\n            }\n        } catch (Exception e) {\n            LOGGER.error(\"Error unwrapping optional\", e);\n            return null;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/ReflectionUtils.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.databind.JavaType;\nimport com.fasterxml.jackson.databind.type.TypeFactory;\nimport org.apache.commons.lang3.ArrayUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Constructor;\nimport java.lang.reflect.Field;\nimport java.lang.reflect.InvocationTargetException;\nimport java.lang.reflect.Method;\nimport java.lang.reflect.Modifier;\nimport java.lang.reflect.Type;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Comparator;\nimport java.util.HashSet;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Optional;\nimport java.util.Set;\n\npublic class ReflectionUtils {\n    private static final Logger LOGGER = LoggerFactory.getLogger(ReflectionUtils.class);\n\n    public static Type typeFromString(String type) {\n        final PrimitiveType primitive = PrimitiveType.fromName(type);\n        if (primitive != null) {\n            return primitive.getKeyClass();\n        }\n        try {\n            return loadClassByName(type);\n        } catch (Exception e) {\n            LOGGER.warn(String.format(\"Failed to resolve '%s' into class\", type), e);\n        }\n        return null;\n    }\n\n    /**\n     * Load Class by class name. If class not found in it's Class loader or one of the parent class loaders - delegate to the Thread's ContextClassLoader\n     *\n     * @param className Canonical class name\n     * @return Class definition of className\n     * @throws ClassNotFoundException\n     */\n    public static Class<?> loadClassByName(String className) throws ClassNotFoundException {\n        try {\n            return Class.forName(className);\n        } catch (ClassNotFoundException e) {\n            return Thread.currentThread().getContextClassLoader().loadClass(className);\n        }\n    }\n\n    /**\n     * Checks if the method methodToFind is the overridden method from the superclass or superinterface.\n     *\n     * @param methodToFind is method to check\n     * @param cls          is method class\n     * @return true if the method is overridden method\n     */\n    public static boolean isOverriddenMethod(Method methodToFind, Class<?> cls) {\n\n        if (!hasOverriddenMethods(methodToFind, cls)) {\n            return false;\n        }\n        Set<Class<?>> superClasses = new HashSet<>();\n        Collections.addAll(superClasses, cls.getInterfaces());\n\n        if (cls.getSuperclass() != null) {\n            superClasses.add(cls.getSuperclass());\n        }\n\n        for (Class<?> superClass : superClasses) {\n            if (superClass != null && !(superClass.equals(Object.class))) {\n                try {\n                    Method found = superClass.getMethod(methodToFind.getName(), methodToFind.getParameterTypes());\n                    if (found.getReturnType().equals(methodToFind.getReturnType())) {\n                        if (!methodToFind.getDeclaringClass().equals(superClass)){\n                            return true;\n                        } else {\n                            if (getOverriddenMethod(found) == null) {\n                                return true;\n                            }\n                        }\n\n                    }\n                } catch (NoSuchMethodException e) {\n                    // expected\n                }\n                if (isOverriddenMethod(methodToFind, superClass)) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n\n    public static boolean hasOverriddenMethods(Method methodToFind, Class<?> cls) {\n        if (cls == null || methodToFind == null) {\n            return false;\n        }\n        boolean found = false;\n        for (Method method: cls.getMethods()) {\n            boolean equalsMethodName = method.getName().equals(methodToFind.getName());\n            boolean superClassReturnAssignable = method.getReturnType().isAssignableFrom(methodToFind.getReturnType());\n            boolean classReturnAssignable = methodToFind.getReturnType().isAssignableFrom(method.getReturnType());\n            boolean equalsParamCount = method.getParameterCount() == methodToFind.getParameterCount();\n\n            if (equalsMethodName && equalsParamCount && (superClassReturnAssignable || classReturnAssignable)){\n\n                Class[] paramsToFind = methodToFind.getParameterTypes();\n                if (paramsToFind == null || paramsToFind.length == 0) {\n                    continue;\n                }\n                boolean assignableParams = true;\n                for (int i = 0; i < paramsToFind.length; i++) {\n                    boolean superClassParamAssignable = method.getParameterTypes()[i].isAssignableFrom(paramsToFind[i]);\n                    boolean classParamAssignable = paramsToFind[i].isAssignableFrom(method.getParameterTypes()[i]);\n                    if (!superClassParamAssignable &&  !classParamAssignable) {\n                        assignableParams = false;\n                    }\n                }\n                if (assignableParams) {\n                    if (!found) {\n                        found = true;\n                    } else {\n                        return true;\n                    }\n                }\n            }\n\n        }\n        return false;\n    }\n\n    /**\n     * Returns overridden method from superclass if it exists. If method was not found returns null.\n     *\n     * @param method is method to find\n     * @return overridden method from superclass\n     */\n    public static Method getOverriddenMethod(Method method) {\n        Class<?> declaringClass = method.getDeclaringClass();\n        Class<?> superClass = declaringClass.getSuperclass();\n        Method result = null;\n        if (superClass != null && !(superClass.equals(Object.class))) {\n            result = findMethod(method, superClass);\n        }\n        if (result == null) {\n            for (Class<?> anInterface : declaringClass.getInterfaces()) {\n                result = findMethod(method, anInterface);\n                if (result != null) {\n                    return result;\n                }\n            }\n        }\n        return result;\n    }\n\n    /**\n     * Searches the field name in given class cls. If the field is found returns it, else return null.\n     *\n     * @param name is the field to search\n     * @param cls  is the class or interface where to search\n     * @return field if it is found\n     */\n    public static Field findField(String name, Class<?> cls) {\n        if (cls == null) {\n            return null;\n        }\n        try {\n            return cls.getField(name);\n        } catch (NoSuchFieldException nsfe) {\n            return null;\n        }\n    }\n\n    /**\n     * Searches the method methodToFind in given class cls. If the method is found returns it, else return null.\n     *\n     * @param methodToFind is the method to search\n     * @param cls          is the class or interface where to search\n     * @return method if it is found\n     */\n    public static Method findMethod(Method methodToFind, Class<?> cls) {\n        if (cls == null) {\n            return null;\n        }\n        String methodToSearch = methodToFind.getName();\n        Class<?>[] soughtForParameterType = methodToFind.getParameterTypes();\n        Type[] soughtForGenericParameterType = methodToFind.getGenericParameterTypes();\n        for (Method method : cls.getMethods()) {\n            if (method.getName().equals(methodToSearch) && method.getReturnType().isAssignableFrom(methodToFind.getReturnType())) {\n                Class<?>[] srcParameterTypes = method.getParameterTypes();\n                Type[] srcGenericParameterTypes = method.getGenericParameterTypes();\n                if (soughtForParameterType.length == srcParameterTypes.length &&\n                        soughtForGenericParameterType.length == srcGenericParameterTypes.length) {\n                    if (hasIdenticalParameters(srcParameterTypes, soughtForParameterType, srcGenericParameterTypes, soughtForGenericParameterType)) {\n                        return method;\n                    }\n                }\n            }\n        }\n        return null;\n    }\n\n    private static boolean hasIdenticalParameters(Class<?>[] srcParameterTypes, Class<?>[] soughtForParameterType,\n                                                  Type[] srcGenericParameterTypes, Type[] soughtForGenericParameterType) {\n        for (int j = 0; j < soughtForParameterType.length; j++) {\n            Class<?> parameterType = soughtForParameterType[j];\n            if (!(srcParameterTypes[j].equals(parameterType) || (!srcGenericParameterTypes[j].equals(soughtForGenericParameterType[j]) &&\n                    srcParameterTypes[j].isAssignableFrom(parameterType)))) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    public static boolean isInject(List<Annotation> annotations) {\n        for (Annotation annotation : annotations) {\n            // use string name to avoid additional dependencies\n            if (\"javax.inject.Inject\".equals(annotation.annotationType().getName())) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    public static boolean isConstructorCompatible(Constructor<?> constructor) {\n        if (!Modifier.isPublic(constructor.getModifiers())) {\n            final int access = Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE;\n            return constructor.getParameterTypes().length == 0 &&\n                    (constructor.getDeclaringClass().getModifiers() & access) == constructor.getModifiers();\n        }\n        return true;\n    }\n\n    /**\n     * Returns the list of declared fields from the class <code>cls</code> and its superclasses\n     * excluding <code>Object</code> class. If the field from child class hides the field from superclass,\n     * the field from superclass won't be added to the result list.\n     *\n     * The list is sorted by name to make the output of this method deterministic.\n     * See https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getFields--\n     *\n     * @param cls is the processing class\n     * @return list of Fields\n     */\n    public static List<Field> getDeclaredFields(Class<?> cls) {\n        if (cls == null || Object.class.equals(cls)) {\n            return Collections.emptyList();\n        }\n        final List<Field> fields = new ArrayList<>();\n        final Set<String> fieldNames = new HashSet<>();\n        for (Field field : cls.getDeclaredFields()) {\n            fields.add(field);\n            fieldNames.add(field.getName());\n        }\n        for (Field field : getDeclaredFields(cls.getSuperclass())) {\n            if (!fieldNames.contains(field.getName())) {\n                fields.add(field);\n            }\n        }\n\n        // Make sure the order is deterministic\n        fields.sort(Comparator.comparing(Field::getName));\n\n        return fields;\n    }\n\n    /**\n     * Returns an annotation by type from a method.\n     *\n     * @param method          is the method to find\n     * @param annotationClass is the type of annotation\n     * @param <A>             is the type of annotation\n     * @return annotation if it is found\n     */\n    public static <A extends Annotation> A getAnnotation(Method method, Class<A> annotationClass) {\n        A annotation = method.getAnnotation(annotationClass);\n        if (annotation == null) {\n            for (Annotation metaAnnotation : method.getAnnotations()) {\n                annotation = metaAnnotation.annotationType().getAnnotation(annotationClass);\n                if (annotation != null) {\n                    return annotation;\n                }\n            }\n            Method superclassMethod = getOverriddenMethod(method);\n            if (superclassMethod != null) {\n                annotation = getAnnotation(superclassMethod, annotationClass);\n            }\n        }\n        return annotation;\n    }\n\n    public static <A extends Annotation> A getAnnotation(Class<?> cls, Class<A> annotationClass) {\n        A annotation = cls.getAnnotation(annotationClass);\n        if (annotation == null) {\n            for (Annotation metaAnnotation : cls.getAnnotations()) {\n                annotation = metaAnnotation.annotationType().getAnnotation(annotationClass);\n                if (annotation != null) {\n                    return annotation;\n                }\n            }\n            Class<?> superClass = cls.getSuperclass();\n            if (superClass != null && !(superClass.equals(Object.class))) {\n                annotation = getAnnotation(superClass, annotationClass);\n            }\n        }\n        if (annotation == null) {\n            for (Class<?> anInterface : cls.getInterfaces()) {\n                for (Annotation metaAnnotation : anInterface.getAnnotations()) {\n                    annotation = metaAnnotation.annotationType().getAnnotation(annotationClass);\n                    if (annotation != null) {\n                        return annotation;\n                    }\n                }\n                annotation = getAnnotation(anInterface, annotationClass);\n                if (annotation != null) {\n                    return annotation;\n                }\n            }\n        }\n        return annotation;\n    }\n\n    /**\n     * Returns a List of repeatable annotations by type from a method.\n     *\n     * @param method          is the method to find\n     * @param annotationClass is the type of annotation\n     * @param <A>             is the type of annotation\n     * @return List of repeatable annotations if it is found\n     */\n    public static <A extends Annotation> List<A> getRepeatableAnnotations(Method method, Class<A> annotationClass) {\n        Set<A> annotationsSet = new LinkedHashSet<>();\n        A[] annotations = method.getAnnotationsByType(annotationClass);\n        if (annotations != null) {\n            annotationsSet.addAll(Arrays.asList(annotations));\n        }\n        for (Annotation metaAnnotation : method.getAnnotations()) {\n            annotations = metaAnnotation.annotationType().getAnnotationsByType(annotationClass);\n            if (annotations != null && annotations.length > 0) {\n                annotationsSet.addAll(Arrays.asList(annotations));\n            }\n        }\n        Method superclassMethod = getOverriddenMethod(method);\n        if (superclassMethod != null) {\n            List<A> superAnnotations = getRepeatableAnnotations(superclassMethod, annotationClass);\n            if (superAnnotations != null) {\n                annotationsSet.addAll(superAnnotations);\n            }\n        }\n        if (annotationsSet.isEmpty()) {\n            return null;\n        }\n        return new ArrayList<>(annotationsSet);\n    }\n\n    public static <A extends Annotation> List<A> getRepeatableAnnotations(Class<?> cls, Class<A> annotationClass) {\n        A[] annotations = getRepeatableAnnotationsArray(cls, annotationClass);\n        if (annotations == null || annotations.length == 0) {\n            return null;\n        }\n        return Arrays.asList(annotations);\n    }\n\n    public static <A extends Annotation> A[] getRepeatableAnnotationsArray(Class<?> cls, Class<A> annotationClass) {\n        A[] annotations = cls.getAnnotationsByType(annotationClass);\n        if (annotations == null || annotations.length == 0) {\n            for (Annotation metaAnnotation : cls.getAnnotations()) {\n                annotations = metaAnnotation.annotationType().getAnnotationsByType(annotationClass);\n                if (annotations != null && annotations.length > 0) {\n                    return annotations;\n                }\n            }\n            Class<?> superClass = cls.getSuperclass();\n            if (superClass != null && !(superClass.equals(Object.class))) {\n                annotations = getRepeatableAnnotationsArray(superClass, annotationClass);\n            }\n        }\n        if (annotations == null || annotations.length == 0) {\n            for (Class<?> anInterface : cls.getInterfaces()) {\n                for (Annotation metaAnnotation : anInterface.getAnnotations()) {\n                    annotations = metaAnnotation.annotationType().getAnnotationsByType(annotationClass);\n                    if (annotations != null && annotations.length > 0) {\n                        return annotations;\n                    }\n                }\n                annotations = getRepeatableAnnotationsArray(anInterface, annotationClass);\n                if (annotations != null) {\n                    return annotations;\n                }\n            }\n        }\n        return annotations;\n    }\n\n    public static Annotation[][] getParameterAnnotations(Method method) {\n        Annotation[][] methodAnnotations = method.getParameterAnnotations();\n        Method overriddenmethod = getOverriddenMethod(method);\n\n        while (overriddenmethod != null) {\n            Annotation[][] overriddenAnnotations = overriddenmethod\n                    .getParameterAnnotations();\n\n            for (int i = 0; i < methodAnnotations.length; i++) {\n                List<Type> types = new ArrayList<>();\n                for (int j = 0; j < methodAnnotations[i].length; j++) {\n                    types.add(methodAnnotations[i][j].annotationType());\n                }\n                for (int j = 0; j < overriddenAnnotations[i].length; j++) {\n                    if (!types.contains(overriddenAnnotations[i][j]\n                            .annotationType())) {\n                        methodAnnotations[i] = ArrayUtils.add(\n                                methodAnnotations[i],\n                                overriddenAnnotations[i][j]);\n                    }\n                }\n\n            }\n\n            overriddenmethod = getOverriddenMethod(overriddenmethod);\n        }\n        return methodAnnotations;\n    }\n\n    /**\n     * Checks if the type is void.\n     *\n     * @param type is the type to check\n     * @return true if the type is void\n     */\n    public static boolean isVoid(Type type) {\n        final Class<?> cls = TypeFactory.defaultInstance().constructType(type).getRawClass();\n        return Void.class.isAssignableFrom(cls) || Void.TYPE.isAssignableFrom(cls);\n    }\n\n    public static boolean isSystemType(JavaType type) {\n        return isSystemTypeNotArray(type) ? true : type.isArrayType();\n    }\n\n    public static boolean isSystemTypeNotArray(JavaType type) {\n        // used while resolving container types to skip resolving system types; possibly extend by checking classloader\n        // and/or other packages\n        for (String systemPrefix: PrimitiveType.systemPrefixes()) {\n            if (type.getRawClass().getName().startsWith(systemPrefix)) {\n                if (    !PrimitiveType.nonSystemTypes().contains(type.getRawClass().getName()) &&\n                        !PrimitiveType.nonSystemTypePackages().contains(type.getRawClass().getPackage().getName())) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n\n    /**\n     * A utility method to get an optional containing result from method or empty optional if unable to access\n     *\n     * @param method from reflect, a method of a class or interface\n     * @param obj the class object in which the method exists\n     * @param args varags of the parameters passed to the method\n     * @return the result of the method, or empty conditional\n     */\n    public static Optional<Object> safeInvoke(Method method, Object obj, Object... args) {\n        try {\n            return Optional.ofNullable(method.invoke(obj, args));\n        } catch (IllegalAccessException | InvocationTargetException e) {\n            return Optional.empty();\n        }\n    }\n\n    /**\n     * A utility method to get an optional containing value of field or empty optional if unable to access\n     *\n     * @param field from reflect, a field of a class or interface\n     * @param obj the class object in which the field exists\n     * @return optional containing the value of the field on the specified object, or empty optional\n     */\n    public static Optional<Object> safeGet(Field field, Object obj) {\n        try {\n            return Optional.ofNullable(field.get(obj));\n        } catch (IllegalAccessException e) {\n            return Optional.empty();\n        }\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/SchemaTypeUtils.java",
    "content": "package io.swagger.v3.core.util;\n\nimport io.swagger.v3.oas.models.media.Schema;\n\npublic class SchemaTypeUtils {\n\n    private static final String OBJECT_TYPE = \"object\";\n    private static final String ARRAY_TYPE = \"array\";\n    private static final String STRING_TYPE = \"string\";\n    private static final String NUMBER_TYPE = \"number\";\n    private static final String INTEGER_TYPE = \"integer\";\n\n    public static boolean isObjectSchema(Schema schema) {\n        return isSchemaType(schema, OBJECT_TYPE) || (schema.getType() == null && (hasProperties(schema) || hasPatternProperties(schema)));\n    }\n\n    public static boolean isArraySchema(Schema schema) {\n        return isSchemaType(schema, ARRAY_TYPE);\n    }\n\n    public static boolean isStringSchema(Schema schema) {\n        return isSchemaType(schema, STRING_TYPE);\n    }\n\n    public static boolean isNumberSchema(Schema schema) {\n        return isSchemaType(schema, NUMBER_TYPE) || isSchemaType(schema, INTEGER_TYPE);\n    }\n\n    private static boolean isSchemaType(Schema schema, String type) {\n        return type.equals(schema.getType()) || isSchemaType31(schema, type);\n    }\n\n    private static boolean isSchemaType31(Schema schema, String type) {\n        return schema.getTypes() != null && schema.getTypes().contains(type);\n    }\n\n    private static boolean hasProperties(Schema schema) {\n        return schema.getProperties() != null && !schema.getProperties().isEmpty();\n    }\n\n    private static boolean hasPatternProperties(Schema schema) {\n        return schema.getPatternProperties() != null && !schema.getPatternProperties().isEmpty();\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/SecurityScheme31Deserializer.java",
    "content": "package io.swagger.v3.core.util;\n\npublic class SecurityScheme31Deserializer extends SecuritySchemeDeserializer {\n\n    public SecurityScheme31Deserializer() {\n        openapi31 = true;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/SecuritySchemeDeserializer.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.core.JsonParseException;\nimport com.fasterxml.jackson.core.JsonParser;\nimport com.fasterxml.jackson.databind.DeserializationContext;\nimport com.fasterxml.jackson.databind.JsonDeserializer;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.oas.models.security.OAuthFlows;\nimport io.swagger.v3.oas.models.security.SecurityScheme;\n\nimport java.io.IOException;\nimport java.util.Arrays;\nimport java.util.Iterator;\nimport java.util.List;\n\npublic class SecuritySchemeDeserializer extends JsonDeserializer<SecurityScheme> {\n\n    protected boolean openapi31;\n\n    @Override\n    public SecurityScheme deserialize(JsonParser jp, DeserializationContext ctxt)\n            throws IOException {\n        ObjectMapper mapper = null;\n        if (openapi31) {\n            mapper = Json31.mapper();\n        } else {\n            mapper = Json.mapper();\n        }\n        SecurityScheme result = null;\n\n        JsonNode node = jp.getCodec().readTree(jp);\n\n        JsonNode inNode = node.get(\"type\");\n\n        if (inNode != null) {\n            String type = inNode.asText();\n            if (Arrays.stream(SecurityScheme.Type.values()).noneMatch(t -> t.toString().equals(type))) {\n                // wrong type, throw exception\n                throw new JsonParseException(jp, String.format(\"SecurityScheme type %s not allowed\", type));\n            }\n            result = new SecurityScheme()\n                    .description(getFieldText(\"description\", node));\n\n            if (\"http\".equals(type)) {\n                result\n                        .type(SecurityScheme.Type.HTTP)\n                        .scheme(getFieldText(\"scheme\", node))\n                        .bearerFormat(getFieldText(\"bearerFormat\", node));\n            } else if (\"apiKey\".equals(type)) {\n                result\n                        .type(SecurityScheme.Type.APIKEY)\n                        .name(getFieldText(\"name\", node))\n                        .in(getIn(getFieldText(\"in\", node)));\n            } else if (\"openIdConnect\".equals(type)) {\n                result\n                        .type(SecurityScheme.Type.OPENIDCONNECT)\n                        .openIdConnectUrl(getFieldText(\"openIdConnectUrl\", node));\n            } else if (\"oauth2\".equals(type)) {\n                result\n                        .type(SecurityScheme.Type.OAUTH2)\n                        .flows(mapper.convertValue(node.get(\"flows\"), OAuthFlows.class));\n            } else if (\"mutualTLS\".equals(type)) {\n                result\n                        .type(SecurityScheme.Type.MUTUALTLS);\n            }\n            final Iterator<String> fieldNames = node.fieldNames();\n            while(fieldNames.hasNext()) {\n                final String fieldName = fieldNames.next();\n                if(fieldName.startsWith(\"x-\")) {\n                    final JsonNode fieldValue = node.get(fieldName);\n                    final Object value = Json.mapper().treeToValue(fieldValue, Object.class);\n                    result.addExtension(fieldName, value);\n                }\n            }\n        }\n\n        return result;\n    }\n\n    private SecurityScheme.In getIn(String value) {\n        return Arrays.stream(SecurityScheme.In.values()).filter(i -> i.toString().equals(value)).findFirst().orElse(null);\n    }\n\n    private String getFieldText(String fieldName, JsonNode node) {\n        JsonNode inNode = node.get(fieldName);\n        if (inNode != null) {\n            return inNode.asText();\n        }\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/SiblingAnnotationFilter.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.databind.JavaType;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.lang.annotation.Annotation;\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class SiblingAnnotationFilter {\n\n    public static class FilterResult {\n        private final Annotation[] filteredAnnotations;\n        private final Schema.SchemaResolution resolvedSchemaResolution;\n\n        public FilterResult(Annotation[] filteredAnnotations, Schema.SchemaResolution resolvedSchemaResolution) {\n            this.filteredAnnotations = filteredAnnotations;\n            this.resolvedSchemaResolution = resolvedSchemaResolution;\n        }\n\n        public Annotation[] getFilteredAnnotations() {\n            return filteredAnnotations;\n        }\n\n        public Schema.SchemaResolution getResolvedSchemaResolution() {\n            return resolvedSchemaResolution;\n        }\n    }\n\n    /**\n     * Filter out Schema/ArraySchema annotations to prevent duplicate processing:\n     * 1. They are already processed and merged by AnnotationsUtils.mergeSchemaAnnotations()\n     * 2. Re-processing would cause annotation metadata to leak incorrectly between levels\n     * 3. Without preserving ArraySchema, Stream is treated as generic object instead of iterable collection.\n     *      * The ArraySchema is needed for the Stream to be recognized as an array, but it doesn't leak to items\n     *      * because the container path filters it out.\n     *\n     * @param annotations the annotations to filter\n     * @param propType the property type\n     * @param ctxSchema the schema annotation\n     * @param ctxArraySchema the array schema annotation\n     * @param schemaResolution the schema resolution configuration\n     * @param openapi31 whether OpenAPI 3.1 is enabled\n     * @return FilterResult containing the filtered annotations and resolved schema resolution\n     */\n    public static FilterResult filterSiblingAnnotations(\n            Annotation[] annotations,\n            JavaType propType,\n            io.swagger.v3.oas.annotations.media.Schema ctxSchema,\n            io.swagger.v3.oas.annotations.media.ArraySchema ctxArraySchema,\n            Schema.SchemaResolution schemaResolution,\n            boolean openapi31) {\n        \n        Annotation[] ctxFilteredSiblingAnnotations = null;\n        \n        Schema.SchemaResolution resolvedSchemaResolution = AnnotationsUtils.resolveSchemaResolution(schemaResolution, ctxSchema);\n\n        if (AnnotationsUtils.areSiblingsAllowed(resolvedSchemaResolution, openapi31)) {\n            List<Annotation> filteredAnnotationsList = new ArrayList<>();\n            \n            if (annotations != null) {\n                boolean isStreamWithArraySchema = isStreamType(propType) && ctxArraySchema != null;\n\n                for (Annotation a : annotations) {\n                    boolean isSchemaAnnotation = a instanceof io.swagger.v3.oas.annotations.media.Schema;\n                    boolean isArraySchemaAnnotation = a instanceof io.swagger.v3.oas.annotations.media.ArraySchema;\n                    boolean shouldIncludeAnnotation = (!isSchemaAnnotation && !isArraySchemaAnnotation) || isStreamWithArraySchema;\n                    \n                    if (shouldIncludeAnnotation) {\n                        filteredAnnotationsList.add(a);\n                    }\n                }\n                \n                ctxFilteredSiblingAnnotations = filteredAnnotationsList.toArray(new Annotation[filteredAnnotationsList.size()]);\n            }\n        }\n        \n        return new FilterResult(ctxFilteredSiblingAnnotations, resolvedSchemaResolution);\n    }\n\n    private static boolean isStreamType(JavaType type) {\n        return type != null && \n               type.getRawClass() != null && \n               java.util.stream.Stream.class.isAssignableFrom(type.getRawClass());\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/ValidationAnnotationsUtils.java",
    "content": "package io.swagger.v3.core.util;\n\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport javax.validation.constraints.*;\nimport java.math.BigDecimal;\n\nimport static io.swagger.v3.core.util.SchemaTypeUtils.*;\n\npublic class ValidationAnnotationsUtils {\n\n    public static final String JAVAX_NOT_NULL = \"javax.validation.constraints.NotNull\";\n    public static final String JAVAX_NOT_EMPTY = \"javax.validation.constraints.NotEmpty\";\n    public static final String JAVAX_NOT_BLANK = \"javax.validation.constraints.NotBlank\";\n    public static final String JAVAX_MIN = \"javax.validation.constraints.Min\";\n    public static final String JAVAX_MAX = \"javax.validation.constraints.Max\";\n    public static final String JAVAX_SIZE = \"javax.validation.constraints.Size\";\n    public static final String JAVAX_DECIMAL_MIN = \"javax.validation.constraints.DecimalMin\";\n    public static final String JAVAX_DECIMAL_MAX = \"javax.validation.constraints.DecimalMax\";\n    public static final String JAVAX_PATTERN = \"javax.validation.constraints.Pattern\";\n    public static final String JAVAX_EMAIL = \"javax.validation.constraints.Email\";\n\n    private static final String SCHEMA_EMAIL_FORMAT_NAME = \"email\";\n\n    /**\n     * @param schema         the schema\n     * @param ctxSchema      the schema's {@link io.swagger.v3.oas.annotations.media.Schema} annotation\n     * @param ctxArraySchema the schema's {@link io.swagger.v3.oas.annotations.media.ArraySchema} annotation\n     * @return whether the schema has been modified or not\n     */\n    public static boolean applyNotEmptyConstraint(Schema schema,\n                                                  io.swagger.v3.oas.annotations.media.Schema ctxSchema,\n                                                  io.swagger.v3.oas.annotations.media.ArraySchema ctxArraySchema) {\n        if (isArraySchema(schema)) {\n            if (ctxArraySchema == null || ctxArraySchema.minItems() == Integer.MAX_VALUE) {\n                schema.setMinItems(1);\n                return true;\n            }\n        } else if (isStringSchema(schema)) {\n            if (ctxSchema == null || ctxSchema.minLength() == 0) {\n                schema.setMinLength(1);\n                return true;\n            }\n        } else if (isObjectSchema(schema)) {\n            if (ctxSchema == null || ctxSchema.minProperties() == 0) {\n                schema.setMinProperties(1);\n                return true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * @param schema    the schema\n     * @param ctxSchema the schema's {@link io.swagger.v3.oas.annotations.media.Schema} annotation\n     * @return whether the schema has been modified or not\n     */\n    public static boolean applyNotBlankConstraint(Schema schema, io.swagger.v3.oas.annotations.media.Schema ctxSchema) {\n        if (isStringSchema(schema)) {\n            if (ctxSchema == null || ctxSchema.minLength() == 0) {\n                schema.setMinLength(1);\n                return true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * @param schema     the schema\n     * @param annotation the schema's {@link Min} annotation\n     * @return whether the schema has been modified or not\n     */\n    public static boolean applyMinConstraint(Schema schema, Min annotation) {\n        if (isNumberSchema(schema)) {\n            schema.setMinimum(new BigDecimal(annotation.value()));\n            return true;\n        }\n        return false;\n    }\n\n    /**\n     * @param schema     the schema\n     * @param annotation the schema's {@link Max} annotation\n     * @return whether the schema has been modified or not\n     */\n    public static boolean applyMaxConstraint(Schema schema, Max annotation) {\n        if (isNumberSchema(schema)) {\n            schema.setMaximum(new BigDecimal(annotation.value()));\n            return true;\n        }\n        return false;\n    }\n\n    /**\n     * @param schema     the schema\n     * @param annotation the schema's {@link Size} annotation\n     * @return whether the schema has been modified or not\n     */\n    public static boolean applySizeConstraint(Schema schema, Size annotation) {\n        if (isNumberSchema(schema)) {\n            schema.setMinimum(new BigDecimal(annotation.min()));\n            schema.setMaximum(new BigDecimal(annotation.max()));\n            return true;\n        }\n        if (isStringSchema(schema)) {\n            schema.setMinLength(annotation.min());\n            schema.setMaxLength(annotation.max());\n            return true;\n        }\n        if (isArraySchema(schema)) {\n            schema.setMinItems(annotation.min());\n            schema.setMaxItems(annotation.max());\n            return true;\n        }\n        return false;\n    }\n\n    /**\n     * @param schema     the schema\n     * @param annotation the schema's {@link DecimalMin} annotation\n     * @return whether the schema has been modified or not\n     */\n    public static boolean applyDecimalMinConstraint(Schema schema, DecimalMin annotation) {\n        if (isNumberSchema(schema)) {\n            schema.setMinimum(new BigDecimal(annotation.value()));\n            schema.setExclusiveMinimum(!annotation.inclusive());\n            return true;\n        }\n        return false;\n    }\n\n    /**\n     * @param schema     the schema\n     * @param annotation the schema's {@link DecimalMax} annotation\n     * @return whether the schema has been modified or not\n     */\n    public static boolean applyDecimalMaxConstraint(Schema schema, DecimalMax annotation) {\n        if (isNumberSchema(schema)) {\n            schema.setMaximum(new BigDecimal(annotation.value()));\n            schema.setExclusiveMaximum(!annotation.inclusive());\n            return true;\n        }\n        return false;\n    }\n\n    /**\n     * @param schema     the schema\n     * @param annotation the schema's {@link Pattern} annotation\n     * @return whether the schema has been modified or not\n     */\n    public static boolean applyPatternConstraint(Schema schema, Pattern annotation) {\n        if (isStringSchema(schema)) {\n            schema.setPattern(annotation.regexp());\n            return true;\n        }\n        if (schema.getItems() != null && isStringSchema(schema.getItems())) {\n            schema.getItems().setPattern(annotation.regexp());\n            return true;\n        }\n        return false;\n    }\n\n    /**\n     * @param schema     the schema\n     * @param annotation the schema's {@link Email} annotation\n     * @return whether the schema has been modified or not\n     */\n    public static boolean applyEmailConstraint(Schema schema, Email annotation) {\n        if (isStringSchema(schema)) {\n            schema.setFormat(SCHEMA_EMAIL_FORMAT_NAME);\n            return true;\n        }\n        if (schema.getItems() != null && isStringSchema(schema.getItems())) {\n            schema.getItems().setFormat(SCHEMA_EMAIL_FORMAT_NAME);\n            return true;\n        }\n        return false;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/ValidatorProcessor.java",
    "content": "package io.swagger.v3.core.util;\n\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.lang.annotation.Annotation;\nimport java.util.Map;\nimport java.util.Set;\n\npublic interface ValidatorProcessor {\n    enum MODE {\n        BEFORE,\n        REPLACE,\n        AFTER\n    }\n\n    public default MODE getMode() {\n        return MODE.REPLACE;\n    }\n    public default boolean applyBeanValidatorAnnotations(Schema property, Annotation[] annotations, Schema parent, boolean applyNotNullAnnotations) {\n        return false;\n    }\n\n    public default Set<Class> resolveInvocationGroups(Map<String, Annotation> annos) {\n        return null;\n    }\n\n    public default Set<Annotation> resolveInvocationAnnotations(Annotation[] annotations) {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/Yaml.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.core.util.DefaultPrettyPrinter;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.ObjectWriter;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class Yaml {\n\n    private static final class ObjectMapperHolder {\n        private static final ObjectMapper MAPPER = ObjectMapperFactory.createYaml();\n    }\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(Yaml.class);\n\n    public static ObjectMapper mapper() {\n        return ObjectMapperHolder.MAPPER;\n    }\n\n    public static ObjectWriter pretty() {\n        return mapper().writer(new DefaultPrettyPrinter());\n    }\n\n    public static String pretty(Object o) {\n        try {\n            return pretty().writeValueAsString(o);\n        } catch (Exception e) {\n            PrettyPrintHelper.emitError(LOGGER, \"Error serializing object to YAML\", e);\n            return null;\n        }\n    }\n\n    public static void prettyPrint(Object o) {\n        try {\n            String prettyString = pretty().writeValueAsString(o);\n            PrettyPrintHelper.emit(LOGGER, prettyString);\n        } catch (Exception e) {\n            PrettyPrintHelper.emitError(LOGGER, \"Error pretty-printing YAML\", e);\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/main/java/io/swagger/v3/core/util/Yaml31.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.core.JsonProcessingException;\nimport com.fasterxml.jackson.core.util.DefaultPrettyPrinter;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.ObjectWriter;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.util.Map;\n\npublic class Yaml31 {\n\n    private static final class ObjectMapperHolder {\n        private static final ObjectMapper MAPPER = ObjectMapperFactory.createYaml31();\n    }\n\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(Yaml31.class);\n\n    public static ObjectMapper mapper() {\n        return ObjectMapperHolder.MAPPER;\n    }\n\n    public static ObjectWriter pretty() {\n        return mapper().writer(new DefaultPrettyPrinter());\n    }\n\n    public static String pretty(Object o) {\n        try {\n            return pretty().writeValueAsString(o);\n        } catch (Exception e) {\n            PrettyPrintHelper.emitError(LOGGER, \"Error serializing object to YAML (3.1)\", e);\n            return null;\n        }\n    }\n\n    public static void prettyPrint(Object o) {\n        try {\n            String prettyString = pretty().writeValueAsString(o);\n            PrettyPrintHelper.emit(LOGGER, prettyString);\n        } catch (Exception e) {\n            PrettyPrintHelper.emitError(LOGGER, \"Error pretty-printing YAML (3.1)\", e);\n        }\n    }\n\n    public static Map<String, Object> jsonSchemaAsMap(String jsonSchema) {\n        try {\n            return mapper().readValue(jsonSchema, Map.class);\n        } catch (JsonProcessingException e) {\n            LOGGER.error(\"Exception converting jsonSchema to Map\", e);\n            return null;\n        }\n    }\n\n    public static Map<String, Object> jsonSchemaAsMap(Schema schema) {\n        try {\n            return mapper().readValue(mapper().writeValueAsString(schema), Map.class);\n        } catch (JsonProcessingException e) {\n            LOGGER.error(\"Exception converting jsonSchema to Map\", e);\n            return null;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/AnnotatedTypeCachingTest.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.core.converter.ModelConverterContext;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.lang.reflect.Field;\nimport java.util.Iterator;\nimport java.util.Set;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\n\npublic class AnnotatedTypeCachingTest {\n\n    @Test\n    public void testAnnotatedTypeEqualityIgnoresContextualFields() {\n        AnnotatedType type1 = new AnnotatedType(String.class)\n                .propertyName(\"userStatus\");\n        AnnotatedType type2 = new AnnotatedType(String.class)\n                .propertyName(\"city\");\n        assertEquals(type1, type2, \"AnnotatedType objects with different contextual fields (e.g., propertyName) should be equal.\");\n        assertEquals(type1.hashCode(), type2.hashCode(), \"The hash codes of equal AnnotatedType objects must be the same.\");\n    }\n\n    static class User {\n        public String username;\n        public String email;\n        public Address address;\n    }\n\n    static class Address {\n        public String street;\n        public String city;\n    }\n\n    private static class DummyModelConverter implements ModelConverter {\n        @Override\n        public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator<ModelConverter> chain) {\n            if (type.getType().equals(User.class)) {\n                context.resolve(new AnnotatedType(String.class).propertyName(\"username\"));\n                context.resolve(new AnnotatedType(String.class).propertyName(\"email\"));\n                context.resolve(new AnnotatedType(Address.class).propertyName(\"address\"));\n                return new Schema();\n            }\n            if (type.getType().equals(Address.class)) {\n                context.resolve(new AnnotatedType(String.class).propertyName(\"street\"));\n                context.resolve(new AnnotatedType(String.class).propertyName(\"city\"));\n                return new Schema();\n            }\n            return new Schema();\n        }\n    }\n\n    @Test\n    @SuppressWarnings(\"unchecked\")\n    public void testCacheHitsForRepeatedStringTypeWithCorrectedEquals() throws Exception {\n        ModelConverterContextImpl context = new ModelConverterContextImpl(new DummyModelConverter());\n        Schema userSchema = context.resolve(new AnnotatedType(User.class));\n        assertNotNull(userSchema);\n        Field processedTypesField = ModelConverterContextImpl.class.getDeclaredField(\"processedTypes\");\n        processedTypesField.setAccessible(true);\n        Set<AnnotatedType> processedTypes = (Set<AnnotatedType>) processedTypesField.get(context);\n        long stringTypeCount = processedTypes.stream()\n                .filter(annotatedType -> annotatedType.getType().equals(String.class))\n                .count();\n        assertEquals(stringTypeCount, 1, \"With the correct equals/hashCode, String type should be added to the cache only once.\");\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/AnnotatedTypeTest.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport org.testng.annotations.Test;\n\nimport java.lang.annotation.Annotation;\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\nimport java.lang.reflect.Type;\nimport java.util.HashSet;\nimport java.util.Set;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotEquals;\nimport static org.testng.Assert.assertTrue;\n\npublic class AnnotatedTypeTest {\n\n    @Retention(RetentionPolicy.RUNTIME)\n    @Target(ElementType.TYPE)\n    @interface TestAnnA {}\n\n    @Retention(RetentionPolicy.RUNTIME)\n    @Target(ElementType.TYPE)\n    @interface TestAnnB {}\n\n    @TestAnnA\n    @TestAnnB\n    @Deprecated\n    private static class AnnotationHolder {}\n\n    private Annotation getAnnotationInstance(Class<? extends Annotation> clazz) {\n        return AnnotationHolder.class.getAnnotation(clazz);\n    }\n\n    /**\n     * Tests that equals() and hashCode() are order-insensitive for context annotations.\n     */\n    @Test\n    public void testEqualsAndHashCode_shouldBeOrderInsensitiveForAnnotations() {\n        Annotation annA = getAnnotationInstance(TestAnnA.class);\n        Annotation annB = getAnnotationInstance(TestAnnB.class);\n        AnnotatedType type1 = new AnnotatedType(String.class).ctxAnnotations(new Annotation[]{annA, annB});\n        AnnotatedType type2 = new AnnotatedType(String.class).ctxAnnotations(new Annotation[]{annB, annA});\n        assertEquals(type1, type2, \"Objects should be equal even if annotation order is different.\");\n        assertEquals(type1.hashCode(), type2.hashCode(), \"Hash codes should be equal even if annotation order is different.\");\n    }\n\n    /**\n     * Tests that JDK/internal annotations are filtered out for equals() and hashCode() comparison.\n     */\n    @Test\n    public void testEqualsAndHashCode_shouldIgnoreJdkInternalAnnotations() {\n        Annotation annA = getAnnotationInstance(TestAnnA.class);\n        Annotation deprecated = getAnnotationInstance(Deprecated.class);\n        AnnotatedType typeWithUserAnn = new AnnotatedType(String.class).ctxAnnotations(new Annotation[]{annA});\n        AnnotatedType typeWithJdkAnn = new AnnotatedType(String.class).ctxAnnotations(new Annotation[]{annA, deprecated});\n        AnnotatedType typeWithOnlyJdkAnn = new AnnotatedType(String.class).ctxAnnotations(new Annotation[]{deprecated});\n        AnnotatedType typeWithNoAnn = new AnnotatedType(String.class);\n        assertEquals(typeWithUserAnn, typeWithJdkAnn, \"JDK annotations should be ignored in equality comparison.\");\n        assertEquals(typeWithUserAnn.hashCode(), typeWithJdkAnn.hashCode(), \"JDK annotations should be ignored in hashCode calculation.\");\n        assertEquals(typeWithOnlyJdkAnn, typeWithNoAnn, \"An object with only JDK annotations should be equal to one with no annotations.\");\n        assertEquals(typeWithOnlyJdkAnn.hashCode(), typeWithNoAnn.hashCode(), \"The hash code of an object with only JDK annotations should be the same as one with no annotations.\");\n    }\n\n    /**\n     * Tests that defensive copying prevents Set corruption from external array mutation.\n     */\n    @Test\n    public void testImmutability_shouldPreventCorruptionInHashSet() {\n        Annotation annA = getAnnotationInstance(TestAnnA.class);\n        Annotation annB = getAnnotationInstance(TestAnnB.class);\n        Annotation[] originalAnnotations = new Annotation[]{annA};\n        AnnotatedType type = new AnnotatedType(String.class).ctxAnnotations(originalAnnotations);\n        Set<AnnotatedType> typeSet = new HashSet<>();\n        typeSet.add(type);\n        int initialHashCode = type.hashCode();\n        originalAnnotations[0] = annB;\n        assertEquals(initialHashCode, type.hashCode(), \"Hash code must remain the same after mutating the external array.\");\n        assertTrue(typeSet.contains(type), \"The Set must still contain the object after mutating the external array.\");\n    }\n\n    /**\n     * Tests that an instance of a subclass can be equal to an instance of the parent class.\n     */\n    @Test\n    public void testEqualsAndHashCode_shouldAllowSubclassEquality() {\n        class SubAnnotatedType extends AnnotatedType {\n            public SubAnnotatedType(Type type) { super(type); }\n        }\n        Annotation annA = getAnnotationInstance(TestAnnA.class);\n        Annotation[] annotations = {annA};\n        AnnotatedType parent = new AnnotatedType(Integer.class).ctxAnnotations(annotations).name(\"number\");\n        SubAnnotatedType child = new SubAnnotatedType(Integer.class);\n        child.ctxAnnotations(annotations);\n        child.name(\"number\");\n        AnnotatedType differentParent = new AnnotatedType(Long.class).name(\"number\");\n        assertEquals(parent, child, \"Parent and child objects should be equal if their properties are the same.\");\n        assertEquals(child, parent, \"Equality comparison should be symmetric.\");\n        assertEquals(parent.hashCode(), child.hashCode(), \"Parent and child hash codes should be equal if their properties are the same.\");\n        assertNotEquals(parent, differentParent, \"Objects with different properties should not be equal.\");\n    }\n\n    @Test\n    public void testEquals_shouldDifferentiatePropertyAndSubtypeContexts() {\n        AnnotatedType typeAsProperty = new AnnotatedType(String.class)\n                .schemaProperty(false)\n                .propertyName(\"fieldA\");\n\n        AnnotatedType typeAsSubtype = new AnnotatedType(String.class)\n                .schemaProperty(true)\n                .propertyName(null);\n\n        assertNotEquals(typeAsProperty, typeAsSubtype,\n                \"Objects with different schemaProperty flags must not be equal.\");\n        assertNotEquals(typeAsProperty.hashCode(), typeAsSubtype.hashCode(),\n                \"Hash codes must be different if schemaProperty flags differ.\");\n    }\n\n    @Test\n    public void testEquals_shouldComparePropertyNameWhenSchemaPropertyIsTrue() {\n        AnnotatedType complexPropA = new AnnotatedType(String.class)\n                .schemaProperty(true)\n                .propertyName(\"fieldA\");\n        AnnotatedType complexPropB = new AnnotatedType(String.class)\n                .schemaProperty(true)\n                .propertyName(\"fieldB\");\n\n        assertNotEquals(complexPropA, complexPropB,\n                \"When schemaProperty is true, objects with different propertyNames must not be equal.\");\n        assertNotEquals(complexPropA.hashCode(), complexPropB.hashCode(),\n                \"When schemaProperty is true, hash codes must be different if propertyNames differ.\");\n    }\n\n    @Test\n    public void testEquals_shouldBeEqualWhenSchemaPropertyIsTrueAndNamesMatch() {\n        AnnotatedType complexPropA = new AnnotatedType(String.class)\n                .schemaProperty(true)\n                .propertyName(\"fieldA\");\n        AnnotatedType complexPropC = new AnnotatedType(String.class)\n                .schemaProperty(true)\n                .propertyName(\"fieldA\");\n\n        assertEquals(complexPropA, complexPropC,\n                \"When schemaProperty is true, objects with the same propertyName must be equal.\");\n        assertEquals(complexPropA.hashCode(), complexPropC.hashCode(),\n                \"When schemaProperty is true, hash codes must be equal if propertyNames are the same.\");\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/ArrayOfSubclassTest.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.converter.ResolvedSchema;\nimport io.swagger.v3.core.oas.models.ModelWithArrayOfSubclasses;\nimport io.swagger.v3.core.util.Json31;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport org.testng.annotations.Test;\n\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.JsonNode;\n\n\npublic class ArrayOfSubclassTest {\n\n    @Test\n    public void extractSubclassArray_oas31() throws Exception {\n        ResolvedSchema schema = ModelConverters.getInstance(true).readAllAsResolvedSchema(ModelWithArrayOfSubclasses.Holder.class);\n        assertNotNull(schema);\n        String expectedJson = new String(Files.readAllBytes(Paths.get(\"src/test/resources/converting/ArrayOfSubclassTest_expected31.json\")));\n        String actualJson = Json31.pretty(schema);\n        ObjectMapper mapper = new ObjectMapper();\n        JsonNode expectedNode = mapper.readTree(expectedJson);\n        JsonNode actualNode = mapper.readTree(actualJson);\n        assertEquals(actualNode, expectedNode);\n    }\n\n    @Test\n    public void extractSubclassArray_oas30() throws Exception {\n        ResolvedSchema schema = ModelConverters.getInstance(false).readAllAsResolvedSchema(ModelWithArrayOfSubclasses.Holder.class);\n        assertNotNull(schema);\n        String expectedJson = new String(Files.readAllBytes(Paths.get(\"src/test/resources/converting/ArrayOfSubclassTest_expected30.json\")));\n        String actualJson = Json31.pretty(schema);\n        ObjectMapper mapper = new ObjectMapper();\n        JsonNode expectedNode = mapper.readTree(expectedJson);\n        JsonNode actualNode = mapper.readTree(actualJson);\n        assertEquals(actualNode, expectedNode);\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/ByteConverterTest.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.BinarySchema;\nimport io.swagger.v3.oas.models.media.ByteArraySchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\n\npublic class ByteConverterTest {\n    private static final String NEWLINE = System.getProperty(\"line.separator\");\n\n    @Test\n    public void testByte() {\n        final Map<String, Schema> models = ModelConverters.getInstance().read(ByteConverterModel.class);\n        final String json = \"{\" +\n                \"   \\\"ByteConverterModel\\\":{\" +\n                \"      \\\"type\\\":\\\"object\\\",\" +\n                \"      \\\"properties\\\":{\" +\n                \"         \\\"myBytes\\\":{\" +\n                \"            \\\"type\\\":\\\"array\\\",\" +\n                \"            \\\"items\\\":{\" +\n                \"               \\\"type\\\":\\\"string\\\",\" +\n                \"               \\\"format\\\":\\\"byte\\\"\" +\n                \"            }\" +\n                \"         }\" +\n                \"      }\" +\n                \"   }\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(models, json);\n    }\n\n    @Test\n    public void testByteProperty() {\n        Schema model = new Schema()\n                .addProperties(\"byteProperty\", new ByteArraySchema());\n\n        assertEquals(Json.pretty(model), \"{\" + NEWLINE +\n                \"  \\\"properties\\\" : {\" + NEWLINE +\n                \"    \\\"byteProperty\\\" : {\" + NEWLINE +\n                \"      \\\"type\\\" : \\\"string\\\",\" + NEWLINE +\n                \"      \\\"format\\\" : \\\"byte\\\"\" + NEWLINE +\n                \"    }\" + NEWLINE +\n                \"  }\" + NEWLINE +\n                \"}\");\n    }\n\n    @Test\n    public void testDeserializeByteProperty() throws Exception {\n        String json =\n                \"{\\n\" +\n                        \"  \\\"properties\\\" : {\\n\" +\n                        \"    \\\"byteProperty\\\" : {\\n\" +\n                        \"      \\\"type\\\" : \\\"string\\\",\\n\" +\n                        \"      \\\"format\\\" : \\\"byte\\\"\\n\" +\n                        \"    }\\n\" +\n                        \"  }\\n\" +\n                        \"}\";\n\n        Schema model = Json.mapper().readValue(json, Schema.class);\n        assertNotNull(model);\n    }\n\n    @Test\n    public void testByteArray() {\n        Schema model = new Schema()\n                .addProperties(\"byteArray\", new ArraySchema().items(new BinarySchema()));\n\n        assertEquals(Json.pretty(model), \"{\" + NEWLINE +\n                \"  \\\"properties\\\" : {\" + NEWLINE +\n                \"    \\\"byteArray\\\" : {\" + NEWLINE +\n                \"      \\\"type\\\" : \\\"array\\\",\" + NEWLINE +\n                \"      \\\"items\\\" : {\" + NEWLINE +\n                \"        \\\"type\\\" : \\\"string\\\",\" + NEWLINE +\n                \"        \\\"format\\\" : \\\"binary\\\"\" + NEWLINE +\n                \"      }\" + NEWLINE +\n                \"    }\" + NEWLINE +\n                \"  }\" + NEWLINE +\n                \"}\");\n    }\n\n    @Test\n    public void testReadOnlyByteArray() {\n        Schema model = new Schema()\n                .addProperties(\"byteArray\",\n                        new ArraySchema().items(new BinarySchema()).readOnly(true));\n\n        assertEquals(Json.pretty(model), \"{\" + NEWLINE +\n                \"  \\\"properties\\\" : {\" + NEWLINE +\n                \"    \\\"byteArray\\\" : {\" + NEWLINE +\n                \"      \\\"type\\\" : \\\"array\\\",\" + NEWLINE +\n                \"      \\\"readOnly\\\" : true,\" + NEWLINE +\n                \"      \\\"items\\\" : {\" + NEWLINE +\n                \"        \\\"type\\\" : \\\"string\\\",\" + NEWLINE +\n                \"        \\\"format\\\" : \\\"binary\\\"\" + NEWLINE +\n                \"      }\" + NEWLINE +\n                \"    }\" + NEWLINE +\n                \"  }\" + NEWLINE +\n                \"}\");\n    }\n\n    class ByteConverterModel {\n        public Byte[] myBytes = new Byte[0];\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/CompositionTest.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.oas.models.composition.AbstractBaseModelWithoutFields;\nimport io.swagger.v3.core.oas.models.composition.Animal;\nimport io.swagger.v3.core.oas.models.composition.AnimalClass;\nimport io.swagger.v3.core.oas.models.composition.AnimalWithSchemaSubtypes;\nimport io.swagger.v3.core.oas.models.composition.Human;\nimport io.swagger.v3.core.oas.models.composition.ModelWithFieldWithSubTypes;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.ResourceUtils;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\nimport java.util.Map;\n\npublic class CompositionTest {\n\n    @Test(description = \"read a model with required params and description\")\n    public void readModelWithRequiredParams() throws IOException {\n        compareAsJson(Human.class, \"Human.json\");\n    }\n\n    @Test(description = \"read a model with composition\")\n    public void readModelWithComposition() throws IOException {\n        compareAsJson(Animal.class, \"Animal.json\");\n    }\n\n    @Test(description = \"read a model with composition\")\n    public void readModeWithSchemalWithComposition() throws IOException {\n        compareAsJson(AnimalWithSchemaSubtypes.class, \"AnimalWithSchemaSubtypes.json\");\n    }\n\n    @Test(description = \"read a model with composition\")\n    public void readClassModelWithComposition() throws IOException {\n        compareAsJson(AnimalClass.class, \"AnimalClass.json\");\n    }\n\n    @Test(description = \"create a model\")\n    public void createModel() throws IOException {\n        compareAsJson(AbstractBaseModelWithoutFields.class, \"AbstractBaseModelWithoutFields.json\");\n    }\n\n    @Test(description = \"create a ModelWithFieldWithSubTypes\")\n    public void createModelWithFieldWithSubTypes() throws IOException {\n        compareAsJson(ModelWithFieldWithSubTypes.class, \"ModelWithFieldWithSubTypes.json\");\n    }\n\n    private void compareAsJson(Class<?> cls, String fileName) throws IOException {\n        final Map<String, Schema> schemas = ModelConverters.getInstance().readAll(cls);\n        Json.prettyPrint(schemas);\n        final String json = ResourceUtils.loadClassResource(getClass(), fileName);\n        SerializationMatchers.assertEqualsToJson(schemas, json);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/CovariantGetterTest.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.oas.models.JCovariantGetter;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class CovariantGetterTest {\n    @Test(description = \"it should read a getter with covariant return type\")\n    public void testCovariantGetter() {\n        final Map<String, Schema> models = ModelConverters.getInstance().read(JCovariantGetter.Sub.class);\n        assertEquals(models.size(), 1);\n        final String json = \"{\" +\n                \"   \\\"Sub\\\":{\" +\n                \"      \\\"type\\\":\\\"object\\\",\" +\n                \"      \\\"properties\\\":{\" +\n                \"         \\\"myProperty\\\":{\" +\n                \"            \\\"type\\\":\\\"integer\\\",\" +\n                \"            \\\"format\\\":\\\"int32\\\"\" +\n                \"         },\" +\n                \"         \\\"myOtherProperty\\\":{\" +\n                \"            \\\"type\\\":\\\"integer\\\",\" +\n                \"            \\\"format\\\":\\\"int32\\\"\" +\n                \"         }\" +\n                \"      }\" +\n                \"   }\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(models, json);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/EnumPropertyTest.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.jackson.TypeNameResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.oas.models.Model1979;\nimport io.swagger.v3.core.oas.models.ModelWithEnumField;\nimport io.swagger.v3.core.oas.models.ModelWithEnumProperty;\nimport io.swagger.v3.core.oas.models.ModelWithEnumRefProperty;\nimport io.swagger.v3.core.oas.models.ModelWithJacksonEnumField;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.AfterTest;\nimport org.testng.annotations.BeforeMethod;\nimport org.testng.annotations.Test;\n\nimport java.util.Arrays;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertTrue;\n\npublic class EnumPropertyTest {\n\n    private ModelResolver modelResolver;\n    private ModelConverterContextImpl context;\n\n    @BeforeMethod\n    public void setup() {\n        ModelResolver.enumsAsRef = false;\n        modelResolver = new ModelResolver(new ObjectMapper());\n        context = new ModelConverterContextImpl(modelResolver);\n    }\n\n\n    @AfterTest\n    public void afterTest() {\n        ModelResolver.enumsAsRef = false;\n    }\n\n    @Test(description = \"it should read a model with an enum property\")\n    public void testEnumProperty() {\n        final Map<String, Schema> models = ModelConverters.getInstance().read(ModelWithEnumProperty.class);\n        final String json = \"{\" +\n                \"   \\\"ModelWithEnumProperty\\\":{\" +\n                \"      \\\"type\\\":\\\"object\\\",\" +\n                \"      \\\"properties\\\":{\" +\n                \"         \\\"enumValue\\\":{\" +\n                \"            \\\"type\\\":\\\"string\\\",\" +\n                \"            \\\"enum\\\":[\" +\n                \"               \\\"PRIVATE\\\",\" +\n                \"               \\\"PUBLIC\\\",\" +\n                \"               \\\"SYSTEM\\\",\" +\n                \"               \\\"INVITE_ONLY\\\"\" +\n                \"            ]\" +\n                \"         }\" +\n                \"      }\" +\n                \"   }\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(models, json);\n    }\n\n    @Test(description = \"it should extract enum values from fields\")\n    public void testExtractEnumFields() {\n        final Map<String, Schema> models = ModelConverters.getInstance().read(ModelWithEnumField.class);\n        final Schema model = models.get(\"ModelWithEnumField\");\n        final Schema enumProperty = (Schema) model.getProperties().get(\"enumValue\");\n        assertTrue(enumProperty instanceof StringSchema);\n\n        final StringSchema stringProperty = (StringSchema) enumProperty;\n        assertEquals(stringProperty.getEnum(), Arrays.asList(\"PRIVATE\", \"PUBLIC\", \"SYSTEM\", \"INVITE_ONLY\"));\n    }\n\n    @Test(description = \"it should extract enum values from method return types\")\n    public void testExtractEnumReturnType() {\n        final Map<String, Schema> models = ModelConverters.getInstance().read(ModelWithEnumProperty.class);\n        final Schema model = models.get(\"ModelWithEnumProperty\");\n        final Schema enumProperty = (Schema) model.getProperties().get(\"enumValue\");\n        assertTrue(enumProperty instanceof StringSchema);\n\n        final StringSchema stringProperty = (StringSchema) enumProperty;\n        assertEquals(stringProperty.getEnum(), Arrays.asList(\"PRIVATE\", \"PUBLIC\", \"SYSTEM\", \"INVITE_ONLY\"));\n    }\n\n    @Test(description = \"it should read a model with an enum property as a reference\")\n    public void testEnumRefProperty() {\n        Schema schema = context.resolve(new AnnotatedType(ModelWithEnumRefProperty.class));\n        final Map<String, Schema> models = context.getDefinedModels();\n        final String yaml = \"ModelWithEnumRefProperty:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    a:\\n\" +\n                \"      $ref: \\\"#/components/schemas/TestEnum\\\"\\n\" +\n                \"    b:\\n\" +\n                \"      $ref: \\\"#/components/schemas/TestEnum\\\"\\n\" +\n                \"    c:\\n\" +\n                \"      $ref: \\\"#/components/schemas/TestSecondEnum\\\"\\n\" +\n                \"    d:\\n\" +\n                \"      type: string\\n\" +\n                \"      enum:\\n\" +\n                \"      - A_PRIVATE\\n\" +\n                \"      - A_PUBLIC\\n\" +\n                \"      - A_SYSTEM\\n\" +\n                \"      - A_INVITE_ONLY\\n\" +\n                \"TestEnum:\\n\" +\n                \"  type: string\\n\" +\n                \"  enum:\\n\" +\n                \"  - PRIVATE\\n\" +\n                \"  - PUBLIC\\n\" +\n                \"  - SYSTEM\\n\" +\n                \"  - INVITE_ONLY\\n\" +\n                \"TestSecondEnum:\\n\" +\n                \"  type: string\\n\" +\n                \"  enum:\\n\" +\n                \"  - A_PRIVATE\\n\" +\n                \"  - A_PUBLIC\\n\" +\n                \"  - A_SYSTEM\\n\" +\n                \"  - A_INVITE_ONLY\\n\";\n        SerializationMatchers.assertEqualsToYaml(models, yaml);\n\n    }\n\n    @Test(description = \"it should read a model with an enum property as a reference with fqn TypeNameResolver\")\n    public void testEnumRefPropertyWithFQNTypeNameResolver() {\n        TypeNameResolver.std.setUseFqn(true);\n        Schema schema = context.resolve(new AnnotatedType(ModelWithEnumRefProperty.class));\n        final Map<String, Schema> models = context.getDefinedModels();\n        final String yaml = \"io.swagger.v3.core.oas.models.ModelWithEnumRefProperty:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    a:\\n\" +\n                \"      $ref: \\\"#/components/schemas/io.swagger.v3.core.oas.models.TestEnum\\\"\\n\" +\n                \"    b:\\n\" +\n                \"      $ref: \\\"#/components/schemas/io.swagger.v3.core.oas.models.TestEnum\\\"\\n\" +\n                \"    c:\\n\" +\n                \"      $ref: \\\"#/components/schemas/io.swagger.v3.core.oas.models.TestSecondEnum\\\"\\n\" +\n                \"    d:\\n\" +\n                \"      type: string\\n\" +\n                \"      enum:\\n\" +\n                \"      - A_PRIVATE\\n\" +\n                \"      - A_PUBLIC\\n\" +\n                \"      - A_SYSTEM\\n\" +\n                \"      - A_INVITE_ONLY\\n\" +\n                \"io.swagger.v3.core.oas.models.TestEnum:\\n\" +\n                \"  type: string\\n\" +\n                \"  enum:\\n\" +\n                \"  - PRIVATE\\n\" +\n                \"  - PUBLIC\\n\" +\n                \"  - SYSTEM\\n\" +\n                \"  - INVITE_ONLY\\n\" +\n                \"io.swagger.v3.core.oas.models.TestSecondEnum:\\n\" +\n                \"  type: string\\n\" +\n                \"  enum:\\n\" +\n                \"  - A_PRIVATE\\n\" +\n                \"  - A_PUBLIC\\n\" +\n                \"  - A_SYSTEM\\n\" +\n                \"  - A_INVITE_ONLY\\n\";\n        TypeNameResolver.std.setUseFqn(false);\n        SerializationMatchers.assertEqualsToYaml(models, yaml);\n\n    }\n\n    @Test(description = \"it should read a model with an enum property as a reference, set via static var or sys prop\")\n    public void testEnumRefPropertyGlobal() {\n        ModelResolver.enumsAsRef = true;\n        Schema schema = context.resolve(new AnnotatedType(ModelWithEnumProperty.class));\n        final Map<String, Schema> models = context.getDefinedModels();\n        final String yaml = \"ModelWithEnumProperty:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    enumValue:\\n\" +\n                \"      $ref: \\\"#/components/schemas/TestEnum\\\"\\n\" +\n                \"TestEnum:\\n\" +\n                \"  type: string\\n\" +\n                \"  enum:\\n\" +\n                \"  - PRIVATE\\n\" +\n                \"  - PUBLIC\\n\" +\n                \"  - SYSTEM\\n\" +\n                \"  - INVITE_ONLY\\n\";\n        SerializationMatchers.assertEqualsToYaml(models, yaml);\n        ModelResolver.enumsAsRef = false;\n    }\n\n    @Test(description = \"it should not affect non-enum models when the enumsAsRef property is enabled globally\")\n    public void testEnumRefPropertyGlobalNotAffectingNonEnums() {\n        ModelResolver.enumsAsRef = true;\n        Schema schema = context.resolve(new AnnotatedType(Model1979.class));\n        final Map<String, Schema> models = context.getDefinedModels();\n        final String yaml = \"Model1979:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: string\\n\" +\n                \"      nullable: true\";\n        SerializationMatchers.assertEqualsToYaml(models, yaml);\n        ModelResolver.enumsAsRef = false;\n    }\n\n    @Test(description = \"it should extract enum values from fields using JsonProperty and JsonValue\")\n    public void testExtractJacksonEnumFields() {\n        final Map<String, Schema> models = ModelConverters.getInstance().read(ModelWithJacksonEnumField.class);\n        final Schema model = models.get(\"ModelWithJacksonEnumField\");\n\n        final Schema firstEnumProperty = (Schema) model.getProperties().get(\"firstEnumValue\");\n        assertTrue(firstEnumProperty instanceof StringSchema);\n        final StringSchema stringProperty = (StringSchema) firstEnumProperty;\n        assertEquals(stringProperty.getEnum(), Arrays.asList(\"p1\", \"p2\", \"SYSTEM\", \"INVITE_ONLY\"));\n\n        final Schema secondEnumProperty = (Schema) model.getProperties().get(\"secondEnumValue\");\n        assertTrue(secondEnumProperty instanceof StringSchema);\n        final StringSchema secondStringProperty = (StringSchema) secondEnumProperty;\n        assertEquals(secondStringProperty.getEnum(), Arrays.asList(\"one\", \"two\", \"three\"));\n\n        final Schema thirdEnumProperty = (Schema) model.getProperties().get(\"thirdEnumValue\");\n        assertTrue(thirdEnumProperty instanceof IntegerSchema);\n        final IntegerSchema thirdStringProperty = (IntegerSchema) thirdEnumProperty;\n        assertEquals(thirdStringProperty.getEnum(), Arrays.asList(2, 4, 6));\n\n        final Schema fourthEnumProperty = (Schema) model.getProperties().get(\"fourthEnumValue\");\n        assertTrue(fourthEnumProperty instanceof StringSchema);\n        final StringSchema fourthStringProperty = (StringSchema) fourthEnumProperty;\n        assertEquals(fourthStringProperty.getEnum(), Arrays.asList(\"one\", \"two\", \"three\"));\n\n        final Schema fifthEnumProperty = (Schema) model.getProperties().get(\"fifthEnumValue\");\n        assertTrue(fifthEnumProperty instanceof IntegerSchema);\n        final IntegerSchema fifthStringProperty = (IntegerSchema) fifthEnumProperty;\n        assertEquals(fifthStringProperty.getEnum(), Arrays.asList(2, 4, 6));\n\n        final Schema sixthEnumProperty = (Schema) model.getProperties().get(\"sixthEnumValue\");\n        assertTrue(sixthEnumProperty instanceof StringSchema);\n        final StringSchema sixthStringProperty = (StringSchema) sixthEnumProperty;\n        assertEquals(sixthStringProperty.getEnum(), Arrays.asList(\"one\", \"two\", \"three\"));\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/GuavaTest.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.oas.models.GuavaModel;\nimport io.swagger.v3.core.util.ResourceUtils;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\nimport java.util.Map;\n\npublic class GuavaTest {\n\n    @Test(description = \"convert a model with Guava optionals\")\n    public void convertModelWithGuavaOptionals() throws IOException {\n        final Map<String, Schema> schemas = ModelConverters.getInstance().read(GuavaModel.class);\n        final String json = ResourceUtils.loadClassResource(getClass(), \"GuavaTestModel.json\");\n        SerializationMatchers.assertEqualsToJson(schemas, json);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/Issue5055Test.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.converter.ResolvedSchema;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport org.testng.annotations.Test;\n\nimport java.util.List;\n\nimport static org.testng.Assert.*;\n\n/**\n * test documenting the behavior of sibling @Schema and @ArraySchema annotations.\n */\npublic class Issue5055Test {\n\n\n    @Test\n    public void testArrayMetadataDoesNotLeakToItemsRef() throws Exception {\n        ResolvedSchema schema = ModelConverters.getInstance(true).readAllAsResolvedSchema(\n            TestModels.ArrayWithFullMetadata.class\n        );\n        \n        assertNotNull(schema, \"Schema should resolve\");\n        String json = Json31.pretty(schema);\n        assertNotNull(json);\n        ObjectMapper mapper = new ObjectMapper();\n        JsonNode root = mapper.readTree(json);\n        \n        JsonNode itemsProp = root.at(\"/schema/properties/pets\");\n        assertFalse(itemsProp.isMissingNode(), \"pets property should exist\");\n        \n        assertEquals(itemsProp.get(\"type\").asText(), \"array\", \"Should be array type\");\n        assertEquals(itemsProp.get(\"description\").asText(), \"Collection of pets\", \"Array should have description\");\n        assertEquals(itemsProp.get(\"minItems\").asInt(), 1, \"Array should have minItems\");\n        assertEquals(itemsProp.get(\"maxItems\").asInt(), 100, \"Array should have maxItems\");\n        assertTrue(itemsProp.get(\"uniqueItems\").asBoolean(), \"Array should have uniqueItems\");\n        \n        JsonNode items = itemsProp.get(\"items\");\n        assertNotNull(items, \"Items should exist\");\n        assertTrue(items.has(\"$ref\"), \"Items should be a reference\");\n        \n        assertFalse(items.has(\"minItems\"), \"BUG: minItems leaked to items $ref\");\n        assertFalse(items.has(\"maxItems\"), \"BUG: maxItems leaked to items $ref\");\n        assertFalse(items.has(\"uniqueItems\"), \"BUG: uniqueItems leaked to items $ref\");\n        assertFalse(items.has(\"description\") && items.get(\"description\") != null, \n            \"BUG: array description leaked to items $ref\");\n        \n        if (items.has(\"type\")) {\n            assertTrue(items.get(\"type\").isNull() || items.get(\"type\").asText().isEmpty(),\n                \"BUG: type value leaked to items $ref\");\n        }\n    }\n\n    @Test\n    public void testComponentSchemaIsCleanWithoutLeakedProperties() throws Exception {\n        ResolvedSchema schema = ModelConverters.getInstance(true).readAllAsResolvedSchema(\n            TestModels.ArrayWithFullMetadata.class\n        );\n        \n        assertNotNull(schema);\n        assertNotNull(schema.referencedSchemas);\n        \n        io.swagger.v3.oas.models.media.Schema petSchema = schema.referencedSchemas.get(\"Pet\");\n        assertNotNull(petSchema, \"Pet component schema should exist\");\n        \n        assertNull(petSchema.getMinItems(), \"Component schema should not have minItems\");\n        assertNull(petSchema.getMaxItems(), \"Component schema should not have maxItems\");\n        assertNull(petSchema.getUniqueItems(), \"Component schema should not have uniqueItems\");\n        \n        if (petSchema.getDescription() != null) {\n            assertNotEquals(petSchema.getDescription(), \"Collection of pets\",\n                \"Component should not have array's description\");\n        }\n    }\n\n    @Test\n    public void testArraySchemaAttributesSeparation() throws Exception {\n        ResolvedSchema schema = ModelConverters.getInstance(true).readAllAsResolvedSchema(\n            TestModels.BothArraySchemaAttributes.class\n        );\n        \n        assertNotNull(schema);\n        String json = Json31.pretty(schema);\n\n        ObjectMapper mapper = new ObjectMapper();\n        JsonNode root = mapper.readTree(json);\n        \n        JsonNode dataField = root.at(\"/schema/properties/data\");\n        if (!dataField.isMissingNode()) {\n            assertTrue(dataField.has(\"description\"));\n            assertEquals(dataField.get(\"type\").asText(), \"array\");\n            \n            JsonNode items = dataField.get(\"items\");\n            assertNotNull(items);\n            assertTrue(items.has(\"description\") || items.has(\"$ref\"));\n        }\n    }\n\n    @Test\n    public void testTypeInferenceWithNoImplementation() throws Exception {\n        ResolvedSchema schema = ModelConverters.getInstance(true).readAllAsResolvedSchema(\n            TestModels.NoImplementationSpecified.class\n        );\n        \n        assertNotNull(schema);\n        String json = Json31.pretty(schema);\n        \n        System.out.println(\"\\n=== testTypeInferenceWithNoImplementation - Generated Spec ===\");\n        System.out.println(json);\n        System.out.println(\"=== End Spec ===\\n\");\n        \n        ObjectMapper mapper = new ObjectMapper();\n        JsonNode root = mapper.readTree(json);\n        \n        JsonNode dataField = root.at(\"/schema/properties/data\");\n        assertEquals(dataField.get(\"type\").asText(), \"array\");\n            \n        JsonNode items = dataField.get(\"items\");\n        assertNotNull(items);\n        if (items.has(\"type\")) {\n            assertEquals(items.get(\"type\").asText(), \"string\");\n        }\n\n    }\n\n    @Test\n    public void testSchemaEqualsSemanticsForPrecedence() {\n        io.swagger.v3.oas.models.media.Schema unchanged = new io.swagger.v3.oas.models.media.Schema();\n        unchanged.setType(\"array\");\n        \n        io.swagger.v3.oas.models.media.Schema alsoUnchanged = new io.swagger.v3.oas.models.media.Schema();\n        alsoUnchanged.setType(\"array\");\n        \n        assertEquals(unchanged, alsoUnchanged, \"Equal content should be detected\");\n        \n        io.swagger.v3.oas.models.media.Schema changed = new io.swagger.v3.oas.models.media.Schema();\n        changed.setType(\"array\");\n        changed.setDescription(\"added\");\n        \n        assertNotEquals(unchanged, changed, \"Changes should be detected by equals\");\n    }\n\n    @Test\n    public void testSchemaEqualsIncludesExtensions() {\n        io.swagger.v3.oas.models.media.Schema s1 = new io.swagger.v3.oas.models.media.Schema();\n        s1.addExtension(\"x-prop\", \"value\");\n        \n        io.swagger.v3.oas.models.media.Schema s2 = new io.swagger.v3.oas.models.media.Schema();\n        s2.addExtension(\"x-prop\", \"value\");\n        \n        assertEquals(s1, s2, \"Same extensions should be equal\");\n        \n        io.swagger.v3.oas.models.media.Schema s3 = new io.swagger.v3.oas.models.media.Schema();\n        s3.addExtension(\"x-prop\", \"different\");\n        \n        assertNotEquals(s1, s3, \"Different extensions should not be equal\");\n    }\n\n    @Test\n    public void testNoImplementationCase() throws Exception {\n        ResolvedSchema schema = ModelConverters.getInstance(true).readAllAsResolvedSchema(\n            TestModels.NoImplementationSpecified.class\n        );\n        \n        assertNotNull(schema);\n        String json = Json31.pretty(schema);\n        \n        ObjectMapper mapper = new ObjectMapper();\n        JsonNode root = mapper.readTree(json);\n        \n        JsonNode dataField = root.at(\"/schema/properties/data\");\n        assertFalse(dataField.isMissingNode(), \"data property should exist\");\n        assertEquals(dataField.get(\"type\").asText(), \"array\");\n        assertEquals(dataField.get(\"description\").asText(), \"Inferred from type\");\n        \n        JsonNode items = dataField.get(\"items\");\n        assertNotNull(items);\n        assertEquals(items.get(\"type\").asText(), \"string\", \"Items should infer string type\");\n    }\n\n    @Test\n    public void testNoSchemaAtAllCase() throws Exception {\n        ResolvedSchema schema = ModelConverters.getInstance(true).readAllAsResolvedSchema(\n            TestModels.NoSchemaAnnotations.class\n        );\n        \n        assertNotNull(schema);\n        String json = Json31.pretty(schema);\n        \n        ObjectMapper mapper = new ObjectMapper();\n        JsonNode root = mapper.readTree(json);\n        \n        JsonNode dataField = root.at(\"/schema/properties/data\");\n        assertFalse(dataField.isMissingNode(), \"data property should exist\");\n        assertEquals(dataField.get(\"type\").asText(), \"array\");\n        \n        JsonNode items = dataField.get(\"items\");\n        assertNotNull(items);\n        assertEquals(items.get(\"type\").asText(), \"string\", \"Items should infer string type from List<String>\");\n    }\n\n\n    public static class TestModels {\n        \n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Model with full array metadata\")\n        public static class ArrayWithFullMetadata {\n            private List<Pet> pets;\n            \n            @ArraySchema(\n                schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = Pet.class),\n                arraySchema = @io.swagger.v3.oas.annotations.media.Schema(\n                    type = \"array\",\n                    description = \"Collection of pets\"\n                ),\n                minItems = 1,\n                maxItems = 100,\n                uniqueItems = true\n            )\n            public List<Pet> getPets() {\n                return pets;\n            }\n        }\n        \n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Pet model\")\n        public static class Pet {\n            private String name;\n            private String species;\n            \n            public String getName() {\n                return name;\n            }\n            \n            public String getSpecies() {\n                return species;\n            }\n        }\n        \n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Test precedence\")\n        public static class SchemaTakesPrecedence {\n            private List<String> data;\n            \n            @io.swagger.v3.oas.annotations.media.Schema(type = \"array\", description = \"Schema description\")\n            @ArraySchema(minItems = 10)\n            public List<String> getData() {\n                return data;\n            }\n        }\n        \n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Test both attributes\")\n        public static class BothArraySchemaAttributes {\n            private List<String> data;\n            \n            @ArraySchema(\n                schema = @io.swagger.v3.oas.annotations.media.Schema(type = \"string\", description = \"Item description\"),\n                arraySchema = @io.swagger.v3.oas.annotations.media.Schema(type = \"array\", description = \"Array description\")\n            )\n            public List<String> getData() {\n                return data;\n            }\n        }\n        \n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Test no implementation\")\n        public static class NoImplementationSpecified {\n            private List<String> data;\n            \n            @io.swagger.v3.oas.annotations.media.Schema(description = \"Inferred from type\")\n            public List<String> getData() {\n                return data;\n            }\n        }\n        \n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Test no schema annotations\")\n        public static class NoSchemaAnnotations {\n            private List<String> data;\n            \n            public List<String> getData() {\n                return data;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/ModelConverterTest.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.databind.annotation.JsonSerialize;\nimport com.google.common.collect.ImmutableSet;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.oas.models.Cat;\nimport io.swagger.v3.core.oas.models.ClientOptInput;\nimport io.swagger.v3.core.oas.models.Employee;\nimport io.swagger.v3.core.oas.models.EmptyModel;\nimport io.swagger.v3.core.oas.models.JacksonReadonlyModel;\nimport io.swagger.v3.core.oas.models.JodaDateTimeModel;\nimport io.swagger.v3.core.oas.models.Model1155;\nimport io.swagger.v3.core.oas.models.ModelPropertyName;\nimport io.swagger.v3.core.oas.models.ModelWithAltPropertyName;\nimport io.swagger.v3.core.oas.models.ModelWithApiModel;\nimport io.swagger.v3.core.oas.models.ModelWithEnumArray;\nimport io.swagger.v3.core.oas.models.ModelWithFormattedStrings;\nimport io.swagger.v3.core.oas.models.ModelWithNumbers;\nimport io.swagger.v3.core.oas.models.ModelWithOffset;\nimport io.swagger.v3.core.oas.models.ModelWithTuple2;\nimport io.swagger.v3.core.oas.models.Person;\nimport io.swagger.v3.core.oas.models.composition.AbstractModelWithApiModel;\nimport io.swagger.v3.core.oas.models.composition.ModelWithUrlProperty;\nimport io.swagger.v3.core.oas.models.composition.Pet;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.ResourceUtils;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.MapSchema;\nimport io.swagger.v3.oas.models.media.NumberSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Ignore;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\nimport java.lang.reflect.Type;\nimport java.net.URI;\nimport java.net.URL;\nimport java.util.Arrays;\nimport java.util.Date;\nimport java.util.Iterator;\nimport java.util.Map;\nimport java.util.TreeSet;\nimport java.util.UUID;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertFalse;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\nimport static org.testng.Assert.assertTrue;\nimport static org.testng.Assert.fail;\n\npublic class ModelConverterTest {\n\n    private Map<String, Schema> read(Type type) {\n        return ModelConverters.getInstance().read(type);\n    }\n\n    private Map<String, Schema> readAll(Type type) {\n        return ModelConverters.getInstance().readAll(type);\n    }\n\n    private void assertEqualsToJson(Object objectToSerialize, String fileName) throws IOException {\n        final String json = ResourceUtils.loadClassResource(getClass(), fileName);\n        SerializationMatchers.assertEqualsToJson(objectToSerialize, json);\n    }\n\n    @Test(description = \"it should convert a model\")\n    public void convertModel() throws IOException {\n        assertEqualsToJson(read(Person.class), \"Person.json\");\n    }\n\n    @Test(description = \"it should convert a model with Joda DateTime\")\n    public void convertModelWithJodaDateTime() throws IOException {\n        assertEqualsToJson(read(JodaDateTimeModel.class), \"JodaDateTimeModel.json\");\n    }\n\n    @Test(description = \"read an interface\")\n    public void readInterface() throws IOException {\n        assertEqualsToJson(readAll(Pet.class), \"Pet.json\");\n    }\n\n    @Test(description = \"it should read an inherited interface\")\n    public void readInheritedInterface() throws IOException {\n        assertEqualsToJson(readAll(Cat.class), \"Cat.json\");\n    }\n\n    @Test(description = \"it should honor the ApiModel name\")\n    public void honorApiModelName() {\n        final Map<String, Schema> schemas = readAll(ModelWithApiModel.class);\n        assertEquals(schemas.size(), 1);\n        String model = schemas.keySet().iterator().next();\n        assertEquals(model, \"MyModel\");\n    }\n\n    @Test(description = \"it should override an inherited model's name\")\n    public void overrideInheritedModelName() {\n        final Map<String, Schema> rootSchemas = readAll(AbstractModelWithApiModel.class);\n        assertEquals(rootSchemas.size(), 3);\n        assertTrue(rootSchemas.containsKey(\"MyProperty\"));\n        assertTrue(rootSchemas.containsKey(\"ModelWithUrlProperty\"));\n        assertTrue(rootSchemas.containsKey(\"ModelWithValueProperty\"));\n\n        final Map<String, Schema> nestedSchemas = readAll(ModelWithUrlProperty.class);\n        assertEquals(nestedSchemas.size(), 1);\n        assertTrue(nestedSchemas.containsKey(\"ModelWithUrlProperty\"));\n        assertFalse(nestedSchemas.containsKey(\"MyProperties\"));\n    }\n\n    @Test(description = \"it should maintain property names\")\n    public void maintainPropertyNames() {\n        final Map<String, Schema> schemas = readAll(ModelPropertyName.class);\n        assertEquals(schemas.size(), 1);\n\n        final String modelName = schemas.keySet().iterator().next();\n        assertEquals(modelName, \"ModelPropertyName\");\n\n        final Schema model = schemas.get(modelName);\n\n        final Iterator<String> itr = new TreeSet(model.getProperties().keySet()).iterator();\n        assertEquals(itr.next(), \"gettersAndHaters\");\n        assertEquals(itr.next(), \"is_persistent\");\n    }\n\n    @Test(description = \"it should serialize a parameterized type per 606\")\n    public void serializeParameterizedType() {\n        final Map<String, Schema> schemas = readAll(Employee.class);\n\n        final Schema employee = (Schema) schemas.get(\"employee\").getProperties().get(\"employee\");\n        final Map<String, Schema> props = employee.getProperties();\n        final Iterator<String> et = props.keySet().iterator();\n\n        final Schema id = props.get(et.next());\n        assertTrue(id instanceof IntegerSchema);\n\n        final Schema firstName = props.get(et.next());\n        assertTrue(firstName instanceof StringSchema);\n\n        final Schema lastName = props.get(et.next());\n        assertTrue(lastName instanceof StringSchema);\n\n        final Schema department = props.get(et.next());\n        assertNotNull(department.get$ref());\n\n        final Schema manager = props.get(et.next());\n        assertNotNull(manager.get$ref());\n\n        final Schema team = props.get(et.next());\n        assertTrue(team instanceof ArraySchema);\n\n        final ArraySchema ap = (ArraySchema) team;\n        assertTrue(ap.getUniqueItems());\n\n        assertNotNull(employee.getXml());\n        assertEquals(employee.getXml().getName(), \"employee\");\n    }\n\n    @Test(description = \"it should ignore hidden fields\")\n    public void ignoreHiddenFields() {\n        final Map<String, Schema> schemas = readAll(ClientOptInput.class);\n\n        final Schema model = schemas.get(\"ClientOptInput\");\n        assertEquals(model.getProperties().size(), 2);\n    }\n\n    @Test(description = \"it should set readOnly per #854\")\n    public void setReadOnly() {\n        final Map<String, Schema> schemas = readAll(JacksonReadonlyModel.class);\n        final Schema model = (Schema) schemas.get(\"JacksonReadonlyModel\");\n        final Schema prop = (Schema) model.getProperties().get(\"count\");\n        assertTrue(prop.getReadOnly());\n    }\n\n    @Test(description = \"it should process a model with org.apache.commons.lang3.tuple.Pair properties\")\n    public void processModelWithPairProperties() {\n\n        final ModelWithTuple2.TupleAsMapPropertyConverter asPropertyConverter = new ModelWithTuple2.TupleAsMapPropertyConverter(Json.mapper());\n        ModelConverters.getInstance().addConverter(asPropertyConverter);\n        final Map<String, Schema> asProperty = readAll(ModelWithTuple2.class);\n        ModelConverters.getInstance().removeConverter(asPropertyConverter);\n        Map<String, Schema> values = asProperty.get(\"ModelWithTuple2\").getProperties();\n        Yaml.prettyPrint(values);\n        for (Map.Entry<String, Schema> entry : values.entrySet()) {\n            String name = entry.getKey();\n            Schema property = entry.getValue();\n            if (\"timesheetStates\".equals(name)) {\n                assertEquals(property.getClass(), MapSchema.class);\n            } else if (\"manyPairs\".equals(name)) {\n                assertEquals(property.getClass(), ArraySchema.class);\n                Schema items = ((ArraySchema) property).getItems();\n                assertNotNull(items);\n                assertEquals(items.getClass(), MapSchema.class);\n                Schema stringProperty = (Schema)((MapSchema) items).getAdditionalProperties();\n                assertNotNull(stringProperty);\n                assertEquals(stringProperty.getClass(), StringSchema.class);\n            } else if (\"complexLeft\".equals(name)) {\n                assertEquals(property.getClass(), ArraySchema.class);\n                Schema items = ((ArraySchema) property).getItems();\n                assertNotNull(items);\n                assertEquals(items.getClass(), MapSchema.class);\n                Schema additionalProperty = (Schema)((MapSchema) items).getAdditionalProperties();\n                assertNotNull(additionalProperty);\n                assertNotNull(additionalProperty.get$ref());\n                assertEquals(additionalProperty.get$ref(), \"#/components/schemas/ComplexLeft\");\n            } else {\n                fail(String.format(\"Unexpected property: %s\", name));\n            }\n        }\n    }\n\n    @Test(description = \"it should scan an empty model per 499\")\n    public void scanEmptyModel() {\n        final Map<String, Schema> schemas = readAll(EmptyModel.class);\n        final Schema model = (Schema) schemas.get(\"EmptyModel\");\n        assertNull(model.getProperties());\n        assertEquals(model.getType(), \"object\");\n    }\n\n    @Test(description = \"it should override the property name\")\n    public void overridePropertyName() {\n        final Map<String, Schema> schemas = readAll(ModelWithAltPropertyName.class);\n        final Map<String, Schema> properties = schemas.get(\"sample_model\").getProperties();\n        assertNull(properties.get(\"id\"));\n        assertNotNull(properties.get(\"the_id\"));\n    }\n\n    @Test(description = \"it should convert a model with enum array\")\n    public void convertModelWithEnumArray() {\n        final Map<String, Schema> schemas = readAll(ModelWithEnumArray.class);\n        assertEquals(schemas.size(), 1);\n    }\n\n    private Type getGenericType(Class<?> cls) throws Exception {\n        return getClass().getDeclaredMethod(\"getGenericType\", Class.class).getGenericParameterTypes()[0];\n    }\n\n    @Test(description = \"it should check handling of the Class<?> type\")\n    public void checkHandlingClassType() throws Exception {\n        final Type type = getGenericType(null);\n        assertFalse(type instanceof Class<?>);\n        final Map<String, Schema> schemas = readAll(type);\n        assertEquals(schemas.size(), 0);\n    }\n\n    @Test(description = \"it should convert a model with Formatted strings\")\n    public void convertModelWithFormattedStrings() throws IOException {\n        final Schema model = readAll(ModelWithFormattedStrings.class).get(\"ModelWithFormattedStrings\");\n        assertEqualsToJson(model, \"ModelWithFormattedStrings.json\");\n    }\n\n    @Test(description = \"it should check handling of string types\")\n    public void checkStringTypesHandling() {\n        for (Class<?> cls : Arrays.asList(URI.class, URL.class, UUID.class)) {\n            final Map<String, Schema> schemas = readAll(cls);\n            assertEquals(schemas.size(), 0);\n            final Schema property = ModelConverters.getInstance().readAllAsResolvedSchema(cls).schema;\n            assertNotNull(property);\n            assertEquals(property.getType(), \"string\");\n        }\n    }\n\n    @Test(description = \"it should scan a model per #1155\")\n    public void scanModel() {\n        final Map<String, Schema> model = read(Model1155.class);\n        assertEquals(model.get(\"Model1155\").getProperties().keySet(), ImmutableSet.of(\"valid\", \"value\", \"is\", \"get\",\n                \"isA\", \"getA\", \"is_persistent\", \"gettersAndHaters\"));\n    }\n\n    @Test(description = \"it should scan a model with numbers\")\n    public void scanModelWithNumbers() throws IOException {\n        final Map<String, Schema> models = readAll(ModelWithNumbers.class);\n        assertEquals(models.size(), 1);\n\n        final Schema model = models.get(\"ModelWithNumbers\");\n        // Check if we get required properties after building models from classes.\n        checkModel(model);\n        // Check if we get required properties after deserialization from JSON\n        checkModel(Json.mapper().readValue(Json.pretty(model), Schema.class));\n    }\n\n    @Test(description = \"it tests a model with java offset\")\n    public void scanModelWithOffset() throws IOException {\n        final Map<String, Schema> models = readAll(ModelWithOffset.class);\n        assertEquals(models.size(), 1);\n\n        final Schema model = models.get(\"ModelWithOffset\");\n        Schema property = (Schema) model.getProperties().get(\"offset\");\n        assertEquals(property.getType(), \"string\");\n        assertEquals(property.getFormat(), \"date-time\");\n    }\n\n    private void checkType(Schema property, Class<?> cls, String type, String format) {\n        assertTrue(cls.isInstance(property));\n        assertEquals(property.getType(), type);\n        if (format == null) {\n            assertNull(property.getFormat());\n        } else {\n            assertEquals(property.getFormat(), format);\n        }\n    }\n\n    private void checkModel(Schema model) {\n        Map<String, Schema> props = model.getProperties();\n        for (Map.Entry<String, Schema> entry : props.entrySet()) {\n            final String name = entry.getKey();\n            final Schema property = entry.getValue();\n            if (Arrays.asList(\"shortPrimitive\", \"shortObject\", \"intPrimitive\", \"intObject\").contains(name)) {\n                checkType(property, IntegerSchema.class, \"integer\", \"int32\");\n            } else if (Arrays.asList(\"longPrimitive\", \"longObject\").contains(name)) {\n                checkType(property, IntegerSchema.class, \"integer\", \"int64\");\n            } else if (Arrays.asList(\"floatPrimitive\", \"floatObject\").contains(name)) {\n                checkType(property, NumberSchema.class, \"number\", \"float\");\n            } else if (Arrays.asList(\"doublePrimitive\", \"doubleObject\").contains(name)) {\n                checkType(property, NumberSchema.class, \"number\", \"double\");\n            } else if (\"bigInteger\".equals(name)) {\n                checkType(property, IntegerSchema.class, \"integer\", null);\n            } else if (\"bigDecimal\".equals(name)) {\n                checkType(property, NumberSchema.class, \"number\", null);\n            } else {\n                fail(String.format(\"Unexpected property: %s\", name));\n            }\n        }\n    }\n\n    @Test\n    public void formatDate() {\n        final Map<String, Schema> models = ModelConverters.getInstance().read(DateModel.class);\n        final Schema model = models.get(\"DateModel\");\n        assertEquals(model.getProperties().size(), 5);\n        final String json =\n                \"{\" +\n                        \"   \\\"type\\\":\\\"object\\\",\" +\n                        \"   \\\"properties\\\":{\" +\n                        \"      \\\"date\\\":{\" +\n                        \"         \\\"type\\\":\\\"string\\\",\" +\n                        \"         \\\"format\\\":\\\"date-time\\\"\" +\n                        \"      },\" +\n                        \"      \\\"intValue\\\":{\" +\n                        \"         \\\"type\\\":\\\"integer\\\",\" +\n                        \"         \\\"format\\\":\\\"int32\\\"\" +\n                        \"      },\" +\n                        \"      \\\"longValue\\\":{\" +\n                        \"         \\\"type\\\":\\\"integer\\\",\" +\n                        \"         \\\"format\\\":\\\"int64\\\"\" +\n                        \"      },\" +\n                        \"      \\\"floatValue\\\":{\" +\n                        \"         \\\"type\\\":\\\"number\\\",\" +\n                        \"         \\\"format\\\":\\\"float\\\"\" +\n                        \"      },\" +\n                        \"      \\\"doubleValue\\\":{\" +\n                        \"         \\\"type\\\":\\\"number\\\",\" +\n                        \"         \\\"format\\\":\\\"double\\\"\" +\n                        \"      }\" +\n                        \"   }\" +\n                        \"}\";\n        SerializationMatchers.assertEqualsToJson(model, json);\n    }\n\n    class DateModel {\n        @io.swagger.v3.oas.annotations.media.Schema\n        public Date date;\n        @io.swagger.v3.oas.annotations.media.Schema\n        public int intValue;\n        @io.swagger.v3.oas.annotations.media.Schema\n        public Long longValue;\n        @io.swagger.v3.oas.annotations.media.Schema\n        public Float floatValue;\n        @io.swagger.v3.oas.annotations.media.Schema\n        public Double doubleValue;\n    }\n\n    @Test\n    public void indirectPropertiesRecognized() {\n        final Map<String, Schema> models = ModelConverters.getInstance().read(BaseClass.class);\n        final Schema model = models.get(\"BaseClass\");\n        assertNotNull(model);\n        assertEquals(model.getName(), \"BaseClass\");\n        assertNotNull(model.getProperties());\n        assertEquals(model.getProperties().size(), 1);\n    }\n\n    @Test\n    public void checkDefaultSkippedPackages(){\n        ModelConverters modelConverters = ModelConverters.getInstance();\n\n        assertTrue(modelConverters.getSkippedPackages().contains(\"java.lang\"));\n        assertTrue(modelConverters.getSkippedPackages().contains(\"groovy.lang\"));\n    }\n\n    @Test(description = \"It should not process skipped package\")\n    public void ignoreSkippedPackage() throws ClassNotFoundException {\n        ModelConverters modelConverters = ModelConverters.getInstance();\n        final Type type = Class.forName(\"java.lang.String\");\n        assertNull(modelConverters.readAllAsResolvedSchema(type));\n\n\n    }\n\n    @JsonSerialize(as = AnnotatedImplementationClass.class)\n    abstract class BaseClass {\n        public abstract String field();\n    }\n    class AnnotatedImplementationClass extends BaseClass {\n        @Override\n        @JsonProperty\n        public String field() {\n            return \"value\";\n        }\n    }\n\n    @Test\n    @Ignore\n    public void directPropertiesRecognized() {\n        final Map<String, Schema> models = ModelConverters.getInstance().read(AnnotatedBaseClass.class);\n        final Schema model = models.get(\"AnnotatedBaseClass\");\n        assertNotNull(model);\n        assertEquals(model.getName(), \"AnnotatedBaseClass\");\n        assertNotNull(model.getProperties());\n        assertEquals(model.getProperties().size(), 1);\n    }\n\n\n    abstract class AnnotatedBaseClass {\n        @JsonProperty\n        public abstract String field();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/ModelPropertyTest.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.oas.models.Model1979;\nimport io.swagger.v3.core.oas.models.ModelWithBooleanProperty;\nimport io.swagger.v3.core.oas.models.ModelWithModelPropertyOverrides;\nimport io.swagger.v3.core.oas.models.ModelWithPrimitiveArray;\nimport io.swagger.v3.core.oas.models.ReadOnlyFields;\nimport io.swagger.v3.core.oas.models.RequiredFields;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.BooleanSchema;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Test;\n\nimport javax.validation.constraints.NotBlank;\nimport javax.validation.constraints.NotEmpty;\nimport javax.validation.constraints.NotNull;\nimport javax.validation.constraints.Size;\nimport java.util.Date;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertFalse;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class ModelPropertyTest {\n    @Test\n    public void extractProperties() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(Family.class);\n        assertEquals(models.size(), 3);\n\n        final Schema person = models.get(\"Person\");\n        final Schema employer = (Schema) person.getProperties().get(\"employer\");\n\n        assertTrue(employer instanceof ArraySchema);\n        final ArraySchema employerProperty = (ArraySchema) employer;\n\n        final Schema items = employerProperty.getItems();\n        assertEquals(items.get$ref(), \"#/components/schemas/Employer\");\n\n        final Schema awards = (Schema) person.getProperties().get(\"awards\");\n        assertTrue(awards instanceof ArraySchema);\n        assertTrue(((ArraySchema) awards).getItems() instanceof StringSchema);\n    }\n\n    @Test\n    public void extractPrimitiveArray() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(ModelWithPrimitiveArray.class);\n        assertEquals(models.size(), 1);\n\n        final Schema model = models.get(\"ModelWithPrimitiveArray\");\n        final ArraySchema longArray = (ArraySchema) model.getProperties().get(\"longArray\");\n        final Schema longArrayItems = longArray.getItems();\n        assertTrue(longArrayItems instanceof IntegerSchema);\n\n        final ArraySchema intArray = (ArraySchema) model.getProperties().get(\"intArray\");\n        assertTrue(intArray.getItems() instanceof IntegerSchema);\n    }\n\n    @Test\n    public void readModelProperty() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(IsModelTest.class);\n        final Schema model = models.get(\"IsModelTest\");\n        assertNotNull(model);\n    }\n\n    @Test(description = \"it should read a model with property dataTypes configured #679\")\n    public void readDataTypesProperty() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(ModelWithModelPropertyOverrides.class);\n        final String json = \"{\" +\n                \"   \\\"Children\\\":{\" +\n                \"      \\\"type\\\":\\\"object\\\",\" +\n                \"      \\\"properties\\\":{\" +\n                \"         \\\"name\\\":{\" +\n                \"            \\\"type\\\":\\\"string\\\"\" +\n                \"         }\" +\n                \"      }\" +\n                \"   },\" +\n                \"   \\\"ModelWithModelPropertyOverrides\\\":{\" +\n                \"      \\\"type\\\":\\\"object\\\",\" +\n                \"      \\\"properties\\\":{\" +\n                \"         \\\"children\\\":{\" +\n                \"            \\\"type\\\":\\\"array\\\",\" +\n                \"            \\\"items\\\":{\" +\n                \"               \\\"$ref\\\":\\\"#/components/schemas/Children\\\"\" +\n                \"            }\" +\n                \"         }\" +\n                \"      }\" +\n                \"   }\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(models, json);\n    }\n\n    @Test\n    public void testReadOnlyProperty() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(ReadOnlyFields.class);\n        Schema model = models.get(\"ReadOnlyFields\");\n        assertTrue(((Schema) model.getProperties().get(\"id\")).getReadOnly());\n    }\n\n    @Test\n    public void testRequiredProperty() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(RequiredFields.class);\n        Schema model = models.get(\"RequiredFields\");\n        assertFalse(model.getRequired().contains(\"optionalField\"));\n        assertFalse(model.getRequired().contains(\"primitiveTypeWithoutConstraint\"));\n        assertTrue(model.getRequired().contains(\"primitiveTypeWithConstraint\"));\n        assertTrue(model.getRequired().contains(\"required\"));\n        assertFalse(model.getRequired().contains(\"notRequired\"));\n        assertTrue(model.getRequired().contains(\"notRequiredWithAnnotation\"));\n        assertFalse(model.getRequired().contains(\"modeAuto\"));\n        assertTrue(model.getRequired().contains(\"modeAutoWithAnnotation\"));\n        assertTrue(model.getRequired().contains(\"modeRequired\"));\n        assertFalse(model.getRequired().contains(\"modeNotRequired\"));\n        assertFalse(model.getRequired().contains(\"modeNotRequiredWithAnnotation\"));\n        assertFalse(model.getRequired().contains(\"modeNotRequiredWithAnnotationForNotBlank\"));\n        assertFalse(model.getRequired().contains(\"modeNotRequiredWithAnnotationForNotEmpty\"));\n    }\n\n    @Test\n    public void modelAllowEmptyTest() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(Model1979.class);\n        Schema model = models.get(\"Model1979\");\n        assertTrue(((Schema) model.getProperties().get(\"id\")).getNullable());\n    }\n\n    @Test\n    public void testIssue1743() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(ModelWithBooleanProperty.class);\n        final Schema model = models.get(\"ModelWithBooleanProperty\");\n        assertNotNull(model);\n\n        BooleanSchema bp = (BooleanSchema) model.getProperties().get(\"isGreat\");\n        assertTrue(bp.getEnum().size() == 1);\n        assertEquals(bp.getEnum().get(0), Boolean.TRUE);\n\n        IntegerSchema is = (IntegerSchema) model.getProperties().get(\"intValue\");\n        assertTrue(is.getEnum().size() == 2);\n        assertEquals(is.getEnum().get(0), new Integer(1));\n        assertEquals(is.getEnum().get(1), new Integer(2));\n    }\n\n    @Test\n    public void testNotNullWithNotBlankAndNotEmpty() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(NotNullWithNotBlankNotEmptyModel.class);\n        Schema model = models.get(\"NotNullWithNotBlankNotEmptyModel\");\n        assertTrue(model.getRequired().contains(\"notNullAndNotBlank\"));\n        assertTrue(model.getRequired().contains(\"notNullAndNotEmptyList\"));\n        assertTrue(model.getRequired().contains(\"notNullAndNotEmptySet\"));\n    }\n\n    @Test\n    public void testCollectionWithNotEmpty() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(CollectionWithNotEmptyModel.class);\n        Schema model = models.get(\"CollectionWithNotEmptyModel\");\n        ArraySchema listSchema = (ArraySchema) model.getProperties().get(\"notEmptyList\");\n        assertNotNull(listSchema);\n        assertEquals(listSchema.getMinItems(), Integer.valueOf(1));\n        ArraySchema setSchema = (ArraySchema) model.getProperties().get(\"notEmptySet\");\n        assertNotNull(setSchema);\n        assertEquals(setSchema.getMinItems(), Integer.valueOf(1));\n    }\n\n    @Test\n    public void testStringWithNotBlankAndSize() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(StringWithNotBlankAndSizeModel.class);\n        Schema model = models.get(\"StringWithNotBlankAndSizeModel\");\n        Schema strSchema = (Schema) model.getProperties().get(\"notBlankAndSized\");\n        assertNotNull(strSchema);\n        assertEquals(strSchema.getMinLength(), Integer.valueOf(5));\n        assertEquals(strSchema.getMaxLength(), Integer.valueOf(10));\n    }\n\n    @Test\n    public void testNotBlankNotEmptyWithRequiredModeNotRequired() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(NotBlankNotEmptyWithRequiredModeNotRequiredModel.class);\n        Schema model = models.get(\"NotBlankNotEmptyWithRequiredModeNotRequiredModel\");\n        assertFalse(model.getRequired() != null && model.getRequired().contains(\"notBlankNotRequired\"));\n        assertFalse(model.getRequired() != null && model.getRequired().contains(\"notEmptyListNotRequired\"));\n        assertFalse(model.getRequired() != null && model.getRequired().contains(\"notEmptySetNotRequired\"));\n\n        // @NotBlank should generate minLength: 1\n        Schema notBlankSchema = (Schema) model.getProperties().get(\"notBlankNotRequired\");\n        assertNotNull(notBlankSchema);\n        assertEquals(notBlankSchema.getMinLength(), Integer.valueOf(1));\n\n        // @NotEmpty should generate minItems: 1\n        ArraySchema listSchema = (ArraySchema) model.getProperties().get(\"notEmptyListNotRequired\");\n        assertNotNull(listSchema);\n        assertEquals(listSchema.getMinItems(), Integer.valueOf(1));\n\n        ArraySchema setSchema = (ArraySchema) model.getProperties().get(\"notEmptySetNotRequired\");\n        assertNotNull(setSchema);\n        assertEquals(setSchema.getMinItems(), Integer.valueOf(1));\n    }\n\n    @Test\n    public void testNotBlankNotEmptyWithRequiredModeRequired() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(NotBlankNotEmptyWithRequiredModeRequiredModel.class);\n        Schema model = models.get(\"NotBlankNotEmptyWithRequiredModeRequiredModel\");\n        assertTrue(model.getRequired().contains(\"notBlankRequired\"));\n        assertTrue(model.getRequired().contains(\"notEmptyListRequired\"));\n        assertTrue(model.getRequired().contains(\"notEmptySetRequired\"));\n\n        // @NotBlank should generate minLength: 1\n        Schema notBlankSchema = (Schema) model.getProperties().get(\"notBlankRequired\");\n        assertNotNull(notBlankSchema);\n        assertEquals(notBlankSchema.getMinLength(), Integer.valueOf(1));\n\n        // @NotEmpty should generate minItems: 1\n        ArraySchema listSchema = (ArraySchema) model.getProperties().get(\"notEmptyListRequired\");\n        assertNotNull(listSchema);\n        assertEquals(listSchema.getMinItems(), Integer.valueOf(1));\n\n        ArraySchema setSchema = (ArraySchema) model.getProperties().get(\"notEmptySetRequired\");\n        assertNotNull(setSchema);\n        assertEquals(setSchema.getMinItems(), Integer.valueOf(1));\n    }\n\n    class Family {\n        public Date membersSince;\n        public List<Person> members;\n    }\n\n    class Person {\n        public String firstname;\n        public String lastname;\n        public int age;\n        public Date birthday;\n        public List<Employer> employer;\n        public List<String> awards;\n    }\n\n    class Employer {\n        public String name;\n        public int size;\n    }\n\n    class IsModelTest {\n        public Boolean is_happy;\n        public String name;\n    }\n\n    static class NotNullWithNotBlankNotEmptyModel {\n        @NotNull\n        @NotBlank\n        public String notNullAndNotBlank;\n\n        @NotNull\n        @NotEmpty\n        public List<String> notNullAndNotEmptyList;\n\n        @NotNull\n        @NotEmpty\n        public Set<String> notNullAndNotEmptySet;\n    }\n\n    static class CollectionWithNotEmptyModel {\n        @NotEmpty\n        public List<String> notEmptyList;\n\n        @NotEmpty\n        public Set<String> notEmptySet;\n    }\n\n    static class StringWithNotBlankAndSizeModel {\n        @NotBlank\n        @Size(min = 5, max = 10)\n        public String notBlankAndSized;\n    }\n\n    static class NotBlankNotEmptyWithRequiredModeRequiredModel {\n        @NotBlank\n        @io.swagger.v3.oas.annotations.media.Schema(requiredMode = io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED)\n        public String notBlankRequired;\n\n        @NotEmpty\n        @io.swagger.v3.oas.annotations.media.Schema(requiredMode = io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED)\n        public List<String> notEmptyListRequired;\n\n        @NotEmpty\n        @io.swagger.v3.oas.annotations.media.Schema(requiredMode = io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED)\n        public Set<String> notEmptySetRequired;\n    }\n\n    static class NotBlankNotEmptyWithRequiredModeNotRequiredModel {\n        @NotBlank\n        @io.swagger.v3.oas.annotations.media.Schema(requiredMode = io.swagger.v3.oas.annotations.media.Schema.RequiredMode.NOT_REQUIRED)\n        public String notBlankNotRequired;\n\n        @NotEmpty\n        @io.swagger.v3.oas.annotations.media.Schema(requiredMode = io.swagger.v3.oas.annotations.media.Schema.RequiredMode.NOT_REQUIRED)\n        public List<String> notEmptyListNotRequired;\n\n        @NotEmpty\n        @io.swagger.v3.oas.annotations.media.Schema(requiredMode = io.swagger.v3.oas.annotations.media.Schema.RequiredMode.NOT_REQUIRED)\n        public Set<String> notEmptySetNotRequired;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/NumericFormatTest.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport javax.validation.constraints.DecimalMax;\nimport javax.validation.constraints.DecimalMin;\nimport javax.validation.constraints.Min;\nimport java.math.BigDecimal;\nimport java.util.Map;\n\nimport static io.swagger.v3.core.util.TestUtils.normalizeLineEnds;\nimport static org.testng.Assert.assertEquals;\n\npublic class NumericFormatTest {\n    @Test\n    public void testFormatOfInteger() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(ModelWithIntegerFields.class);\n        assertEquals(models.size(), 1);\n\n        String json = Json.pretty(models);\n        assertEquals(normalizeLineEnds(json),\n                \"{\\n\" +\n                        \"  \\\"ModelWithIntegerFields\\\" : {\\n\" +\n                        \"    \\\"type\\\" : \\\"object\\\",\\n\" +\n                        \"    \\\"properties\\\" : {\\n\" +\n                        \"      \\\"id\\\" : {\\n\" +\n                        \"        \\\"minimum\\\" : 3,\\n\" +\n                        \"        \\\"type\\\" : \\\"integer\\\",\\n\" +\n                        \"        \\\"format\\\" : \\\"int32\\\"\\n\" +\n                        \"      }\\n\" +\n                        \"    }\\n\" +\n                        \"  }\\n\" +\n                        \"}\");\n    }\n\n    @Test\n    public void testFormatOfDecimal() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(ModelWithDecimalFields.class);\n        assertEquals(models.size(), 1);\n\n        String json = Json.pretty(models);\n        assertEquals(normalizeLineEnds(json),\n                \"{\\n\" +\n                        \"  \\\"ModelWithDecimalFields\\\" : {\\n\" +\n                        \"    \\\"type\\\" : \\\"object\\\",\\n\" +\n                        \"    \\\"properties\\\" : {\\n\" +\n                        \"      \\\"id\\\" : {\\n\" +\n                        \"        \\\"minimum\\\" : 3.3,\\n\" +\n                        \"        \\\"exclusiveMinimum\\\" : false,\\n\" +\n                        \"        \\\"type\\\" : \\\"number\\\",\\n\" +\n                        \"        \\\"format\\\" : \\\"double\\\"\\n\" +\n                        \"      }\\n\" +\n                        \"    }\\n\" +\n                        \"  }\\n\" +\n                        \"}\");\n    }\n\n    @Test\n    public void testFormatOfBigDecimal() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(ModelWithoutScientificFields.class);\n        assertEquals(models.size(), 1);\n\n        String json = Json.pretty(models);\n\n        assertEquals(normalizeLineEnds(json),\n                \"{\\n\" +\n                        \"  \\\"ModelWithoutScientificFields\\\" : {\\n\" +\n                        \"    \\\"type\\\" : \\\"object\\\",\\n\" +\n                        \"    \\\"properties\\\" : {\\n\" +\n                        \"      \\\"id\\\" : {\\n\" +\n                        \"        \\\"maximum\\\" : 9999999999999999.99,\\n\" +\n                        \"        \\\"exclusiveMaximum\\\" : false,\\n\" +\n                        \"        \\\"minimum\\\" : -9999999999999999.99,\\n\" +\n                        \"        \\\"exclusiveMinimum\\\" : false,\\n\" +\n                        \"        \\\"type\\\" : \\\"number\\\"\\n\" +\n                        \"      }\\n\" +\n                        \"    }\\n\" +\n                        \"  }\\n\" +\n                        \"}\");\n\n    }\n\n    static class ModelWithIntegerFields {\n        @io.swagger.v3.oas.annotations.media.Schema\n        @Min(value = 3)\n        public Integer id;\n    }\n\n    static class ModelWithDecimalFields {\n        @io.swagger.v3.oas.annotations.media.Schema\n        @DecimalMin(value = \"3.3\")\n        public Double id;\n    }\n\n    static class ModelWithoutScientificFields {\n        @io.swagger.v3.oas.annotations.media.Schema\n        @DecimalMin(value = \"-9999999999999999.99\")\n        @DecimalMax(value = \"9999999999999999.99\")\n        public BigDecimal id;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/PojoTest.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.util.ResourceUtils;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport org.testng.annotations.Test;\n\nimport javax.validation.constraints.Pattern;\nimport java.io.IOException;\nimport java.lang.reflect.Type;\nimport java.util.Date;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class PojoTest {\n\n    private Map<String, io.swagger.v3.oas.models.media.Schema> read(Type type) {\n        return ModelConverters.getInstance().read(type);\n    }\n\n    private Map<String, io.swagger.v3.oas.models.media.Schema> readAll(Type type) {\n        return ModelConverters.getInstance().readAll(type);\n    }\n\n    private void assertEqualsToJson(Object objectToSerialize, String fileName) throws IOException {\n        final String json = ResourceUtils.loadClassResource(getClass(), fileName);\n        SerializationMatchers.assertEqualsToJson(objectToSerialize, json);\n    }\n\n    @Test\n    public void testModelWithTitle() {\n\n        String yaml = \"ClassWithTitle:\\n\" +\n                \"  type: object\\n\" +\n                \"  title: 'My Pojo'\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: string\";\n        SerializationMatchers.assertEqualsToYaml(read(ClassWithTitle.class), yaml);\n\n    }\n\n    @Schema(title = \"My Pojo\")\n    static class ClassWithTitle {\n        private String id;\n\n        public String getId() {\n            return id;\n        }\n\n        public void setId(String id) {\n            this.id = id;\n        }\n    }\n\n    @Test(description = \"The @Schema annotation will only be adding additional sugar on the property\")\n    public void testModelWithAnnotatedPrivateMember() {\n        String yaml = \"ClassWithAnnotatedProperty:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      description: 'a long description for this property'\\n\" +\n                \"      type: string\";\n        SerializationMatchers.assertEqualsToYaml(read(ClassWithAnnotatedProperty.class), yaml);\n\n    }\n\n    static class ClassWithAnnotatedProperty {\n        @Schema(description = \"a long description for this property\")\n        private String id;\n\n        public String getId() {\n            return id;\n        }\n\n        public void setId(String id) {\n            this.id = id;\n        }\n    }\n\n    @Test(description = \"The @Schema annotation will only be adding additional sugar on the property\")\n    public void testModelWithAnnotatedPublicMethod() {\n        String yaml = \"ClassWithAnnotatedMethod:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      description: 'a long description for this property'\\n\" +\n                \"      type: string\";\n        SerializationMatchers.assertEqualsToYaml(read(ClassWithAnnotatedMethod.class), yaml);\n    }\n\n    static class ClassWithAnnotatedMethod {\n        private String id;\n\n        @Schema(description = \"a long description for this property\")\n        public String getId() {\n            return id;\n        }\n\n        public void setId(String id) {\n            this.id = id;\n        }\n    }\n\n    @Test(description = \"The @Schema annotation will override the type of the actual parameter\")\n    public void testModelWithOverriddenMemberType() {\n\n        String yaml = \"ClassWithOverriddenMemberType:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      description: 'we are declaring a string implementation must be a valid long integer, even though \" +\n                \"the model backs it with a String implementation'\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int64\";\n        SerializationMatchers.assertEqualsToYaml(read(ClassWithOverriddenMemberType.class), yaml);\n    }\n\n    static class ClassWithOverriddenMemberType {\n        private String id;\n\n        @Schema(type = \"integer\", format = \"int64\", description = \"we are declaring a string implementation must be \" +\n                \"a valid long integer, even though the model backs it with a String implementation\")\n        public String getId() {\n            return id;\n        }\n\n        public void setId(String id) {\n            this.id = id;\n        }\n    }\n\n    @Test(description = \"@Schema is completely overriding the type for this model\")\n    public void testModelWithAlternateRepresentation() {\n        String yaml = \"ClassWithAnnotatedMethod:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      description: 'a long description for this property'\\n\" +\n                \"      type: string\";\n        SerializationMatchers.assertEqualsToYaml(read(ClassWithAlternateRepresentation.class), yaml);\n    }\n\n    @Schema(implementation = ClassWithAnnotatedMethod.class)\n    static class ClassWithAlternateRepresentation {\n        private Date dateField;\n\n        public Date getDateField() {\n            return dateField;\n        }\n\n        public void setDateField(Date dateField) {\n            this.dateField = dateField;\n        }\n    }\n\n    @Test(description = \"@Schema is allowing multiple definition interfaces to represent this model\")\n    public void testModelWithMultipleRepresentations() {\n\n        String yaml = \"anyOf:\\n\" +\n                \"- $ref: \\\"#/components/schemas/UserObject\\\"\\n\" +\n                \"- $ref: \\\"#/components/schemas/EmployeeObject\\\"\\n\" +\n                \"type: object\\n\" +\n                \"properties:\\n\" +\n                \"  id:\\n\" +\n                \"    type: string\\n\" +\n                \"    format: uuid\\n\" +\n                \"  name:\\n\" +\n                \"    type: string\\n\" +\n                \"  department:\\n\" +\n                \"    type: string\\n\" +\n                \"required:\\n\" +\n                \"  - id\";\n\n        String yamlUser = \"type: object\\n\" +\n                \"description: 'A User Object'\\n\" +\n                \"required:\\n\" +\n                \"  - id\\n\" +\n                \"properties:\\n\" +\n                \"  id:\\n\" +\n                \"    type: string\\n\" +\n                \"    format: uuid\\n\" +\n                \"  name:\\n\" +\n                \"    type: string\\n\";\n\n        String yamlEmployee = \"type: object\\n\" +\n                \"description: An Employee Object\\n\" +\n                \"required:\\n\" +\n                \"  - department\\n\" +\n                \"properties:\\n\" +\n                \"  id:\\n\" +\n                \"    type: string\\n\" +\n                \"    format: email\\n\" +\n                \"  department:\\n\" +\n                \"    type: string\";\n\n        final Map<String, io.swagger.v3.oas.models.media.Schema> schemas = readAll(UberObject.class);\n        assertEquals(schemas.size(), 3);\n        SerializationMatchers.assertEqualsToYaml(schemas.get(\"UberObject\"), yaml);\n        SerializationMatchers.assertEqualsToYaml(schemas.get(\"UserObject\"), yamlUser);\n        SerializationMatchers.assertEqualsToYaml(schemas.get(\"EmployeeObject\"), yamlEmployee);\n\n    }\n\n    @Schema(anyOf = {UserObject.class, EmployeeObject.class})\n    static class UberObject implements UserObject, EmployeeObject {\n        private String id;\n        private String name;\n        private String department;\n\n        @Override\n        public String getDepartment() {\n            return department;\n        }\n\n        @Override\n        public String getId() {\n            return id;\n        }\n\n        @Override\n        public String getName() {\n            return name;\n        }\n    }\n\n    @Schema(description = \"A User Object\")\n    interface UserObject {\n        @Schema(format = \"uuid\", required = true)\n        String getId();\n\n        String getName();\n    }\n\n    @Schema(description = \"An Employee Object\", requiredProperties = {\"department\"})\n    interface EmployeeObject {\n        @Schema(format = \"email\")\n        String getId();\n\n        String getDepartment();\n    }\n\n    @Test(description = \"Shows how @Schema can be used to allow only certain data formats\")\n    public void testModelWithSpecificFormat() {\n\n        String yaml = \"AuthorizedUser:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: string\\n\" +\n                \"      description: 'A valid user social security'\\n\" +\n                \"      pattern: '^\\\\d{3}-?\\\\d{2}-?\\\\d{4}$'\";\n        SerializationMatchers.assertEqualsToYaml(read(ClassWithIdConstraints.class), yaml);\n    }\n\n    @Schema(name = \"AuthorizedUser\")\n    static class ClassWithIdConstraints {\n        @Schema(pattern = \"^\\\\d{3}-?\\\\d{2}-?\\\\d{4}$\", description = \"A valid user social security\")\n        private String id;\n\n        public String getId() {\n            return id;\n        }\n\n        public void setId(String id) {\n            this.id = id;\n        }\n    }\n\n    @Test(description = \"Shows how to restrict a particular schema\")\n    public void testExcludeSchema() {\n\n        String yaml = \"type: object\\n\" +\n                \"description: We don't store social security numbers here!\\n\" +\n                \"not:\\n\" +\n                \"  $ref: \\\"#/components/schemas/AuthorizedUser\\\"\";\n\n        String yamlUser = \"type: object\\n\" +\n                \"properties:\\n\" +\n                \"  id:\\n\" +\n                \"    type: string\\n\" +\n                \"    description: 'A valid user social security'\\n\" +\n                \"    pattern: '^\\\\d{3}-?\\\\d{2}-?\\\\d{4}$'\";\n        Map<String, io.swagger.v3.oas.models.media.Schema> map = readAll(ArbitraryDataReceiver.class);\n        Yaml.prettyPrint(map);\n        SerializationMatchers.assertEqualsToYaml(map.get(\"ArbitraryDataReceiver\"), yaml);\n        SerializationMatchers.assertEqualsToYaml(map.get(\"AuthorizedUser\"), yamlUser);\n\n    }\n\n    @Schema(not = ClassWithIdConstraints.class, description = \"We don't store social security numbers here!\")\n    static class ArbitraryDataReceiver {\n    }\n\n    @Test(description = \"Shows how to override a definition with a schema reference\")\n    public void testSchemaReference() {\n\n        String yaml = \"NotAPet:\\n\" +\n                \"  $ref: http://petstore.swagger.io/v2/swagger.json#/definitions/Tag\";\n        SerializationMatchers.assertEqualsToYaml(read(NotAPet.class), yaml);\n\n    }\n\n    @Schema(ref = \"http://petstore.swagger.io/v2/swagger.json#/definitions/Tag\")\n    static class NotAPet {\n    }\n\n    @Test(description = \"Shows how to add a reference on a property\")\n    public void testPropertySchemaReference() {\n\n        String yaml = \"ModelWithSchemaPropertyReference:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    notATag:\\n\" +\n                \"      $ref: 'http://petstore.swagger.io/v2/swagger.json#/definitions/Tag'\";\n        SerializationMatchers.assertEqualsToYaml(read(ModelWithSchemaPropertyReference.class), yaml);\n\n    }\n\n    static class ModelWithSchemaPropertyReference {\n\n        @Schema(ref = \"http://petstore.swagger.io/v2/swagger.json#/definitions/Tag\")\n        private String notATag;\n\n        public String getNotATag() {\n            return notATag;\n        }\n\n        public void setNotATag(String notATag) {\n            this.notATag = notATag;\n        }\n\n    }\n\n    @Test(description = \"Shows how to override a property name\")\n    public void testPropertyNameOverride() {\n\n        String yaml = \"ModelWithPropertyNameOverride:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    username:\\n\" +\n                \"      type: string\";\n        SerializationMatchers.assertEqualsToYaml(read(ModelWithPropertyNameOverride.class), yaml);\n\n    }\n\n    static class ModelWithPropertyNameOverride {\n        public String getDefinitelyNotCalledUsername() {\n            return definitelyNotCalledUsername;\n        }\n\n        public void setDefinitelyNotCalledUsername(String definitelyNotCalledUsername) {\n            this.definitelyNotCalledUsername = definitelyNotCalledUsername;\n        }\n\n        @Schema(name = \"username\")\n        private String definitelyNotCalledUsername;\n    }\n\n    @Test(description = \"Shows how to override a model name\")\n    public void testModelNameOverride() {\n\n        String yaml = \"Employee:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: string\";\n        SerializationMatchers.assertEqualsToYaml(read(ModelWithNameOverride.class), yaml);\n\n    }\n\n    @Schema(name = \"Employee\")\n    static class ModelWithNameOverride {\n        private String id;\n\n        public String getId() {\n            return id;\n        }\n\n        public void setId(String id) {\n            this.id = id;\n        }\n    }\n\n    @Test(description = \"Shows how to provide model examples\")\n    public void testModelPropertyExampleOverride() {\n\n        String yaml = \"modelWithPropertyExampleOverride:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: string\\n\" +\n                \"      example: abc-123\";\n        SerializationMatchers.assertEqualsToYaml(read(modelWithPropertyExampleOverride.class), yaml);\n    }\n\n    static class modelWithPropertyExampleOverride {\n        @Schema(example = \"abc-123\")\n        private String id;\n\n        public String getId() {\n            return id;\n        }\n\n        public void setId(String id) {\n            this.id = id;\n        }\n\n    }\n\n    @Test(description = \"Shows how to provide model examples as json\")\n    public void testModelPropertyExampleJson() {\n\n        String yaml = \"ExampleJson:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: string\\n\" +\n                \"  minimum: 2\\n\" +\n                \"  example:\\n\" +\n                \"    id: 19877734\\n\" +\n                \"modelWithPropertyExampleOverrideJson:\\n\" +\n                \"  minimum: 2\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    exampleJson:\\n\" +\n                \"      $ref: \\\"#/components/schemas/ExampleJson\\\"\\n\" +\n                \"  example:\\n\" +\n                \"    id: 19877734\";\n        SerializationMatchers.assertEqualsToYaml(readAll(modelWithPropertyExampleOverrideJson.class), yaml);\n    }\n\n    @Schema(example = \"{\\\"id\\\": 19877734}\", minimum = \"2\")\n    static class modelWithPropertyExampleOverrideJson {\n\n        @Schema(example = \"{\\\"id\\\": 19877734}\", minimum = \"2\")\n        private ExampleJson exampleJson;\n\n        public ExampleJson getExampleJson() {\n            return exampleJson;\n        }\n\n        public void setExampleJson(ExampleJson exampleJson) {\n            this.exampleJson = exampleJson;\n        }\n\n    }\n\n    @Test(description = \"Shows how to provide model examples as json\")\n    public void testModelPropertyImplExampleJson() {\n\n        String yaml = \"ExampleJson:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: string\\n\" +\n                \"  example:\\n\" +\n                \"    id: 19877734\\n\" +\n                \"modelWithPropertyImplExampleOverrideJson:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    exampleJson:\\n\" +\n                \"      $ref: \\\"#/components/schemas/ExampleJson\\\"\\n\";\n        SerializationMatchers.assertEqualsToYaml(readAll(modelWithPropertyImplExampleOverrideJson.class), yaml);\n    }\n\n    static class modelWithPropertyImplExampleOverrideJson {\n\n        @Schema(implementation = ExampleJson.class, example = \"{\\\"id\\\": 19877734}\")\n        private String exampleJson;\n\n        public String getExampleJson() {\n            return exampleJson;\n        }\n\n        public void setExampleJson(String exampleJson) {\n            this.exampleJson = exampleJson;\n        }\n\n    }\n\n    /**\n     * Test schema with json object defaultValue and example.\n     */\n    @Test(description = \"Shows how to provide model examples as json\")\n    public void testModelPropertyExampleDefaultJson() {\n\n        String json = \"{\\\"ExampleJsonExtended\\\": {\" +\n                            \"\\\"type\\\":\\\"object\\\",\" +\n                            \"\\\"properties\\\":{\" +\n                                \"\\\"id\\\":{\" +\n                                    \"\\\"type\\\":\\\"integer\\\",\" +\n                                    \"\\\"format\\\":\\\"int32\\\"\" +\n                                \"},\" +\n                                \"\\\"idType\\\":{\" +\n                                    \"\\\"type\\\":\\\"string\\\"\" +\n                                \"},\" +\n                                \"\\\"isActive\\\":{\" +\n                                    \"\\\"type\\\":\\\"boolean\\\"\" +\n                                \"}\" +\n                            \"},\" +\n                            \"\\\"example\\\":{\" +\n                                \"\\\"id\\\":19877734,\" +\n                                \"\\\"idType\\\":\\\"employee code\\\",\" +\n                                \"\\\"isActive\\\":false\" +\n                            \"},\" +\n                            \"\\\"default\\\":{\" +\n                                \"\\\"id\\\":19877734,\" +\n                                \"\\\"idType\\\":\\\"employee code\\\",\" +\n                                \"\\\"isActive\\\":false\" +\n                            \"}\" +\n                        \"},\" +\n                        \"\\\"modelWithPropertyExampleDefaultJson\\\":{\" +\n                            \"\\\"type\\\":\\\"object\\\",\" +\n                            \"\\\"properties\\\":{\" +\n                                \"\\\"exampleJsonExtended\\\":{\" +\n                                    \"\\\"$ref\\\":\\\"#/components/schemas/ExampleJsonExtended\\\"\" +\n                                \"}\" +\n                            \"}\" +\n                        \"}\" +\n                    \"}\";\n        SerializationMatchers.assertEqualsToJson(readAll(modelWithPropertyExampleDefaultJson.class), json);\n    }\n\n    static class modelWithPropertyExampleDefaultJson {\n        final String SAMPLE = \"{\\\"id\\\": 19877734, \\\"idType\\\":\\\"employee code\\\", \\\"isActive\\\":false}\";\n        ExampleJsonExtended tester = new ExampleJsonExtended();\n\n        @Schema( example = SAMPLE, defaultValue = SAMPLE)\n        private ExampleJsonExtended exampleJsonExtended;\n\n        public ExampleJsonExtended getExampleJsonExtended() {\n            return exampleJsonExtended;\n        }\n\n        public void setExampleJsonExtended(ExampleJsonExtended exampleJsonExtended) {\n            this.exampleJsonExtended = exampleJsonExtended;\n        }\n    }\n\n    @Test(description = \"Shows how to provide model examples as json\")\n    public void testModelPropertyStringExampleJson() {\n\n        String yaml = \"modelWithPropertyStringExampleOverrideJson:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      minimum: 2\\n\" +\n                \"      type: string\\n\" +\n                \"      description: testdesc\\n\" +\n                \"      example: '{\\\"id\\\":19877734}'\";\n        SerializationMatchers.assertEqualsToYaml(readAll(modelWithPropertyStringExampleOverrideJson.class), yaml);\n    }\n\n    static class modelWithPropertyStringExampleOverrideJson {\n\n        @Schema(type = \"string\", name = \"id\", example = \"{\\\"id\\\": 19877734}\", minimum = \"2\", description = \"testdesc\")\n        private String exampleJson;\n\n        public String getExampleJson() {\n            return exampleJson;\n        }\n\n        public void setExampleJson(String exampleJson) {\n            this.exampleJson = exampleJson;\n        }\n\n    }\n\n    static class ExampleJson {\n        private String id;\n\n        public String getId() {\n            return id;\n        }\n\n        public void setId(String id) {\n            this.id = id;\n        }\n\n    }\n\n    static class ExampleJsonExtended {\n        private int id;\n        private String idType;\n        private boolean isActive;\n\n        public int getId() {\n            return id;\n        }\n\n        public void setId(int id) {\n            this.id = id;\n        }\n\n        public String getIdType() {\n            return idType;\n        }\n\n        public void setIdType(String idType) {\n            this.idType = idType;\n        }\n\n        public boolean getIsActive() {\n            return isActive;\n        }\n\n        public void setIsActive(boolean isActive) {\n            this.isActive = isActive;\n        }\n\n    }\n\n    @Test(description = \"Shows how to provide an example array\")\n    public void testExampleArray() {\n\n        String yaml =\n                \"modelExampleArray:\\n\" +\n                        \"  type: object\\n\" +\n                        \"  properties:\\n\" +\n                        \"    ids:\\n\" +\n                        \"      type: array\\n\" +\n                        \"      example:\\n\" +\n                        \"      - abc-123\\n\" +\n                        \"      - zz-aa-bb\\n\" +\n                        \"      items:\\n\" +\n                        \"        type: string\";\n        Map<String, io.swagger.v3.oas.models.media.Schema> schemaMap = readAll(modelExampleArray.class);\n        SerializationMatchers.assertEqualsToYaml(schemaMap, yaml);\n    }\n\n    static class modelExampleArray {\n        @ArraySchema(arraySchema = @Schema(example = \"[\\\"abc-123\\\", \\\"zz-aa-bb\\\"]\"))\n        private String[] ids;\n\n        public String[] getIds() {\n            return ids;\n        }\n\n        public void setIds(String[] ids) {\n            this.ids = ids;\n        }\n    }\n\n    @Test(description = \"Shows how to provide an array with specific format\")\n    public void testArrayWithPattern() {\n\n        String yaml =\n                \"modelArrayWithPattern:\\n\" +\n                        \"  type: object\\n\" +\n                        \"  properties:\\n\" +\n                        \"    ids:\\n\" +\n                        \"      type: array\\n\" +\n                        \"      items:\\n\" +\n                        \"        pattern: \\\"[a-zA-Z]*\\\"\\n\" +\n                        \"        type: string\";\n        Map<String, io.swagger.v3.oas.models.media.Schema> schemaMap = readAll(modelArrayWithPattern.class);\n        SerializationMatchers.assertEqualsToYaml(schemaMap, yaml);\n    }\n\n    static class modelArrayWithPattern {\n        @Pattern(regexp=\"[a-zA-Z]*\")\n        private String[] ids;\n\n        public String[] getIds() {\n            return ids;\n        }\n\n        public void setIds(String[] ids) {\n            this.ids = ids;\n        }\n    }\n\n    @Test(description = \"Show how to completely override an object example\")\n    public void testModelExampleOverride() {\n\n        String yaml =\n                \"modelWithExampleOverride:\\n\" +\n                        \"  type: object\\n\" +\n                        \"  properties:\\n\" +\n                        \"    id:\\n\" +\n                        \"      type: string\\n\" +\n                        \"  example:\\n\" +\n                        \"    foo: bar\\n\" +\n                        \"    baz: true\";\n\n        SerializationMatchers.assertEqualsToYaml(readAll(modelWithExampleOverride.class), yaml);\n    }\n\n    @Schema(example = \"{\\\"foo\\\": \\\"bar\\\",\\\"baz\\\": true}\")\n    static class modelWithExampleOverride {\n        private String id;\n\n        public String getId() {\n            return id;\n        }\n\n        public void setId(String id) {\n            this.id = id;\n        }\n    }\n\n    @Test\n    public void testModelWithBoolean() {\n\n        String yaml = \"ClassWithBoolean:\\n\" +\n                \"  required:\\n\" +\n                \"    - booleanObject\\n\" +\n                \"    - booleanType\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    booleanObject:\\n\" +\n                \"      type: boolean\\n\" +\n                \"      description: my Boolean object field\\n\" +\n                \"    booleanType:\\n\" +\n                \"      type: boolean\\n\" +\n                \"      description: my boolean type field\\n\";\n        SerializationMatchers.assertEqualsToYaml(read(ClassWithBoolean.class), yaml);\n\n    }\n\n    @Schema\n    static class ClassWithBoolean {\n\n        @Schema(required = true, description = \"my Boolean object field\")\n        private Boolean booleanObject;\n\n        @Schema(required = true, description = \"my boolean type field\")\n        private boolean booleanType;\n\n        public Boolean getBooleanObject() {\n            return booleanObject;\n        }\n\n        public void setBooleanObject(Boolean booleanObject) {\n            this.booleanObject = booleanObject;\n        }\n\n        public boolean getBooleanType() {\n            return booleanType;\n        }\n\n        public void setBooleanType(boolean booleanType) {\n            this.booleanType = booleanType;\n        }\n    }\n\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/PolymorphicSubtypePropertyBleedTest.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.models.media.ComposedSchema;\nimport org.testng.annotations.Test;\n\nimport javax.validation.constraints.NotNull;\nimport java.lang.reflect.Field;\nimport java.util.List;\nimport java.util.Map;\n\nimport static org.testng.Assert.*;\nimport static org.testng.AssertJUnit.assertEquals;\n\npublic class PolymorphicSubtypePropertyBleedTest {\n\n    @Schema(\n            description = \"base\",\n            discriminatorProperty = \"kind\",\n            oneOf = { ConcretionA.class }\n    )\n    public static class BaseResponse {\n        public String sharedField;\n        public String kind;\n    }\n\n    @Schema(description = \"subtype A\")\n    public static class ConcretionA extends BaseResponse {\n        public String onlyInA;\n    }\n\n    public static class Wrapper {\n        @NotNull\n        public ConcretionA concretionA;\n    }\n\n    /**\n     * Mimics how swagger-core resolves a bean property:\n     *  - schemaProperty=true\n     *  - propertyName set\n     *  - ctxAnnotations from the backing field (e.g. @NotNull)\n     */\n    private io.swagger.v3.oas.models.media.Schema resolveAsBeanProperty(\n            Class<?> clazz,\n            String propertyName,\n            Field backingField,\n            ModelConverterContextImpl ctx,\n            ModelResolver resolver\n    ) {\n        AnnotatedType at = new AnnotatedType()\n                .type(clazz)\n                .schemaProperty(true)\n                .propertyName(propertyName)\n                .ctxAnnotations(backingField.getAnnotations());\n        return ctx.resolve(at);\n    }\n\n    /**\n     * Mimics how resolveSubtypes(...) resolves a polymorphic subtype:\n     *  - NO schemaProperty(true)\n     *  - NO propertyName\n     *  - NO ctxAnnotations from some containing field\n\n     */\n    private io.swagger.v3.oas.models.media.Schema resolveAsPolymorphicSubtype(\n            Class<?> clazz,\n            ModelConverterContextImpl ctx,\n            ModelResolver resolver\n    ) {\n        AnnotatedType at = new AnnotatedType()\n                .type(clazz);\n        return ctx.resolve(at);\n    }\n\n    /**\n     * Baseline for comparison: new context, clean standalone schema resolution.\n     */\n    private io.swagger.v3.oas.models.media.Schema resolveAsStandaloneSchema(\n            Class<?> clazz,\n            ModelResolver resolver\n    ) {\n        ModelConverterContextImpl freshCtx = new ModelConverterContextImpl(resolver);\n        AnnotatedType at = new AnnotatedType()\n                .type(clazz);\n        return freshCtx.resolve(at);\n    }\n\n    @Test\n    public void subtypeResolution_shouldMatchStandalone_andNotBleedFromPropertyContext() throws Exception {\n        ObjectMapper mapper = new ObjectMapper();\n        ModelResolver resolver = new ModelResolver(mapper);\n\n        ModelConverterContextImpl sharedCtx = new ModelConverterContextImpl(resolver);\n\n        // 1. Resolve ConcretionA in the bean property context\n        Field wrapperField = Wrapper.class.getDeclaredField(\"concretionA\");\n        io.swagger.v3.oas.models.media.Schema concretionAsPropertySchema =\n                resolveAsBeanProperty(\n                        ConcretionA.class,\n                        \"concretionA\",\n                        wrapperField,\n                        sharedCtx,\n                        resolver\n                );\n\n        assertNotNull(concretionAsPropertySchema, \"bean property resolution returned null\");\n\n        // 2. Resolve ConcretionA again, but this time as a polymorphic subtype using the SAME sharedCtx\n        io.swagger.v3.oas.models.media.Schema concretionAsPolymorphicSchema =\n                resolveAsPolymorphicSubtype(\n                        ConcretionA.class,\n                        sharedCtx,\n                        resolver\n                );\n        assertNotNull(concretionAsPolymorphicSchema, \"polymorphic subtype resolution returned null\");\n\n        // 3. Resolve ConcretionA in a clean context to represent the canonical standalone subtype schema.\n        io.swagger.v3.oas.models.media.Schema concretionStandaloneSchema =\n                resolveAsStandaloneSchema(\n                        ConcretionA.class,\n                        resolver\n                );\n        assertNotNull(concretionStandaloneSchema, \"standalone subtype resolution returned null\");\n\n        // nullable should be consistent between standalone and subtype\n        assertEquals(\n                concretionStandaloneSchema.getNullable(),\n                concretionAsPolymorphicSchema.getNullable()\n        );\n\n        // required list should match between standalone and subtype-in-sharedCtx\n        List<?> requiredStandalone = concretionStandaloneSchema.getRequired();\n        List<?> requiredPolymorphic = concretionAsPolymorphicSchema.getRequired();\n        if (requiredStandalone == null) requiredStandalone = java.util.Collections.emptyList();\n        if (requiredPolymorphic == null) requiredPolymorphic = java.util.Collections.emptyList();\n        assertEquals(\n                requiredStandalone,\n                requiredPolymorphic\n        );\n\n        // Name should match standalone. We don't want subtype schemas\n        assertEquals(\n                concretionStandaloneSchema.getName(),\n                concretionAsPolymorphicSchema.getName()\n        );\n\n        //Properties should still include subtype-specific fields like 'onlyInA'.\n        Map<?, ?> propsStandalone = concretionStandaloneSchema.getProperties();\n        Map<?, ?> propsPolymorphic = concretionAsPolymorphicSchema.getProperties();\n        assertNotNull(propsPolymorphic);\n        assertTrue(propsPolymorphic.containsKey(\"onlyInA\"));\n        assertEquals(\n                propsStandalone == null\n                        ? java.util.Collections.emptySet()\n                        : propsStandalone.keySet(),\n                propsPolymorphic.keySet()\n        );\n\n        assertNotSame(\n                concretionAsPropertySchema,\n                concretionAsPolymorphicSchema\n        );\n    }\n\n\n    @Test\n    public void polymorphicSubtype_mustContainSubtypeFragment_notJustBaseRef() {\n        ObjectMapper mapper = new ObjectMapper();\n        ModelResolver resolver = new ModelResolver(mapper);\n        ModelConverterContextImpl ctx = new ModelConverterContextImpl(resolver);\n\n        AnnotatedType subtypeAT = new AnnotatedType()\n                .type(ConcretionA.class)\n                .schemaProperty(true);\n\n        io.swagger.v3.oas.models.media.Schema resolvedSubtypeSchema = ctx.resolve(subtypeAT);\n\n        assertTrue(resolvedSubtypeSchema.getProperties().containsKey(\"onlyInA\"));\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/SwaggerSerializerTest.java",
    "content": "package io.swagger.v3.core.converting;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.oas.models.Person;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.JsonAssert;\nimport io.swagger.v3.core.util.OutputReplacer;\nimport io.swagger.v3.core.util.ResourceUtils;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.Paths;\nimport io.swagger.v3.oas.models.info.Contact;\nimport io.swagger.v3.oas.models.info.Info;\nimport io.swagger.v3.oas.models.links.Link;\nimport io.swagger.v3.oas.models.media.Content;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.parameters.QueryParameter;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.servers.Server;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class SwaggerSerializerTest {\n\n    @Test(description = \"it should convert a spec\")\n    public void convertSpec() throws IOException {\n        final Schema personModel = ModelConverters.getInstance().read(Person.class).get(\"Person\");\n        final Schema errorModel = ModelConverters.getInstance().read(Error.class).get(\"Error\");\n        final Info info = new Info()\n                .version(\"1.0.0\")\n                .title(\"Swagger Petstore\");\n\n        final Contact contact = new Contact()\n                .name(\"Swagger API Team\")\n                .email(\"foo@bar.baz\")\n                .url(\"http://swagger.io\");\n\n        info.setContact(contact);\n\n        final Map<String, Object> map = new HashMap<String, Object>();\n        map.put(\"name\", \"value\");\n        info.addExtension(\"x-test2\", map);\n        info.addExtension(\"x-test\", \"value\");\n\n        final OpenAPI swagger = new OpenAPI()\n                .info(info)\n                .addServersItem(new Server()\n                        .url(\"http://petstore.swagger.io\"))\n                .schema(\"Person\", personModel)\n                .schema(\"Error\", errorModel);\n\n        final Operation get = new Operation()\n                .summary(\"finds pets in the system\")\n                .description(\"a longer description\")\n                .addTagsItem(\"Pet Operations\")\n                .operationId(\"get pet by id\")\n                .deprecated(true);\n\n        get.addParametersItem(new Parameter()\n                .in(\"query\")\n                .name(\"tags\")\n                .description(\"tags to filter by\")\n                .required(false)\n                .schema(new StringSchema())\n        );\n\n        get.addParametersItem(new Parameter()\n                .in(\"path\")\n                .name(\"petId\")\n                .description(\"pet to fetch\")\n                .schema(new IntegerSchema().format(\"int64\"))\n        );\n\n        final ApiResponse response = new ApiResponse()\n                .description(\"pets returned\")\n                .content(new Content()\n                        .addMediaType(\"application/json\", new MediaType()\n                                .schema(new Schema().$ref(\"Person\"))\n                                .example(\"fun\")));\n\n        final ApiResponse errorResponse = new ApiResponse()\n                .description(\"error response\")\n                .addLink(\"myLink\", new Link()\n                        .description(\"a link\")\n                        .operationId(\"theLinkedOperationId\")\n                        .addParameter(\"userId\", \"gah\")\n                )\n                .content(new Content()\n                        .addMediaType(\"application/json\", new MediaType()\n                                .schema(new Schema().$ref(\"Error\"))));\n\n        get.responses(new ApiResponses()\n                .addApiResponse(\"200\", response)\n                .addApiResponse(\"default\", errorResponse));\n\n        final Operation post = new Operation()\n                .summary(\"adds a new pet\")\n                .description(\"you can add a new pet this way\")\n                .addTagsItem(\"Pet Operations\")\n                .operationId(\"add pet\")\n                .responses(new ApiResponses()\n                        .addApiResponse(\"default\", errorResponse))\n                .requestBody(new RequestBody()\n                        .description(\"the pet to add\")\n                        .content(new Content().addMediaType(\"*/*\", new MediaType()\n                                .schema(new Schema().$ref(\"Person\")))));\n\n        swagger.paths(new Paths().addPathItem(\"/pets\", new PathItem()\n                .get(get).post(post)));\n        final String swaggerJson = Json.mapper().writeValueAsString(swagger);\n        Json.prettyPrint(swagger);\n        final OpenAPI rebuilt = Json.mapper().readValue(swaggerJson, OpenAPI.class);\n        SerializationMatchers.assertEqualsToJson(rebuilt, swaggerJson);\n    }\n\n    @Test(description = \"it should read the uber api\")\n    public void readUberApi() throws IOException {\n        final String jsonString = ResourceUtils.loadClassResource(getClass(), \"uber.json\");\n        final OpenAPI swagger = Json.mapper().readValue(jsonString, OpenAPI.class);\n        assertNotNull(swagger);\n    }\n\n    @Test(description = \"it should write a spec with parameter references\")\n    public void writeSpecWithParameterReferences() throws IOException {\n        final Schema personModel = ModelConverters.getInstance().read(Person.class).get(\"Person\");\n\n        final Info info = new Info()\n                .version(\"1.0.0\")\n                .title(\"Swagger Petstore\");\n\n        final Contact contact = new Contact()\n                .name(\"Swagger API Team\")\n                .email(\"foo@bar.baz\")\n                .url(\"http://swagger.io\");\n        info.setContact(contact);\n\n        final OpenAPI swagger = new OpenAPI()\n                .info(info)\n                .addServersItem(new Server().url(\"http://petstore.swagger.io\"))\n                .schema(\"Person\", personModel);\n\n        final QueryParameter parameter = (QueryParameter) new QueryParameter()\n                .name(\"id\")\n                .description(\"a common get parameter\")\n                .schema(new IntegerSchema());\n\n        final Operation get = new Operation()\n                .summary(\"finds pets in the system\")\n                .description(\"a longer description\")\n                .operationId(\"get pet by id\")\n                .addParametersItem(new Parameter().$ref(\"#/parameters/Foo\"));\n\n        swagger\n                .components(swagger.getComponents().addParameters(\"Foo\", parameter))\n                .path(\"/pets\", new PathItem().get(get));\n\n        final String swaggerJson = Json.mapper().writeValueAsString(swagger);\n        final OpenAPI rebuilt = Json.mapper().readValue(swaggerJson, OpenAPI.class);\n        JsonAssert.assertJsonEquals(Json.mapper(), Json.pretty(rebuilt), Json.pretty(swagger));\n    }\n\n    @Test\n    public void prettyPrintTest() throws IOException {\n        final String json = ResourceUtils.loadClassResource(getClass(), \"uber.json\");\n        final OpenAPI swagger = Json.mapper().readValue(json, OpenAPI.class);\n        final String outputStream = OutputReplacer.OUT.run(new OutputReplacer.Function() {\n            @Override\n            public void run() {\n                Json.prettyPrint(swagger);\n            }\n        });\n        SerializationMatchers.assertEqualsToJson(swagger, outputStream);\n    }\n\n    @Test\n    public void exceptionsTest() throws IOException {\n        final String outputStream1 = OutputReplacer.ERROR.run(new OutputReplacer.Function() {\n            @Override\n            public void run() {\n                Json.pretty(new ThrowHelper());\n            }\n        });\n        assertTrue(outputStream1.contains(ThrowHelper.MESSAGE));\n\n        final String outputStream2 = OutputReplacer.ERROR.run(new OutputReplacer.Function() {\n            @Override\n            public void run() {\n                Json.prettyPrint(new ThrowHelper());\n            }\n        });\n        assertTrue(outputStream2.contains(ThrowHelper.MESSAGE));\n    }\n\n    static class ThrowHelper {\n\n        public static final String MESSAGE = \"Test exception\";\n\n        public String getValue() throws IOException {\n            throw new IOException(MESSAGE);\n        }\n\n        public void setValue(String value) {\n\n        }\n    }\n\n    @Test\n    public void testDynamicRefSerialization() throws IOException {\n        Schema<?> dynamicRefSchema = new Schema<>();\n        dynamicRefSchema.set$dynamicRef(\"#node\");\n\n        Components components = new Components().addSchemas(\"DynamicRefSchema\", dynamicRefSchema);\n        OpenAPI openAPI = new OpenAPI().components(components);\n        String json = Json.mapper().writeValueAsString(openAPI);\n\n        assertTrue(json.contains(\"\\\"$dynamicRef\\\":\\\"#node\\\"\"));\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/override/CustomAnnotationConverter.java",
    "content": "package io.swagger.v3.core.converting.override;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.core.converter.ModelConverterContext;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.resolving.resources.BidimensionalArray;\nimport io.swagger.v3.core.util.AnnotationsUtils;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.Iterator;\n\npublic class CustomAnnotationConverter extends ModelResolver {\n\n    public CustomAnnotationConverter(ObjectMapper mapper) {\n        super(mapper);\n    }\n\n    @Override\n    public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator<ModelConverter> chain) {\n        Schema s = chain.next().resolve(type, context, chain);\n        if (s != null) {\n            if (\"array\".equals(s.getType()) && s.getItems() != null && \"array\".equals(s.getItems().getType())) {\n                BidimensionalArray.MySizeAnnotation size = AnnotationsUtils.getAnnotation(BidimensionalArray.MySizeAnnotation.class, type.getCtxAnnotations());\n                if (size != null) {\n                    s.getItems().maxItems(size.maxItems());\n                }\n            }\n            return s;\n        }\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/override/CustomConverterTest.java",
    "content": "package io.swagger.v3.core.converting.override;\n\nimport com.fasterxml.jackson.databind.JavaType;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.core.converter.ModelConverterContext;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.util.Iterator;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\n\npublic class CustomConverterTest {\n\n    @Test(description = \"it should ignore properties with type Bar\")\n    public void testCustomConverter() {\n        // add the custom converter\n        final ModelConverters converters = new ModelConverters();\n        converters.addConverter(new CustomConverter());\n\n        final Schema model = converters.read(Foo.class).get(\"Foo\");\n        assertNotNull(model);\n        assertEquals(model.getProperties().size(), 1);\n\n        final Schema barProperty = (Schema) model.getProperties().get(\"bar\");\n        assertNull(barProperty);\n\n        final Schema titleProperty = (Schema) model.getProperties().get(\"title\");\n        assertNotNull(titleProperty);\n    }\n\n    class CustomConverter implements ModelConverter {\n\n        @Override\n        public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator<ModelConverter> chain) {\n            final JavaType jType = Json.mapper().constructType(type.getType());\n            if (jType != null) {\n                final Class<?> cls = jType.getRawClass();\n                if (cls.equals(Bar.class)) {\n                    return null;\n                } else {\n                    return chain.next().resolve(type, context, chain);\n                }\n            } else {\n                return null;\n            }\n        }\n    }\n\n    class Foo {\n        public Bar bar = null;\n        public String title = null;\n    }\n\n    class Bar {\n        public String foo = null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/override/CustomResolverTest.java",
    "content": "package io.swagger.v3.core.converting.override;\n\nimport com.fasterxml.jackson.databind.JavaType;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.jackson.TypeNameResolver;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.apache.commons.lang3.StringUtils;\nimport org.testng.annotations.Test;\n\nimport java.util.*;\n\nimport static org.testng.Assert.*;\n\npublic class CustomResolverTest {\n\n    @Test(description = \"it should ignore properties with type Bar\")\n    public void testCustomConverter() {\n        // add the custom converter\n        final ModelConverters converters = new ModelConverters();\n        converters.addConverter(new CustomConverter(Json.mapper()));\n\n        Map<String, Schema> models = converters.readAll(Foo.class);\n        Schema model = models.get(\"io.swagger.v3.core.converting.override.CustomResolverTest$Foo\");\n        assertNotNull(model);\n        assertEquals(model.getProperties().size(), 2);\n\n        final Schema barProperty = (Schema) model.getProperties().get(\"bar\");\n        assertEquals(barProperty.get$ref(), \"#/components/schemas/io.swagger.v3.core.converting.override.CustomResolverTest$Bar\");\n\n        final Schema titleProperty = (Schema)model.getProperties().get(\"title\");\n        assertNotNull(titleProperty);\n\n        model = models.get(\"io.swagger.v3.core.converting.override.CustomResolverTest$Bar\");\n        assertNotNull(model);\n\n    }\n\n    @Test(description = \"it should set the required mode based upon the field type\")\n    public void testCustomRequiredModeBasedUponTypeConverter() {\n        // add the custom converter\n        final ModelConverters converters = new ModelConverters();\n        converters.addConverter(new RequiredModeBasedUponFieldTypeResolver(Json.mapper()));\n\n        Map<String, Schema> models = converters.readAll(SuperFoo.class);\n        Schema model = models.get(\"SuperFoo\");\n        assertNotNull(model);\n        assertEquals(model.getProperties().size(), 4);\n        assertEquals(model.getRequired(), Collections.singletonList(\"bar\"));\n\n        final Schema fooProperty = (Schema) model.getProperties().get(\"foo\");\n        assertEquals(fooProperty.get$ref(), \"#/components/schemas/Foo\");\n        Schema fooModel = models.get(\"Foo\");\n        assertEquals(fooModel.getRequired(), Collections.singletonList(\"bar\"));\n\n        final Schema optionalBarProperty = (Schema) model.getProperties().get(\"optionalBar\");\n        assertEquals(optionalBarProperty.get$ref(), \"#/components/schemas/Bar\");\n        Schema barModel = models.get(\"Bar\");\n        assertNull(barModel.getRequired());\n\n        final Schema barProperty = (Schema) model.getProperties().get(\"bar\");\n        assertEquals(barProperty.get$ref(), \"#/components/schemas/Bar\");\n        assertNull(barModel.getRequired());\n\n        final Schema titleProperty = (Schema) model.getProperties().get(\"string\");\n        assertNotNull(titleProperty);\n\n    }\n\n    class CustomConverter extends ModelResolver {\n\n        public CustomConverter(ObjectMapper mapper) {\n            super(mapper, new QualifiedTypeNameResolver());\n        }\n    }\n\n    class QualifiedTypeNameResolver extends TypeNameResolver {\n\n        @Override\n        protected String nameForClass(Class<?> cls, Set<Options> options) {\n            String className = cls.getName().startsWith(\"java.\") ? cls.getSimpleName() : cls.getName();\n            if (options.contains(Options.SKIP_API_MODEL)) {\n                return className;\n            }\n            final io.swagger.v3.oas.annotations.media.Schema model = cls.getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n            final String modelName = model == null ? null : StringUtils.trimToNull(model.name());\n            return modelName == null ? className : modelName;\n        }\n    }\n\n    class RequiredModeBasedUponFieldTypeResolver extends ModelResolver {\n\n        public RequiredModeBasedUponFieldTypeResolver(ObjectMapper mapper) {\n            super(mapper);\n        }\n\n        @Override\n        protected io.swagger.v3.oas.annotations.media.Schema.RequiredMode resolveRequiredMode(\n                io.swagger.v3.oas.annotations.media.Schema schema, JavaType type) {\n            if (type.getRawClass().equals(Bar.class)) {\n                return io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;\n            }\n            return super.resolveRequiredMode(schema, type);\n        }\n    }\n\n    class SuperFoo {\n        public Foo foo;\n        public Optional<Bar> optionalBar;\n        public Bar bar;\n        public Optional<String> string;\n    }\n\n    class Foo {\n        public Bar bar = null;\n        public String title = null;\n    }\n\n    class Bar {\n        public String foo = null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/override/GenericModelConverter.java",
    "content": "package io.swagger.v3.core.converting.override;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.core.converter.ModelConverterContext;\nimport io.swagger.v3.core.converting.override.resources.GenericModel;\nimport io.swagger.v3.core.jackson.AbstractModelConverter;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.Iterator;\nimport java.util.Map.Entry;\n\npublic class GenericModelConverter extends AbstractModelConverter {\n\n    protected GenericModelConverter() {\n        super(Json.mapper());\n    }\n\n    @Override\n    public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator<ModelConverter> next) {\n        if (type.getType() instanceof Class<?>) {\n            Class<?> cls = (Class<?>) type.getType();\n            if (GenericModel.class.isAssignableFrom(cls)) {\n                Schema impl = new Schema();\n                impl.title(cls.getSimpleName());\n                for (Entry<String, Class<?>> entry : GenericModel.getDeclaredProperties().entrySet()) {\n                    impl.addProperties(entry.getKey(), context.resolve(new AnnotatedType(entry.getValue())));\n                }\n                context.defineModel(impl.getTitle(), impl);\n                return impl;\n            }\n        }\n        if (next.hasNext()) {\n            return next.next().resolve(type, context, next);\n        } else {\n            return null;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/override/ModelPropertyOverrideTest.java",
    "content": "package io.swagger.v3.core.converting.override;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.converting.override.resources.MyCustomClass;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.resources.BidimensionalArray;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\npublic class ModelPropertyOverrideTest {\n    @Test\n    public void overrideTest() throws Exception {\n        ModelConverters.getInstance().addConverter(new SamplePropertyConverter());\n        final Map<String, Schema> model = ModelConverters.getInstance().read(MyPojo.class);\n        final String expected = \"{\" +\n                \"  \\\"MyPojo\\\" : {\" +\n                \"    \\\"type\\\" : \\\"object\\\",\" +\n                \"    \\\"properties\\\" : {\" +\n                \"      \\\"id\\\" : {\" +\n                \"        \\\"type\\\" : \\\"string\\\"\" +\n                \"      },\" +\n                \"      \\\"myCustomClass\\\" : {\" +\n                \"        \\\"type\\\" : \\\"string\\\",\" +\n                \"        \\\"format\\\" : \\\"date-time\\\"\" +\n                \"      }\" +\n                \"    }\" +\n                \"  }\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(model, expected);\n    }\n\n    @Test\n    public void extendedOverrideTest() throws Exception {\n        ModelConverters.getInstance().addConverter(new SamplePropertyExtendedConverter(Json.mapper()));\n        final Map<String, Schema> model = ModelConverters.getInstance().read(MyPojo.class);\n        final String expected = \"{\" +\n                \"  \\\"MyPojo\\\" : {\" +\n                \"    \\\"type\\\" : \\\"object\\\",\" +\n                \"    \\\"properties\\\" : {\" +\n                \"      \\\"id\\\" : {\" +\n                \"        \\\"type\\\" : \\\"string\\\"\" +\n                \"      },\" +\n                \"      \\\"myCustomClass\\\" : {\" +\n                \"        \\\"type\\\" : \\\"string\\\",\" +\n                \"        \\\"format\\\" : \\\"date-time\\\",\" +\n                \"        \\\"description\\\" : \\\"instead of modeling this class in the documentation, we will model a string\\\"\" +\n                \"      }\" +\n                \"    }\" +\n                \"  }\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(model, expected);\n    }\n\n    public static class MyPojo {\n        public String getId() {\n            return \"\";\n        }\n\n        public void setId(String id) {\n        }\n\n        @io.swagger.v3.oas.annotations.media.Schema(required = false, description = \"instead of modeling this class in the documentation, we will model a string\")\n        public MyCustomClass getMyCustomClass() {\n            return null;\n        }\n\n        public void setMyCustomClass(MyCustomClass myCustomClass) {\n        }\n    }\n\n    @Test\n    public void customAnnotationTest() throws Exception {\n        ModelConverters.getInstance().addConverter(new CustomAnnotationConverter(Json.mapper()));\n        final Map<String, Schema> model = ModelConverters.getInstance().read(BidimensionalArray.class);\n        final String expected = \"BidimensionalArray:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    withCustomAnnotation:\\n\" +\n                \"      maxItems: 3\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        maxItems: 2\\n\" +\n                \"        type: array\\n\" +\n                \"        items:\\n\" +\n                \"          type: string\\n\" +\n                \"    withHelperClass:\\n\" +\n                \"      maxItems: 3\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        maxItems: 2\\n\" +\n                \"        type: array\\n\" +\n                \"        items:\\n\" +\n                \"          type: string\\n\" +\n                \"    sized:\\n\" +\n                \"      maxItems: 2\\n\" +\n                \"      minItems: 0\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(model, expected);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/override/OverrideTest.java",
    "content": "package io.swagger.v3.core.converting.override;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.converting.override.resources.GenericModel;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertTrue;\n\npublic class OverrideTest {\n    private static final String NAME = \"name\";\n    private static final String COUNT = \"count\";\n\n    @Test\n    public void test() {\n        GenericModel.declareProperty(NAME, String.class);\n        GenericModel.declareProperty(COUNT, int.class);\n\n        // create new instead of use singleton\n        final ModelConverters converters = new ModelConverters();\n        converters.addConverter(new GenericModelConverter());\n        final Map<String, Schema> read = converters.read(GenericModel.class);\n        assertTrue(read.containsKey(GenericModel.class.getSimpleName()));\n\n        final Schema model = read.get(GenericModel.class.getSimpleName());\n        assertTrue(model.getProperties().containsKey(NAME));\n        assertEquals(((Schema) model.getProperties().get(NAME)).getType(), \"string\");\n        assertTrue(model.getProperties().containsKey(COUNT));\n        assertEquals(((Schema) model.getProperties().get(COUNT)).getType(), \"integer\");\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/override/SamplePropertyConverter.java",
    "content": "package io.swagger.v3.core.converting.override;\n\nimport com.fasterxml.jackson.databind.JavaType;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.core.converter.ModelConverterContext;\nimport io.swagger.v3.core.converting.override.resources.MyCustomClass;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.oas.models.media.DateTimeSchema;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.Iterator;\n\n/**\n * Sample converter implementation which turns \"MyCustomClass\" into a DateTime property\n */\npublic class SamplePropertyConverter implements ModelConverter {\n\n    @Override\n    public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator<ModelConverter> chain) {\n        if (type.isSchemaProperty()) {\n            JavaType _type = Json.mapper().constructType(type.getType());\n            if (_type != null) {\n                Class<?> cls = _type.getRawClass();\n                if (MyCustomClass.class.isAssignableFrom(cls)) {\n                    return new DateTimeSchema();\n                }\n            }\n        }\n        if (chain.hasNext()) {\n            return chain.next().resolve(type, context, chain);\n        } else {\n            return null;\n        }\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/override/SamplePropertyExtendedConverter.java",
    "content": "package io.swagger.v3.core.converting.override;\n\nimport com.fasterxml.jackson.databind.JavaType;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.core.converter.ModelConverterContext;\nimport io.swagger.v3.core.converting.override.resources.MyCustomClass;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.oas.models.media.DateTimeSchema;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.Iterator;\n\n/**\n * Sample converter implementation which turns \"MyCustomClass\" into a DateTime property\n */\npublic class SamplePropertyExtendedConverter extends ModelResolver {\n\n    public SamplePropertyExtendedConverter(ObjectMapper mapper) {\n        super(mapper);\n    }\n\n    @Override\n    public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator<ModelConverter> chain) {\n        if (type.isSchemaProperty()) {\n            JavaType _type = Json.mapper().constructType(type.getType());\n            if (_type != null) {\n                Class<?> cls = _type.getRawClass();\n                if (MyCustomClass.class.isAssignableFrom(cls)) {\n                    Schema schema = new DateTimeSchema();\n                    super.resolveSchemaMembers(schema, type);\n                    return schema;\n                }\n            }\n        }\n        if (chain.hasNext()) {\n            return chain.next().resolve(type, context, chain);\n        } else {\n            return null;\n        }\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/override/SnakeCaseConverterTest.java",
    "content": "package io.swagger.v3.core.converting.override;\n\nimport com.google.common.collect.Sets;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.core.converter.ModelConverterContext;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.apache.commons.lang3.StringUtils;\nimport org.apache.commons.lang3.tuple.Pair;\nimport org.testng.annotations.Test;\n\nimport javax.xml.bind.annotation.XmlRootElement;\nimport java.util.Iterator;\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport java.util.Set;\n\nimport static io.swagger.v3.core.util.RefUtils.constructRef;\nimport static io.swagger.v3.core.util.RefUtils.extractSimpleName;\n\npublic class SnakeCaseConverterTest {\n\n    @Test(description = \"it should change naming style\")\n    public void testConvert() {\n        // add the custom converter\n        final SnakeCaseConverter snakeCaseConverter = new SnakeCaseConverter();\n        final ModelConverters converters = new ModelConverters();\n\n        converters.addConverter(snakeCaseConverter);\n\n        final Map<String, Schema> models = converters.readAll(SnakeCaseModel.class);\n        final String json = \"{\" +\n                \"   \\\"bar\\\":{\" +\n                \"      \\\"type\\\":\\\"object\\\",\" +\n                \"      \\\"properties\\\":{\" +\n                \"         \\\"foo\\\":{\" +\n                \"            \\\"type\\\":\\\"string\\\"\" +\n                \"         }\" +\n                \"      }\" +\n                \"   },\" +\n                \"   \\\"snake_case_model\\\":{\" +\n                \"      \\\"type\\\":\\\"object\\\",\" +\n                \"      \\\"properties\\\":{\" +\n                \"         \\\"bar\\\":{\" +\n                \"            \\\"$ref\\\":\\\"#/components/schemas/bar\\\"\" +\n                \"         },\" +\n                \"         \\\"title\\\":{\" +\n                \"            \\\"type\\\":\\\"string\\\"\" +\n                \"         }\" +\n                \"      },\" +\n                \"      \\\"xml\\\":{\" +\n                \"        \\\"name\\\":\\\"snakeCaseModel\\\"\" +\n                \"      }\" +\n                \"   }\" +\n                \"}\";\n\n        // TODO test xml if/when added to annotations and resolver\n        Json.prettyPrint(models);\n        SerializationMatchers.assertEqualsToJson(models, json);\n    }\n\n    /**\n     * simple converter to rename models and field names into snake_case\n     */\n    class SnakeCaseConverter implements ModelConverter {\n        final Set<String> primitives = Sets.newHashSet(\"string\", \"integer\", \"number\", \"boolean\", \"long\");\n\n\n        @Override\n        public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator<ModelConverter> chain) {\n            if (chain.hasNext()) {\n                final ModelConverter converter = chain.next();\n                final Schema model = converter.resolve(type, context, chain);\n                if (model != null) {\n                    final Map<String, Schema> properties = model.getProperties();\n                    final Map<String, Schema> updatedProperties = new LinkedHashMap<String, Schema>();\n                    if (properties != null) {\n                        for (String key : properties.keySet()) {\n                            String convertedKey = toSnakeCase(key);\n                            Schema prop = properties.get(key);\n                            if (prop.get$ref() != null) {\n                                Pair<String, String> refName = extractSimpleName(prop.get$ref());\n                                if (!StringUtils.isBlank(refName.getRight())) { // skip if didn't resolve simple name\n                                    prop.set$ref(constructRef(toSnakeCase(refName.getLeft()), refName.getRight()));\n                                }\n                            }\n                            updatedProperties.put(convertedKey, prop);\n                        }\n                        model.getProperties().clear();\n                        model.setProperties(updatedProperties);\n                    }\n                    if (model.getName() != null) {\n                        String prevName = model.getName();\n                        model.setName(toSnakeCase(model.getName()));\n                        context.defineModel(model.getName(), model, type, prevName);\n                    }\n\n                    return model;\n                }\n            }\n            return null;\n        }\n\n        private String toSnakeCase(String str) {\n            if (StringUtils.isBlank(str)) {\n                return str;\n            }\n            String o = str.replaceAll(\"[A-Z\\\\d]\", \"_\" + \"$0\").toLowerCase();\n            if (o.startsWith(\"_\")) {\n                return o.substring(1);\n            } else {\n                return o;\n            }\n        }\n    }\n\n    @XmlRootElement(name = \"snakeCaseModel\")\n    class SnakeCaseModel {\n        public Bar bar = null;\n        public String title = null;\n    }\n\n    class Bar {\n        public String foo = null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/override/resources/GenericModel.java",
    "content": "package io.swagger.v3.core.converting.override.resources;\n\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.Map;\n\npublic class GenericModel {\n    private static final Map<String, Class<?>> additionalPropertyTypes = new HashMap<String, Class<?>>();\n    private Map<String, Object> additionalProperties;\n\n    public static void declareProperty(String key, Class<?> cls) {\n        additionalPropertyTypes.put(key, cls);\n    }\n\n    public static Map<String, Class<?>> getDeclaredProperties() {\n        return Collections.unmodifiableMap(additionalPropertyTypes);\n    }\n\n    public static void undeclareProperty(String key) {\n        additionalPropertyTypes.remove(key);\n    }\n\n    public void setProperty(String key, Object value) {\n        if (value == null || additionalPropertyTypes.get(key).isAssignableFrom(value.getClass())) {\n            additionalProperties.put(key, value);\n        }\n    }\n\n    public Object getProperty(String key) {\n        return additionalProperties.get(key);\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/converting/override/resources/MyCustomClass.java",
    "content": "package io.swagger.v3.core.converting.override.resources;\n\npublic class MyCustomClass {\n    // does nothing, really\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/deserialization/ComprehensiveOAS31ValidationTest.java",
    "content": "package io.swagger.v3.core.deserialization;\n\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.core.util.Yaml31;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.testng.annotations.Test;\n\nimport java.io.File;\nimport java.io.IOException;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertTrue;\n\n/**\n * Test class to validate the comprehensive OpenAPI 3.1 files.\n */\npublic class ComprehensiveOAS31ValidationTest {\n\n    /**\n     * Test to validate the comprehensive OpenAPI 3.1 file.\n     * This test ensures that the file can be properly deserialized by the swagger-core library\n     * and that all references are correctly resolved.\n     */\n    @Test\n    public void testComprehensiveOAS31Validation() throws IOException {\n        // Path to the comprehensive OpenAPI 3.1 file\n        String filePath = \"src/test/resources/comprehensiveOAS31/comprehensive-openapi.yaml\";\n\n        // Verify the file exists\n        File file = new File(filePath);\n        assertTrue(file.exists(), \"Comprehensive OpenAPI 3.1 file does not exist: \" + filePath);\n\n        // Deserialize the file\n        OpenAPI openAPI = Yaml31.mapper().readValue(file, OpenAPI.class);\n\n        // Verify the file was properly deserialized\n        assertNotNull(openAPI, \"Failed to deserialize the comprehensive OpenAPI 3.1 file\");\n\n        // Verify basic structure\n        assertNotNull(openAPI.getInfo(), \"Info object is missing\");\n        assertNotNull(openAPI.getPaths(), \"Paths object is missing\");\n        assertNotNull(openAPI.getComponents(), \"Components object is missing\");\n\n        // Verify components\n        assertNotNull(openAPI.getComponents().getSchemas(), \"Schemas object is missing\");\n        assertNotNull(openAPI.getComponents().getPathItems(), \"PathItems object is missing\");\n        assertNotNull(openAPI.getComponents().getParameters(), \"Parameters object is missing\");\n        assertNotNull(openAPI.getComponents().getRequestBodies(), \"RequestBodies object is missing\");\n        assertNotNull(openAPI.getComponents().getResponses(), \"Responses object is missing\");\n        assertNotNull(openAPI.getComponents().getHeaders(), \"Headers object is missing\");\n        assertNotNull(openAPI.getComponents().getSecuritySchemes(), \"SecuritySchemes object is missing\");\n        assertNotNull(openAPI.getComponents().getExamples(), \"Examples object is missing\");\n        assertNotNull(openAPI.getComponents().getLinks(), \"Links object is missing\");\n        assertNotNull(openAPI.getComponents().getCallbacks(), \"Callbacks object is missing\");\n\n        // Verify webhooks\n        assertNotNull(openAPI.getWebhooks(), \"Webhooks object is missing\");\n\n        // Verify schemas\n        assertTrue(openAPI.getComponents().getSchemas().size() > 0, \"No schemas found\");\n\n        // Verify paths\n        assertTrue(openAPI.getPaths().size() > 0, \"No paths found\");\n\n        // Verify webhooks\n        assertTrue(openAPI.getWebhooks().size() > 0, \"No webhooks found\");\n    }\n\n    /**\n     * Test round-trip serialization and deserialization of the comprehensive OpenAPI 3.1 file using YAML.\n     * This test ensures that the file can be properly serialized and deserialized without losing information.\n     */\n    @Test\n    public void testComprehensiveOAS31YamlRoundTrip() throws IOException {\n        // Path to the comprehensive OpenAPI 3.1 file\n        String filePath = \"src/test/resources/comprehensiveOAS31/comprehensive-openapi.yaml\";\n\n        // Verify the file exists\n        File file = new File(filePath);\n        assertTrue(file.exists(), \"Comprehensive OpenAPI 3.1 file does not exist: \" + filePath);\n\n        // Deserialize the file\n        OpenAPI originalOpenAPI = Yaml31.mapper().readValue(file, OpenAPI.class);\n\n        // Serialize to YAML\n        String yaml = Yaml31.pretty(originalOpenAPI);\n\n        // Deserialize back\n        OpenAPI deserializedOpenAPI = Yaml31.mapper().readValue(yaml, OpenAPI.class);\n\n        // Verify basic structure\n        assertNotNull(deserializedOpenAPI, \"Failed to deserialize the serialized YAML\");\n        assertEquals(deserializedOpenAPI.getOpenapi(), \"3.1.0\", \"OpenAPI version mismatch\");\n        assertEquals(deserializedOpenAPI.getInfo().getTitle(), originalOpenAPI.getInfo().getTitle(), \"Title mismatch\");\n        assertEquals(deserializedOpenAPI.getInfo().getVersion(), originalOpenAPI.getInfo().getVersion(), \"Version mismatch\");\n\n        // Verify components\n        assertNotNull(deserializedOpenAPI.getComponents(), \"Components object is missing\");\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas(), \"Schemas object is missing\");\n        assertEquals(deserializedOpenAPI.getComponents().getSchemas().size(), originalOpenAPI.getComponents().getSchemas().size(), \"Schemas size mismatch\");\n\n        // Verify paths\n        assertNotNull(deserializedOpenAPI.getPaths(), \"Paths object is missing\");\n        assertEquals(deserializedOpenAPI.getPaths().size(), originalOpenAPI.getPaths().size(), \"Paths size mismatch\");\n\n        // Verify webhooks\n        assertNotNull(deserializedOpenAPI.getWebhooks(), \"Webhooks object is missing\");\n        assertEquals(deserializedOpenAPI.getWebhooks().size(), originalOpenAPI.getWebhooks().size(), \"Webhooks size mismatch\");\n\n        // Serialize again\n        String yamlAgain = Yaml31.pretty(deserializedOpenAPI);\n\n        // Compare YAML strings (normalize whitespace)\n        SerializationMatchers.assertEqualsToYaml31(originalOpenAPI, yamlAgain);\n    }\n\n    /**\n     * Test round-trip serialization and deserialization of the comprehensive OpenAPI 3.1 file using JSON.\n     * This test ensures that the file can be properly serialized and deserialized without losing information.\n     */\n    @Test\n    public void testComprehensiveOAS31JsonRoundTrip() throws IOException {\n        // Path to the comprehensive OpenAPI 3.1 file\n        String filePath = \"src/test/resources/comprehensiveOAS31/comprehensive-openapi.yaml\";\n\n        // Verify the file exists\n        File file = new File(filePath);\n        assertTrue(file.exists(), \"Comprehensive OpenAPI 3.1 file does not exist: \" + filePath);\n\n        // Deserialize the file\n        OpenAPI originalOpenAPI = Yaml31.mapper().readValue(file, OpenAPI.class);\n\n        // Serialize to JSON\n        String json = Json31.pretty(originalOpenAPI);\n\n        // Deserialize back\n        OpenAPI deserializedOpenAPI = Json31.mapper().readValue(json, OpenAPI.class);\n\n        // Verify basic structure\n        assertNotNull(deserializedOpenAPI, \"Failed to deserialize the serialized JSON\");\n        assertEquals(deserializedOpenAPI.getOpenapi(), \"3.1.0\", \"OpenAPI version mismatch\");\n        assertEquals(deserializedOpenAPI.getInfo().getTitle(), originalOpenAPI.getInfo().getTitle(), \"Title mismatch\");\n        assertEquals(deserializedOpenAPI.getInfo().getVersion(), originalOpenAPI.getInfo().getVersion(), \"Version mismatch\");\n\n        // Verify components\n        assertNotNull(deserializedOpenAPI.getComponents(), \"Components object is missing\");\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas(), \"Schemas object is missing\");\n        assertEquals(deserializedOpenAPI.getComponents().getSchemas().size(), originalOpenAPI.getComponents().getSchemas().size(), \"Schemas size mismatch\");\n\n        // Verify paths\n        assertNotNull(deserializedOpenAPI.getPaths(), \"Paths object is missing\");\n        assertEquals(deserializedOpenAPI.getPaths().size(), originalOpenAPI.getPaths().size(), \"Paths size mismatch\");\n\n        // Verify webhooks\n        assertNotNull(deserializedOpenAPI.getWebhooks(), \"Webhooks object is missing\");\n        assertEquals(deserializedOpenAPI.getWebhooks().size(), originalOpenAPI.getWebhooks().size(), \"Webhooks size mismatch\");\n\n        // Serialize again\n        String jsonAgain = Json31.pretty(deserializedOpenAPI);\n\n        // Compare JSON strings\n        SerializationMatchers.assertEqualsToJson31(originalOpenAPI, jsonAgain);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/deserialization/JsonDeserializationTest.java",
    "content": "package io.swagger.v3.core.deserialization;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.ResourceUtils;\nimport io.swagger.v3.core.util.TestUtils;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.examples.Example;\nimport io.swagger.v3.oas.models.headers.Header;\nimport io.swagger.v3.oas.models.media.ComposedSchema;\nimport io.swagger.v3.oas.models.media.Encoding;\nimport io.swagger.v3.oas.models.media.EncodingProperty;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.security.SecurityRequirement;\nimport io.swagger.v3.oas.models.security.SecurityScheme;\nimport org.apache.commons.io.FileUtils;\nimport org.testng.annotations.Test;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertFalse;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class JsonDeserializationTest {\n    private final ObjectMapper m = Json.mapper();\n\n    @Test(description = \"it should deserialize the petstore\")\n    public void testPetstore() throws IOException {\n        final String json = ResourceUtils.loadClassResource(getClass(), \"specFiles/petstore-3.0.json\");\n        final Object swagger = m.readValue(json, OpenAPI.class);\n        assertTrue(swagger instanceof OpenAPI);\n    }\n\n    @Test(description = \"it should deserialize the composition test\")\n    public void testCompositionTest() throws IOException {\n        final String json = ResourceUtils.loadClassResource(getClass(), \"specFiles/compositionTest-3.0.json\");\n        final Object deserialized = m.readValue(json, OpenAPI.class);\n        assertTrue(deserialized instanceof OpenAPI);\n        OpenAPI openAPI = (OpenAPI) deserialized;\n        Schema lizardSchema = openAPI.getComponents().getSchemas().get(\"Lizard\");\n        assertTrue(lizardSchema instanceof ComposedSchema);\n        assertEquals(((ComposedSchema) lizardSchema).getAllOf().size(), 2);\n\n        Schema petSchema = openAPI.getComponents().getSchemas().get(\"Pet\");\n        assertEquals(petSchema.getDiscriminator().getPropertyName(), \"pet_type\");\n        assertEquals(petSchema.getDiscriminator().getMapping().get(\"cachorro\"), \"#/components/schemas/Dog\");\n\n    }\n\n    @Test(description = \"it should deserialize a simple ObjectProperty\")\n    public void testObjectProperty() throws IOException {\n        final String json = \"{\\n\" +\n                \"   \\\"type\\\":\\\"object\\\",\\n\" +\n                \"   \\\"title\\\":\\\"objectProperty\\\",\\n\" +\n                \"   \\\"description\\\":\\\"top level object\\\",\\n\" +\n                \"   \\\"properties\\\":{\\n\" +\n                \"      \\\"property1\\\":{\\n\" +\n                \"         \\\"type\\\":\\\"string\\\",\\n\" +\n                \"         \\\"description\\\":\\\"First property\\\"\\n\" +\n                \"      },\\n\" +\n                \"      \\\"property2\\\":{\\n\" +\n                \"         \\\"type\\\":\\\"string\\\",\\n\" +\n                \"         \\\"description\\\":\\\"Second property\\\"\\n\" +\n                \"      },\\n\" +\n                \"      \\\"property3\\\":{\\n\" +\n                \"         \\\"type\\\":\\\"string\\\",\\n\" +\n                \"         \\\"description\\\":\\\"Third property\\\"\\n\" +\n                \"      }\\n\" +\n                \"   }\\n\" +\n                \"}\";\n        final Schema result = m.readValue(json, Schema.class);\n        assertEquals(3, result.getProperties().size());\n        assertEquals(\"objectProperty\", result.getTitle());\n    }\n\n    @Test(description = \"it should deserialize nested ObjectProperty(s)\")\n    public void testNestedObjectProperty() throws IOException {\n        final String json = \"{\\n\" +\n                \"   \\\"type\\\":\\\"object\\\",\\n\" +\n                \"   \\\"description\\\":\\\"top level object\\\",\\n\" +\n                \"   \\\"properties\\\":{\\n\" +\n                \"      \\\"property1\\\":{\\n\" +\n                \"         \\\"type\\\":\\\"string\\\",\\n\" +\n                \"         \\\"description\\\":\\\"First property\\\"\\n\" +\n                \"      },\\n\" +\n                \"      \\\"property2\\\":{\\n\" +\n                \"         \\\"type\\\":\\\"string\\\",\\n\" +\n                \"         \\\"description\\\":\\\"Second property\\\"\\n\" +\n                \"      },\\n\" +\n                \"      \\\"property3\\\":{\\n\" +\n                \"         \\\"type\\\":\\\"object\\\",\\n\" +\n                \"         \\\"description\\\":\\\"Third property\\\",\\n\" +\n                \"         \\\"properties\\\":{\\n\" +\n                \"            \\\"property1\\\":{\\n\" +\n                \"               \\\"type\\\":\\\"string\\\",\\n\" +\n                \"               \\\"description\\\":\\\"First nested property\\\"\\n\" +\n                \"            }\\n\" +\n                \"         }\\n\" +\n                \"      }\\n\" +\n                \"   }\\n\" +\n                \"}\";\n        final Schema result = m.readValue(json, Schema.class);\n        final Map<String, Schema> firstLevelProperties = result.getProperties();\n        assertEquals(firstLevelProperties.size(), 3);\n\n        final Schema property3 = firstLevelProperties.get(\"property3\");\n\n        final Map<String, Schema> secondLevelProperties = property3.getProperties();\n        assertEquals(secondLevelProperties.size(), 1);\n    }\n\n    @Test\n    public void testDeserializePetStoreFile() throws Exception {\n        TestUtils.deserializeJsonFileFromClasspath(\"specFiles/petstore.json\", OpenAPI.class);\n    }\n\n    @Test\n    public void testDeserializeCompositionTest() throws Exception {\n        TestUtils.deserializeJsonFileFromClasspath(\"specFiles/compositionTest.json\", OpenAPI.class);\n    }\n\n    @Test\n    public void testDeserializeAPathRef() throws Exception {\n        final OpenAPI oas = TestUtils.deserializeJsonFileFromClasspath(\"specFiles/pathRef.json\", OpenAPI.class);\n\n        final PathItem petPath = oas.getPaths().get(\"/pet\");\n        assertNotNull(petPath.get$ref());\n        assertEquals(petPath.get$ref(), \"http://my.company.com/paths/health.json\");\n        assertTrue(oas.getPaths().get(\"/user\") instanceof PathItem);\n    }\n\n    @Test\n    public void testDeserializeAResponseRef() throws Exception {\n        final OpenAPI oas = TestUtils.deserializeJsonFileFromClasspath(\"specFiles/responseRef.json\", OpenAPI.class);\n\n        final ApiResponses responseMap = oas.getPaths().get(\"/pet\").getPut().getResponses();\n\n        // TODO: missing response ref\n        assertIsRefResponse(responseMap.get(\"405\"), \"http://my.company.com/responses/errors.json#/method-not-allowed\");\n        assertIsRefResponse(responseMap.get(\"404\"), \"http://my.company.com/responses/errors.json#/not-found\");\n        assertTrue(responseMap.get(\"400\") instanceof ApiResponse);\n    }\n\n    private void assertIsRefResponse(Object response, String expectedRef) {\n        assertTrue(response instanceof ApiResponse);\n\n        ApiResponse refResponse = (ApiResponse) response;\n        assertEquals(refResponse.get$ref(), expectedRef);\n    }\n\n    @Test\n    public void testDeserializeSecurity() throws Exception {\n        final OpenAPI swagger = TestUtils.deserializeJsonFileFromClasspath(\"specFiles/securityDefinitions.json\", OpenAPI.class);\n\n        final List<SecurityRequirement> security = swagger.getSecurity();\n        assertNotNull(security);\n        assertEquals(security.size(), 3);\n\n        final Map<String, SecurityScheme> securitySchemes = swagger.getComponents().getSecuritySchemes();\n        assertNotNull(securitySchemes);\n        assertEquals(securitySchemes.size(), 4);\n\n        {\n            final SecurityScheme scheme = securitySchemes.get(\"petstore_auth\");\n            assertNotNull(scheme);\n            assertEquals(scheme.getType().toString(), \"oauth2\");\n            assertEquals(scheme.getFlows().getImplicit().getAuthorizationUrl(), \"http://petstore.swagger.io/oauth/dialog\");\n            assertEquals(scheme.getFlows().getImplicit().getScopes().get(\"write:pets\"), \"modify pets in your account\");\n            assertEquals(scheme.getFlows().getImplicit().getScopes().get(\"read:pets\"), \"read your pets\");\n        }\n\n        {\n            final SecurityScheme scheme = securitySchemes.get(\"api_key\");\n            assertNotNull(scheme);\n            assertEquals(scheme.getType().toString(), \"apiKey\");\n            assertEquals(scheme.getIn().toString(), \"header\");\n            assertEquals(scheme.getName(), \"api_key\");\n        }\n\n        {\n            final SecurityScheme scheme = securitySchemes.get(\"http\");\n            assertNotNull(scheme);\n            assertEquals(scheme.getType().toString(), \"http\");\n            assertEquals(scheme.getScheme(), \"basic\");\n        }\n\n        {\n            final SecurityScheme scheme = securitySchemes.get(\"open_id_connect\");\n            assertNotNull(scheme);\n            assertEquals(scheme.getType().toString(), \"openIdConnect\");\n            assertEquals(scheme.getOpenIdConnectUrl(), \"http://petstore.swagger.io/openid\");\n        }\n\n        {\n            final SecurityRequirement securityRequirement = security.get(0);\n            final List<String> scopes = securityRequirement.get(\"petstore_auth\");\n            assertNotNull(scopes);\n            assertEquals(scopes.size(), 2);\n            assertTrue(scopes.contains(\"write:pets\"));\n            assertTrue(scopes.contains(\"read:pets\"));\n\n        }\n\n        {\n            final SecurityRequirement securityRequirement = security.get(1);\n            final List<String> scopes = securityRequirement.get(\"api_key\");\n            assertNotNull(scopes);\n            assertTrue(scopes.isEmpty());\n\n        }\n\n        {\n            final SecurityRequirement securityRequirement = security.get(2);\n            final List<String> scopes = securityRequirement.get(\"http\");\n            assertNotNull(scopes);\n            assertTrue(scopes.isEmpty());\n\n        }\n    }\n\n    @Test(description = \"it should deserialize a Header with style\")\n    public void deserializeHeaderWithStyle() throws IOException {\n        final String json = \"{\\\"description\\\":\\\"aaaa\\\",\\\"style\\\":\\\"simple\\\"}\";\n        final Header p = m.readValue(json, Header.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should deserialize an Encoding with style\")\n    public void deserializeEncodingWithStyle() throws IOException {\n        final String json = \"{\\\"style\\\":\\\"spaceDelimited\\\"}\";\n        final Encoding p = m.readValue(json, Encoding.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should deserialize an EncodingProperty with style\")\n    public void deserializeEncodingPropertyWithStyle() throws IOException {\n        final String json = \"{\\\"style\\\":\\\"spaceDelimited\\\"}\";\n        final EncodingProperty p = m.readValue(json, EncodingProperty.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should desserialize Long schema correctly\")\n    public void deserializeLongSchema() throws IOException {\n\n        final String jsonString = ResourceUtils.loadClassResource(getClass(), \"specFiles/oas3_2.yaml\");\n        final OpenAPI swagger = Yaml.mapper().readValue(jsonString, OpenAPI.class);\n        assertNotNull(swagger);\n        Schema s = swagger.getPaths().get(\"/withIntegerEnum/{stage}\").getGet().getParameters().get(0).getSchema();\n        assertEquals(s.getEnum().get(0), 2147483647);\n        assertEquals(s.getEnum().get(1), 3147483647L);\n        assertEquals(s.getEnum().get(2), 31474836475505055L);\n        assertEquals(s.getEnum().get(3), -9223372036854775808L);\n    }\n\n    @Test\n    public void deserializeDateExample() throws IOException {\n\n        final String jsonString = ResourceUtils.loadClassResource(getClass(), \"specFiles/swos-126.yaml\");\n        final OpenAPI swagger = Yaml.mapper().readValue(jsonString, OpenAPI.class);\n        assertNotNull(swagger);\n        Map<String, Schema> props = swagger.getComponents().getSchemas().get(\"MyModel\").getProperties();\n        assertTrue(Yaml.pretty().writeValueAsString(props.get(\"date\")).contains(\"example: 2019-08-05\"));\n        assertTrue(Yaml.pretty().writeValueAsString(props.get(\"dateTime\")).contains(\"example: 2019-08-05T12:34:56Z\"));\n\n    }\n\n    @Test(description = \"Deserialize ref callback\")\n    public void testDeserializeRefCallback() throws Exception {\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  description: info\\n\" +\n                \"paths:\\n\" +\n                \"  /simplecallback:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"      callbacks:\\n\" +\n                \"        testCallback1:\\n\" +\n                \"          $ref: \\\"#/components/callbacks/Callback\\\"\\n\" +\n                \"      callbacks:\\n\" +\n                \"        testCallback1:\\n\" +\n                \"          $ref: \\\"#/components/callbacks/Callback\\\"\\n\" +\n                \"components:\\n\" +\n                \"  callbacks:\\n\" +\n                \"    Callback:\\n\" +\n                \"      /post:\\n\" +\n                \"        description: Post Path Item\\n\";\n\n        OpenAPI oas = Yaml.mapper().readValue(yaml, OpenAPI.class);\n        assertEquals(oas.getPaths().get(\"/simplecallback\").getGet().getCallbacks().get(\"testCallback1\").get$ref(), \"#/components/callbacks/Callback\");\n    }\n\n    @Test(description = \"Deserialize null enum item\")\n    public void testNullEnumItem() throws Exception {\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      tags:\\n\" +\n                \"      - MyTag\\n\" +\n                \"      summary: Operation Summary\\n\" +\n                \"      description: Operation Description\\n\" +\n                \"      operationId: operationId\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: subscriptionId\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    UserStatus:\\n\" +\n                \"      type: integer\\n\" +\n                \"      description: some int values with null\\n\" +\n                \"      format: int32\\n\" +\n                \"      enum:\\n\" +\n                \"      - 1\\n\" +\n                \"      - 2\\n\" +\n                \"      - null\\n\";\n\n        OpenAPI oas = Yaml.mapper().readValue(yaml, OpenAPI.class);\n\n        assertEquals(oas.getComponents().getSchemas().get(\"UserStatus\").getEnum(), Arrays.asList(1, 2, null));\n\n        yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      tags:\\n\" +\n                \"      - MyTag\\n\" +\n                \"      summary: Operation Summary\\n\" +\n                \"      description: Operation Description\\n\" +\n                \"      operationId: operationId\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: subscriptionId\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    UserStatus:\\n\" +\n                \"      type: string\\n\" +\n                \"      description: some int values with null\\n\" +\n                \"      enum:\\n\" +\n                \"      - 1\\n\" +\n                \"      - 2\\n\" +\n                \"      - null\\n\";\n\n        oas = Yaml.mapper().readValue(yaml, OpenAPI.class);\n\n        assertEquals(oas.getComponents().getSchemas().get(\"UserStatus\").getEnum(), Arrays.asList(\"1\", \"2\", null));\n    }\n\n    @Test\n    public void testNullExampleDeserialization() throws Exception {\n        String yamlNull = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      description: Operation Description\\n\" +\n                \"      operationId: operationId\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    UserStatus:\\n\" +\n                \"      type: string\\n\" +\n                \"      example: null\\n\";\n\n        String yamlMissing = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      description: Operation Description\\n\" +\n                \"      operationId: operationId\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    UserStatus:\\n\" +\n                \"      type: string\\n\";\n\n        OpenAPI oas = Yaml.mapper().readValue(yamlNull, OpenAPI.class);\n        Yaml.prettyPrint(oas);\n        assertNull(oas.getComponents().getSchemas().get(\"UserStatus\").getExample());\n        assertTrue(oas.getComponents().getSchemas().get(\"UserStatus\").getExampleSetFlag());\n\n        oas = Yaml.mapper().readValue(yamlMissing, OpenAPI.class);\n        Yaml.prettyPrint(oas);\n        assertNull(oas.getComponents().getSchemas().get(\"UserStatus\").getExample());\n        assertFalse(oas.getComponents().getSchemas().get(\"UserStatus\").getExampleSetFlag());\n        Yaml.prettyPrint(oas);\n    }\n\n    @Test\n    public void testNullExampleAndValues() throws Exception {\n        String yamlNull = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      description: Operation Description\\n\" +\n                \"      operationId: operationId\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    UserStatus:\\n\" +\n                \"      type: object\\n\" +\n                \"      example: null\\n\";\n\n        String yamlMissing = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      description: Operation Description\\n\" +\n                \"      operationId: operationId\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    UserStatus:\\n\" +\n                \"      type: object\\n\";\n\n        String yamlNotNull = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      description: Operation Description\\n\" +\n                \"      operationId: operationId\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    UserStatus:\\n\" +\n                \"      type: object\\n\" +\n                \"      example:\\n\" +\n                \"        value: bar\\n\";\n\n        String yamlValueNull = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      description: Operation Description\\n\" +\n                \"      operationId: operationId\\n\" +\n                \"components:\\n\" +\n                \"  examples:\\n\" +\n                \"    UserStatus:\\n\" +\n                \"      summary: string\\n\" +\n                \"      value: null\\n\";\n\n        String yamlValueMissing = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      description: Operation Description\\n\" +\n                \"      operationId: operationId\\n\" +\n                \"components:\\n\" +\n                \"  examples:\\n\" +\n                \"    UserStatus:\\n\" +\n                \"      summary: string\\n\";\n\n        String yamlValueNotNull = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      description: Operation Description\\n\" +\n                \"      operationId: operationId\\n\" +\n                \"components:\\n\" +\n                \"  examples:\\n\" +\n                \"    UserStatus:\\n\" +\n                \"      summary: string\\n\" +\n                \"      value: bar\\n\";\n\n        OpenAPI oas = Yaml.mapper().readValue(yamlNull, OpenAPI.class);\n        Yaml.prettyPrint(oas);\n\n        assertNull(oas.getComponents().getSchemas().get(\"UserStatus\").getExample());\n        assertTrue(oas.getComponents().getSchemas().get(\"UserStatus\").getExampleSetFlag());\n        assertEquals(Yaml.pretty(oas), yamlNull);\n\n        oas = Yaml.mapper().readValue(yamlMissing, OpenAPI.class);\n        Yaml.prettyPrint(oas);\n        assertNull(oas.getComponents().getSchemas().get(\"UserStatus\").getExample());\n        assertFalse(oas.getComponents().getSchemas().get(\"UserStatus\").getExampleSetFlag());\n        assertEquals(Yaml.pretty(oas), yamlMissing);\n\n        oas = Yaml.mapper().readValue(yamlNotNull, OpenAPI.class);\n        Yaml.prettyPrint(oas);\n        assertNotNull(oas.getComponents().getSchemas().get(\"UserStatus\").getExample());\n        assertTrue(oas.getComponents().getSchemas().get(\"UserStatus\").getExampleSetFlag());\n        assertEquals(Yaml.pretty(oas), yamlNotNull);\n\n        oas = Yaml.mapper().readValue(yamlValueNull, OpenAPI.class);\n        Yaml.prettyPrint(oas);\n        Example ex = oas.getComponents().getExamples().get(\"UserStatus\");\n        assertNull(ex.getValue());\n        assertTrue(ex.getValueSetFlag());\n        assertEquals(Yaml.pretty(oas), yamlValueNull);\n\n        oas = Yaml.mapper().readValue(yamlValueMissing, OpenAPI.class);\n        Yaml.prettyPrint(oas);\n        ex = oas.getComponents().getExamples().get(\"UserStatus\");\n        assertNull(ex.getValue());\n        assertFalse(ex.getValueSetFlag());\n        assertEquals(Yaml.pretty(oas), yamlValueMissing);\n\n        oas = Yaml.mapper().readValue(yamlValueNotNull, OpenAPI.class);\n        Yaml.prettyPrint(oas);\n        ex = oas.getComponents().getExamples().get(\"UserStatus\");\n        assertNotNull(ex.getValue());\n        assertTrue(ex.getValueSetFlag());\n        assertEquals(Yaml.pretty(oas), yamlValueNotNull);\n    }\n\n    @Test\n    public void testExampleDeserializationOnMediaType() throws Exception {\n        String content = FileUtils.readFileToString(new File(\"src/test/resources/specFiles/media-type-null-example.yaml\"), \"UTF-8\");\n        OpenAPI openAPI = Yaml.mapper().readValue(content, OpenAPI.class);\n\n        assertNull(openAPI.getPaths().get(\"/pets/{petId}\").getGet().getResponses().get(\"200\").getContent().get(\"application/json\").getExample());\n        assertTrue(openAPI.getPaths().get(\"/pets/{petId}\").getGet().getResponses().get(\"200\").getContent().get(\"application/json\").getExampleSetFlag());\n\n        assertNull(openAPI.getPaths().get(\"/pet\").getPost().getResponses().get(\"200\").getContent().get(\"application/json\").getExample());\n        assertFalse(openAPI.getPaths().get(\"/pet\").getPost().getResponses().get(\"200\").getContent().get(\"application/json\").getExampleSetFlag());\n\n        assertNotNull(openAPI.getPaths().get(\"/pet\").getPost().getRequestBody().getContent().get(\"application/json\").getExample());\n\n        assertTrue(openAPI.getPaths().get(\"/pet\").getPost().getRequestBody().getContent().get(\"application/json\").getExampleSetFlag());\n    }\n\n    @Test\n    public void testDateSchemaSerialization() throws Exception {\n        String content = FileUtils.readFileToString(new File(\"src/test/resources/dateSchema.yaml\"), \"UTF-8\");\n        OpenAPI openAPI = Yaml.mapper().readValue(content, OpenAPI.class);\n        Yaml.prettyPrint(openAPI);\n        SerializationMatchers.assertEqualsToYaml(openAPI, \"openapi: 3.0.3\\n\" +\n                \"info:\\n\" +\n                \"  title: Simple Inventory API\\n\" +\n                \"  version: 1.0.0\\n\" +\n                \"paths:\\n\" +\n                \"  /inventory:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: searchInventory\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: test\\n\" +\n                \"        in: header\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"          format: date\\n\" +\n                \"          enum:\\n\" +\n                \"          - 2023-12-12\\n\" +\n                \"          default: 2023-12-12\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: search results matching criteria\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: array\\n\" +\n                \"                items:\\n\" +\n                \"                  $ref: \\\"#/components/schemas/InventoryItem\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    InventoryItem:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        releaseDate:\\n\" +\n                \"          type: string\\n\" +\n                \"          format: date-time\\n\" +\n                \"          example: 2016-08-29T09:12:33.001Z\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/deserialization/ObjectPropertyTest.java",
    "content": "package io.swagger.v3.core.deserialization;\n\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.oas.models.media.ObjectSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class ObjectPropertyTest {\n    @Test(description = \"convert a model with object properties\")\n    public void readModelWithObjectProperty() throws IOException {\n        String json = \"{\" +\n                \"   \\\"properties\\\":{\" +\n                \"      \\\"id\\\":{\" +\n                \"         \\\"type\\\":\\\"string\\\"\" +\n                \"      },\" +\n                \"      \\\"someObject\\\":{\" +\n                \"         \\\"type\\\":\\\"object\\\",\" +\n                \"        \\\"x-foo\\\": \\\"vendor x\\\",\" +\n                \"         \\\"properties\\\":{\" +\n                \"            \\\"innerId\\\":{\" +\n                \"               \\\"type\\\":\\\"string\\\"\" +\n                \"            }\" +\n                \"         }\" +\n                \"      }\" +\n                \"   }\" +\n                \"}\";\n\n        Schema model = Json.mapper().readValue(json, Schema.class);\n\n        Schema p = (Schema) model.getProperties().get(\"someObject\");\n        assertTrue(p instanceof ObjectSchema);\n\n        ObjectSchema op = (ObjectSchema) p;\n\n        Schema sp = op.getProperties().get(\"innerId\");\n        assertTrue(sp instanceof StringSchema);\n\n        assertTrue(op.getExtensions() != null);\n        assertNotNull(op.getExtensions().get(\"x-foo\"));\n        assertEquals(op.getExtensions().get(\"x-foo\"), \"vendor x\");\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/deserialization/OpenAPI3_1DeserializationTest.java",
    "content": "package io.swagger.v3.core.deserialization;\n\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.core.util.ResourceUtils;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.core.util.Yaml31;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.JsonSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertFalse;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\n\npublic class OpenAPI3_1DeserializationTest {\n\n    @Test\n    public void deserializePetstore3_1() throws IOException {\n\n        final String jsonString = ResourceUtils.loadClassResource(getClass(), \"specFiles/3.1.0/petstore-3.1.yaml\");\n        final OpenAPI swagger = Yaml31.mapper().readValue(jsonString, OpenAPI.class);\n        assertNotNull(swagger);\n        assertEquals(swagger.getInfo().getLicense().getIdentifier(), \"test\");\n    }\n\n    @Test\n    public void deserializePetstore3_1More() throws IOException {\n\n        final String jsonString = ResourceUtils.loadClassResource(getClass(), \"specFiles/3.1.0/petstore-3.1_more.yaml\");\n        final OpenAPI swagger = Yaml31.mapper().readValue(jsonString, OpenAPI.class);\n        assertNotNull(swagger);\n        assertEquals(swagger.getInfo().getLicense().getIdentifier(), \"test\");\n    }\n\n\n    @Test\n    public void deserializePetstore3_0() throws IOException {\n\n        final String jsonString = ResourceUtils.loadClassResource(getClass(), \"specFiles/petstore-3.0.yaml\");\n        final OpenAPI swagger = Yaml.mapper().readValue(jsonString, OpenAPI.class);\n        assertNotNull(swagger);\n        assertNull(swagger.getInfo().getLicense().getIdentifier());\n    }\n\n    @Test\n    public void deserializeChangelog3_1() throws IOException {\n\n        final String jsonString = ResourceUtils.loadClassResource(getClass(), \"specFiles/3.1.0/changelog-3.1.yaml\");\n        final OpenAPI swagger = Yaml31.mapper().readValue(jsonString, OpenAPI.class);\n        assertNotNull(swagger);\n        assertEquals(swagger.getInfo().getLicense().getIdentifier(), \"test\");\n        Yaml31.prettyPrint(swagger);\n        SerializationMatchers.assertEqualsToYaml31(swagger, jsonString);\n    }\n\n    @Test\n    public void testDeserializationOnOAS31() throws IOException {\n\n        final String jsonString = ResourceUtils.loadClassResource(getClass(), \"specFiles/3.1.0/petstore-3.1_sample.yaml\");\n        OpenAPI openAPI = Yaml31.mapper().readValue(jsonString, OpenAPI.class);\n        assertNotNull(openAPI);\n\n        assertEquals(openAPI.getInfo().getTitle(), \"Swagger Petstore\");\n        assertEquals(openAPI.getInfo().getVersion(), \"1.0.0\");\n        assertEquals(openAPI.getInfo().getSummary(), \"petstore sample for OAS 3.1.0\");\n        assertEquals(openAPI.getInfo().getLicense().getName(), \"MIT\");\n        assertEquals(openAPI.getInfo().getLicense().getIdentifier(), \"test\");\n\n        assertNotNull(openAPI.getWebhooks());\n        assertFalse(openAPI.getWebhooks().isEmpty());\n        assertNotNull(openAPI.getWebhooks().get(\"newPet\"));\n        assertNotNull(openAPI.getWebhooks().get(\"newPet\").getPost());\n\n        assertNotNull(openAPI.getComponents().getPathItems());\n        assertNotNull(openAPI.getComponents().getPathItems().get(\"/pet\"));\n        assertEquals(openAPI.getComponents().getPathItems().get(\"/pet\").getDescription(), \"get a pet\");\n        assertNotNull(openAPI.getComponents().getPathItems().get(\"/pet\").getGet());\n        assertEquals(openAPI.getComponents().getPathItems().get(\"/pet\").getGet().getOperationId(), \"getPet\");\n\n        assertNotNull(openAPI.getComponents().getSchemas());\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"Pet\"));\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"Pet\").getDiscriminator());\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"Pet\").getDiscriminator().getExtensions());\n        assertEquals(openAPI.getComponents().getSchemas().get(\"Pet\").getDiscriminator().getExtensions().get(\"x-test-extension\"), \"extended\");\n\n        assertNotNull(openAPI.getComponents().getResponses());\n        assertNotNull(openAPI.getComponents().getResponses().get(\"201\"));\n        assertEquals(openAPI.getComponents().getResponses().get(\"201\").getDescription(), \"api response description\");\n\n        assertNotNull(openAPI.getComponents().getParameters());\n        assertNotNull(openAPI.getComponents().getParameters().get(\"param\"));\n        assertEquals(openAPI.getComponents().getParameters().get(\"param\").getIn(), \"query\");\n        assertEquals(openAPI.getComponents().getParameters().get(\"param\").getName(), \"param0\");\n        assertEquals(openAPI.getComponents().getParameters().get(\"param\").getDescription(), \"parameter description\");\n\n        assertNotNull(openAPI.getComponents().getExamples());\n        assertNotNull(openAPI.getComponents().getExamples().get(\"example\"));\n        assertEquals(openAPI.getComponents().getExamples().get(\"example\").getDescription(), \"example description\");\n        assertEquals(openAPI.getComponents().getExamples().get(\"example\").getSummary(), \"example summary\");\n        assertEquals(openAPI.getComponents().getExamples().get(\"example\").getValue(), \"This is an example\");\n\n        assertNotNull(openAPI.getComponents().getRequestBodies());\n        assertNotNull(openAPI.getComponents().getRequestBodies().get(\"body\"));\n\n        assertNotNull(openAPI.getComponents().getHeaders());\n        assertNotNull(openAPI.getComponents().getHeaders().get(\"test-head\"));\n        assertEquals(openAPI.getComponents().getHeaders().get(\"test-head\").getDescription(), \"test header description\");\n\n        assertNotNull(openAPI.getComponents().getSecuritySchemes());\n        assertNotNull(openAPI.getComponents().getSecuritySchemes().get(\"basic\"));\n        assertEquals(openAPI.getComponents().getSecuritySchemes().get(\"basic\").getDescription(), \"security description\");\n        assertEquals(openAPI.getComponents().getSecuritySchemes().get(\"basic\").getType().toString(), \"http\");\n\n        assertNotNull(openAPI.getComponents().getLinks());\n        assertNotNull(openAPI.getComponents().getLinks().get(\"Link\"));\n        assertEquals(openAPI.getComponents().getLinks().get(\"Link\").getOperationRef(), \"#/paths/~12.0~1repositories~1{username}/get\");\n\n        assertNotNull(openAPI.getComponents().getCallbacks());\n        assertNotNull(openAPI.getComponents().getCallbacks().get(\"TestCallback\"));\n\n        openAPI = Yaml.mapper().readValue(jsonString, OpenAPI.class);\n        assertNotNull(openAPI);\n\n        assertNull(openAPI.getInfo().getSummary());\n        assertNull(openAPI.getWebhooks());\n        assertNull(openAPI.getComponents().getPathItems());\n        assertNull(openAPI.getComponents().getSchemas().get(\"Pet\").getDiscriminator().getExtensions());\n\n    }\n\n    @Test\n    public void testDeserializationOnOAS30() throws IOException {\n\n        final String jsonString = ResourceUtils.loadClassResource(getClass(), \"specFiles/3.1.0/petstore-3.1_sample.yaml\");\n        OpenAPI openAPI = Yaml.mapper().readValue(jsonString, OpenAPI.class);\n        assertNotNull(openAPI);\n\n        assertEquals(openAPI.getInfo().getTitle(), \"Swagger Petstore\");\n        assertEquals(openAPI.getInfo().getVersion(), \"1.0.0\");\n        assertNull(openAPI.getInfo().getSummary());\n        assertEquals(openAPI.getInfo().getLicense().getName(), \"MIT\");\n        assertNull(openAPI.getInfo().getLicense().getIdentifier());\n\n        assertNull(openAPI.getWebhooks());\n\n        assertNull(openAPI.getComponents().getPathItems());\n\n        assertNotNull(openAPI.getComponents().getSchemas());\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"Pet\"));\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"Pet\").getDiscriminator());\n        assertNull(openAPI.getComponents().getSchemas().get(\"Pet\").getDiscriminator().getExtensions());\n\n        assertNotNull(openAPI.getComponents().getResponses());\n        assertNotNull(openAPI.getComponents().getResponses().get(\"201\"));\n        assertEquals(openAPI.getComponents().getResponses().get(\"201\").getDescription(), \"api response description\");\n\n        assertNotNull(openAPI.getComponents().getParameters());\n        assertNotNull(openAPI.getComponents().getParameters().get(\"param\"));\n        assertEquals(openAPI.getComponents().getParameters().get(\"param\").getIn(), \"query\");\n        assertEquals(openAPI.getComponents().getParameters().get(\"param\").getName(), \"param0\");\n        assertEquals(openAPI.getComponents().getParameters().get(\"param\").getDescription(), \"parameter description\");\n\n        assertNotNull(openAPI.getComponents().getExamples());\n        assertNotNull(openAPI.getComponents().getExamples().get(\"example\"));\n        assertEquals(openAPI.getComponents().getExamples().get(\"example\").getDescription(), \"example description\");\n        assertEquals(openAPI.getComponents().getExamples().get(\"example\").getSummary(), \"example summary\");\n        assertEquals(openAPI.getComponents().getExamples().get(\"example\").getValue(), \"This is an example\");\n\n        assertNotNull(openAPI.getComponents().getRequestBodies());\n        assertNotNull(openAPI.getComponents().getRequestBodies().get(\"body\"));\n\n        assertNotNull(openAPI.getComponents().getHeaders());\n        assertNotNull(openAPI.getComponents().getHeaders().get(\"test-head\"));\n        assertEquals(openAPI.getComponents().getHeaders().get(\"test-head\").getDescription(), \"test header description\");\n\n        assertNotNull(openAPI.getComponents().getSecuritySchemes());\n        assertNotNull(openAPI.getComponents().getSecuritySchemes().get(\"basic\"));\n        assertEquals(openAPI.getComponents().getSecuritySchemes().get(\"basic\").getDescription(), \"security description\");\n        assertEquals(openAPI.getComponents().getSecuritySchemes().get(\"basic\").getType().toString(), \"http\");\n\n        assertNotNull(openAPI.getComponents().getLinks());\n        assertNotNull(openAPI.getComponents().getLinks().get(\"Link\"));\n        assertEquals(openAPI.getComponents().getLinks().get(\"Link\").getOperationRef(), \"#/paths/~12.0~1repositories~1{username}/get\");\n\n        assertNotNull(openAPI.getComponents().getCallbacks());\n        assertNotNull(openAPI.getComponents().getCallbacks().get(\"TestCallback\"));\n\n        openAPI = Yaml.mapper().readValue(jsonString, OpenAPI.class);\n        assertNotNull(openAPI);\n    }\n\n    @Test\n    public void testRefDeserializationOnOAS31() throws IOException {\n        final String jsonString = ResourceUtils.loadClassResource(getClass(), \"specFiles/3.1.0/petstore-3.1_refs_siblings.yaml\");\n        OpenAPI openAPI = Yaml31.mapper().readValue(jsonString, OpenAPI.class);\n\n\n        assertEquals(openAPI.getPaths().get(\"/ref_pet\").get$ref(), \"#/components/pathItems/pet\");\n        assertEquals(openAPI.getPaths().get(\"/ref_pet\").getDescription(), \"ref pathItem description\");\n        assertEquals(openAPI.getPaths().get(\"/ref_pet\").getSummary(), \"ref pathItem summary\");\n\n        assertEquals(openAPI.getPaths().get(\"/pets\").getPost().getParameters().get(0).get$ref(), \"#/components/parameters/testParameter\");\n        assertEquals(openAPI.getPaths().get(\"/pets\").getPost().getParameters().get(0).getDescription(), \"ref parameter description\");\n\n        assertEquals(openAPI.getPaths().get(\"/pets\").getPost().getParameters().get(1).getName(), \"randomParam\");\n        assertEquals(openAPI.getPaths().get(\"/pets\").getPost().getParameters().get(1).getIn(), \"query\");\n        assertEquals(openAPI.getPaths().get(\"/pets\").getPost().getParameters().get(1).getExamples().get(\"refExample\").get$ref(), \"#/components/examples/testExample\");\n        assertEquals(openAPI.getPaths().get(\"/pets\").getPost().getParameters().get(1).getExamples().get(\"refExample\").getDescription(), \"ref example description\");\n        assertEquals(openAPI.getPaths().get(\"/pets\").getPost().getParameters().get(1).getExamples().get(\"refExample\").getSummary(), \"ref example summary\");\n\n        assertEquals(openAPI.getPaths().get(\"/pets\").getPost().getCallbacks().get(\"callIt\").get$ref(), \"#/components/callbacks/TestCallback\");\n\n        assertEquals(openAPI.getPaths().get(\"/pets\").getPost().getRequestBody().get$ref(), \"#/components/requestBodies/body\");\n        assertEquals(openAPI.getPaths().get(\"/pets\").getPost().getRequestBody().getDescription(), \"ref request body description\");\n\n        assertEquals(openAPI.getPaths().get(\"/pets\").getPost().getResponses().get(\"201\").get$ref(), \"#/components/responses/okResponse\");\n        assertEquals(openAPI.getPaths().get(\"/pets\").getPost().getResponses().get(\"201\").getDescription(), \"ref response description\");\n\n        assertEquals(openAPI.getPaths().get(\"/pets\").getPost().getResponses().get(\"default\").getHeaders().get(\"head\").get$ref(), \"#/components/headers/head\");\n        assertEquals(openAPI.getPaths().get(\"/pets\").getPost().getResponses().get(\"default\").getHeaders().get(\"head\").getDescription(), \"ref header description\");\n\n    }\n\n    @Test\n    public void testBooleanSchemaDeserialization() throws Exception{\n        OpenAPI openAPI = new OpenAPI()\n                .openapi(\"3.1.0\")\n                .components(new Components().addSchemas(\"test\", new Schema().booleanSchemaValue(true)));\n\n        String json = Json31.pretty(openAPI);\n        String yaml = Yaml31.pretty(openAPI);\n        OpenAPI oas = Json31.mapper().readValue(json, OpenAPI.class);\n        assertEquals(oas.getComponents().getSchemas().get(\"test\").getBooleanSchemaValue(), Boolean.TRUE);\n        Schema schema = Json31.mapper().readValue(\"true\", Schema.class);\n        assertEquals(schema.getBooleanSchemaValue(), Boolean.TRUE);\n        oas = Yaml31.mapper().readValue(yaml, OpenAPI.class);\n        assertEquals(oas.getComponents().getSchemas().get(\"test\").getBooleanSchemaValue(), Boolean.TRUE);\n        schema = Yaml31.mapper().readValue(\"true\", Schema.class);\n        assertEquals(schema.getBooleanSchemaValue(), Boolean.TRUE);\n\n        json = Json.pretty(openAPI);\n        yaml = Yaml.pretty(openAPI);\n        oas = Json.mapper().readValue(json, OpenAPI.class);\n        assertNull(oas.getComponents().getSchemas().get(\"test\").getBooleanSchemaValue());\n        oas = Yaml.mapper().readValue(yaml, OpenAPI.class);\n        assertNull(oas.getComponents().getSchemas().get(\"test\").getBooleanSchemaValue());\n    }\n\n    @Test\n    public void testDynamicRefDeserializationOnOAS31() throws IOException {\n        final String jsonString = ResourceUtils.loadClassResource(getClass(), \"specFiles/3.1.0/specWithDynamicRef.yaml\");\n        OpenAPI openAPI = Yaml31.mapper().readValue(jsonString, OpenAPI.class);\n        assertNotNull(openAPI);\n\n        Schema baseNodeSchema = openAPI.getComponents().getSchemas().get(\"BaseNode\");\n        assertNotNull(baseNodeSchema);\n        assertNotNull(baseNodeSchema.getProperties().get(\"children\"));\n        JsonSchema childrenSchema = (JsonSchema) baseNodeSchema.getProperties().get(\"children\");\n        assertEquals(childrenSchema.getItems().get$dynamicRef(), \"#node\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/deserialization/ParameterDeSerializationTest.java",
    "content": "package io.swagger.v3.core.deserialization;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\nimport java.util.Arrays;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertTrue;\n\npublic class ParameterDeSerializationTest {\n    private final ObjectMapper m = Json.mapper();\n\n    @Test(description = \"it should deserialize a QueryParameter\")\n    public void deserializeQueryParameter() throws IOException {\n        final String json = \"{\\\"in\\\":\\\"query\\\",\\\"required\\\":false,\\\"schema\\\":{\\\"type\\\":\\\"string\\\"}}\";\n        final Parameter p = m.readValue(json, Parameter.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should deserialize a QueryParameter with style\")\n    public void deserializeQueryParameterWithStyle() throws IOException {\n        final String json = \"{\\\"in\\\":\\\"query\\\",\\\"style\\\":\\\"form\\\",\\\"required\\\":false,\\\"schema\\\":{\\\"type\\\":\\\"string\\\"}}\";\n        final Parameter p = m.readValue(json, Parameter.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should deserialize a QueryParameter with array\")\n    public void deserializeArrayQueryParameter() throws IOException {\n        final String json = \"{\" +\n                \"   \\\"in\\\":\\\"query\\\",\" +\n                \"   \\\"required\\\":false,\" +\n                \"   \\\"schema\\\":{\" +\n                \"     \\\"type\\\":\\\"array\\\",\" +\n                \"     \\\"items\\\":{\" +\n                \"        \\\"type\\\":\\\"string\\\"\" +\n                \"     }\" +\n                \"   }\" +\n                \"}\";\n        final Parameter p = m.readValue(json, Parameter.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should deserialize a PathParameter\")\n    public void deserializePathParameter() throws IOException {\n        final String json = \"{\\\"in\\\":\\\"query\\\",\\\"required\\\":true,\\\"schema\\\":{\\\"type\\\":\\\"string\\\"}}\";\n        final Parameter p = m.readValue(json, Parameter.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n        assertTrue(p.getRequired());\n    }\n\n    @Test(description = \"it should deserialize a PathParameter with string array\")\n    public void deserializeStringArrayPathParameter() throws IOException {\n        final String json = \"{\\\"in\\\":\\\"path\\\",\\\"required\\\":true,\\\"schema\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\"}}}\";\n        final Parameter p = m.readValue(json, Parameter.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should deserialize a PathParameter with integer array \")\n    public void deserializeIntegerArrayPathParameter() throws IOException {\n        final String json = \"{\" +\n                \"   \\\"in\\\":\\\"path\\\",\" +\n                \"   \\\"required\\\":true,\" +\n                \"   \\\"schema\\\":{\" +\n                \"   \\\"type\\\":\\\"array\\\",\" +\n                \"   \\\"items\\\":{\" +\n                \"      \\\"type\\\":\\\"integer\\\",\" +\n                \"      \\\"format\\\":\\\"int32\\\"\" +\n                \"   }}\" +\n                \"}\";\n        final Parameter p = m.readValue(json, Parameter.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should deserialize a HeaderParameter\")\n    public void deserializeHeaderParameter() throws IOException {\n        final String json = \"{\\\"in\\\":\\\"header\\\",\\\"required\\\":true,\\\"schema\\\":{\\\"type\\\":\\\"string\\\"}}\";\n        final Parameter p = m.readValue(json, Parameter.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should deserialize a string array HeaderParameter\")\n    public void deserializeStringArrayHeaderParameter() throws IOException {\n        final String json = \"{\\\"in\\\":\\\"header\\\",\\\"required\\\":true,\\\"schema\\\":{\\\"type\\\":\\\"string\\\"}}\";\n        final Parameter p = m.readValue(json, Parameter.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should deserialize a BodyParameter\")\n    public void deserializeBodyParameter() throws IOException {\n\n        final String json =\n                \"{\\\"content\\\":{\" +\n                        \"  \\\"*/*\\\":{\" +\n                        \"    \\\"schema\\\":{\" +\n                        \"      \\\"type\\\":\\\"string\\\"}}}}\";\n        final RequestBody p = m.readValue(json, RequestBody.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should deserialize a read only parameter\")\n    public void deserializeReadOnlyParameter() throws IOException {\n        final String json =\n                \"{\\\"in\\\":\\\"path\\\",\" +\n                        \"\\\"content\\\":{\" +\n                        \"  \\\"*/*\\\":{\" +\n                        \"    \\\"schema\\\":{\" +\n                        \"      \\\"type\\\":\\\"string\\\",\" +\n                        \"      \\\"readOnly\\\":true}}}}\";\n        final Parameter p = m.readValue(json, Parameter.class);\n        assertTrue(p.getContent().get(\"*/*\").getSchema().getReadOnly());\n    }\n\n    @Test(description = \"it should deserialize an array BodyParameter\")\n    public void deserializeArrayBodyParameter() throws IOException {\n        final String json = \"{\\\"content\\\":{\\\"*/*\\\":{\\\"schema\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"$ref\\\":\\\"#/definitions/Cat\\\"}}}}}\";\n        final RequestBody p = m.readValue(json, RequestBody.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should deserialize a path parameter with enum\")\n    public void deserializeEnumPathParameter() throws IOException {\n        final String json = \"{\" +\n                \"   \\\"in\\\":\\\"path\\\",\" +\n                \"   \\\"required\\\":true,\" +\n                \"   \\\"schema\\\":{\" +\n                \"     \\\"type\\\":\\\"array\\\",\" +\n                \"     \\\"items\\\":{\" +\n                \"        \\\"type\\\":\\\"string\\\",\" +\n                \"        \\\"enum\\\":[\\\"a\\\",\\\"b\\\",\\\"c\\\"]\" +\n                \"     }\" +\n                \"}}\";\n        final Parameter p = m.readValue(json, Parameter.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n\n        ArraySchema as = (ArraySchema) p.getSchema();\n        assertEquals(((StringSchema) as.getItems()).getEnum(), Arrays.asList(\"a\", \"b\", \"c\"));\n    }\n\n    @Test(description = \"it should deserialize a number path parameter with enum\")\n    public void deserializeNumberEnumPathParameter() throws IOException {\n        final String json = \"{\" +\n                \"   \\\"in\\\":\\\"path\\\",\" +\n                \"   \\\"required\\\":true,\" +\n                \"   \\\"schema\\\":{\" +\n                \"     \\\"type\\\":\\\"array\\\",\" +\n                \"     \\\"items\\\":{\" +\n                \"        \\\"type\\\":\\\"integer\\\",\" +\n                \"        \\\"format\\\":\\\"int32\\\",\" +\n                \"        \\\"enum\\\":[1,2,3]\" +\n                \"     }\" +\n                \"   }\" +\n                \"}\";\n        final Parameter p = m.readValue(json, Parameter.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n\n        assertEquals(((IntegerSchema) ((ArraySchema) p.getSchema()).getItems()).getEnum(), Arrays.asList(1, 2, 3));\n    }\n\n    @Test(description = \"should serialize correctly typed numeric enums\")\n    public void testIssue1765() throws Exception {\n        String yaml =\n                \"openapi: '3.0.1'\\n\" +\n                        \"paths:\\n\" +\n                        \"  /test:\\n\" +\n                        \"    get:\\n\" +\n                        \"      parameters:\\n\" +\n                        \"      - name: \\\"days\\\"\\n\" +\n                        \"        in: \\\"path\\\"\\n\" +\n                        \"        required: true\\n\" +\n                        \"        schema:\\n\" +\n                        \"          type: \\\"integer\\\"\\n\" +\n                        \"          format: \\\"int32\\\"\\n\" +\n                        \"          enum:\\n\" +\n                        \"          - 1\\n\" +\n                        \"          - 2\\n\" +\n                        \"          - 3\\n\" +\n                        \"          - 4\\n\" +\n                        \"          - 5\\n\" +\n                        \"      responses:\\n\" +\n                        \"        default:\\n\" +\n                        \"          description: great\";\n\n        OpenAPI swagger = Yaml.mapper().readValue(yaml, OpenAPI.class);\n        SerializationMatchers.assertEqualsToYaml(swagger, yaml);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/deserialization/SchemaDeserializationTest.java",
    "content": "package io.swagger.v3.core.deserialization;\n\nimport io.swagger.v3.core.util.ResourceUtils;\nimport io.swagger.v3.core.util.Yaml31;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\n\npublic class SchemaDeserializationTest {\n\n    @Test\n    public void deserializeRefSchema3_1() throws IOException {\n\n        final String jsonString = ResourceUtils.loadClassResource(getClass(), \"specFiles/3.1.0/petstore-3.1_refs_siblings.yaml\");\n        final OpenAPI openAPI = Yaml31.mapper().readValue(jsonString, OpenAPI.class);\n        assertNotNull(openAPI);\n        assertNotNull(openAPI.getComponents());\n        assertNotNull(openAPI.getComponents().getSchemas());\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"AnotherPet\"));\n        assertEquals(openAPI.getComponents().getSchemas().get(\"AnotherPet\").get$ref(), \"#/components/schemas/Pet\");\n        assertEquals(openAPI.getComponents().getSchemas().get(\"AnotherPet\").getTitle(), \"Another Pet\");\n        assertEquals(openAPI.getComponents().getSchemas().get(\"AnotherPet\").getDescription(), \"Another Pet for petstore referencing Pet schema\");\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"AnotherPet\").getProperties());\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"AnotherPet\").getProperties().get(\"category\"));\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"AnotherPet\").getProperties().get(\"photoUrl\"));\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/deserialization/properties/ArrayPropertyDeserializerTest.java",
    "content": "package io.swagger.v3.core.deserialization.properties;\n\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport org.testng.annotations.Test;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class ArrayPropertyDeserializerTest {\n    private static final String yaml =\n            \"      operationId: something\\n\" +\n                    \"      responses:\\n\" +\n                    \"        \\\"200\\\":\\n\" +\n                    \"          content:\\n\" +\n                    \"            '*/*':\\n\" +\n                    \"              examples:\\n\" +\n                    \"                simple:\\n\" +\n                    \"                  value: Array example\\n\" +\n                    \"                more:\\n\" +\n                    \"                  value: with two items\\n\" +\n                    \"              description: OK\\n\" +\n                    \"              schema:\\n\" +\n                    \"                type: array\\n\" +\n                    \"                minItems: 3\\n\" +\n                    \"                maxItems: 100\\n\" +\n                    \"                items:\\n\" +\n                    \"                  type: string\\n\";\n\n    @Test(description = \"it should includes the example in the arrayproperty\")\n    public void testArrayDeserialization() throws Exception {\n\n        Operation operation = Yaml.mapper().readValue(yaml, Operation.class);\n        ApiResponse response = operation.getResponses().get(\"200\");\n        assertNotNull(response);\n\n        MediaType media = response.getContent().get(\"*/*\");\n        Schema responseSchema = media.getSchema();\n        assertTrue(media.getExamples().size() == 2);\n        assertNotNull(responseSchema);\n        assertTrue(responseSchema instanceof ArraySchema);\n\n        ArraySchema mp = (ArraySchema) responseSchema;\n        assertEquals(mp.getMinItems(), new Integer(3));\n        assertEquals(mp.getMaxItems(), new Integer(100));\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/deserialization/properties/JsonPropertiesDeserializationTest.java",
    "content": "package io.swagger.v3.core.deserialization.properties;\n\nimport io.swagger.v3.core.util.TestUtils;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.MapSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Test;\n\nimport java.util.List;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertFalse;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class JsonPropertiesDeserializationTest {\n\n    @Test(description = \"should deserialize a string property with constraints\")\n    public void testDeserializeConstrainedStringProperty() throws Exception {\n\n        OpenAPI oas = TestUtils.deserializeJsonFileFromClasspath(\"specFiles/propertiesWithConstraints.json\", OpenAPI.class);\n\n        StringSchema property = (StringSchema) oas.getComponents().getSchemas().get(\"Health\").getProperties().get(\"string_with_constraints\");\n\n        assertEquals(property.getMinLength(), Integer.valueOf(10));\n        assertEquals(property.getMaxLength(), Integer.valueOf(100));\n        assertEquals(property.getPattern(), \"apattern\");\n    }\n\n    @Test(description = \"should deserialize an array property with constraints\")\n    public void testDeserializeConstrainedArrayProperties() throws Exception {\n\n        OpenAPI oas = TestUtils.deserializeJsonFileFromClasspath(\"specFiles/propertiesWithConstraints.json\", OpenAPI.class);\n\n        Map<String, Schema> properties = oas.getComponents().getSchemas().get(\"Health\").getProperties();\n\n        ArraySchema withMin = (ArraySchema) properties.get(\"array_with_min\");\n\n        assertEquals(withMin.getMinItems(), Integer.valueOf(5));\n        assertNull(withMin.getMaxItems());\n        assertNull(withMin.getUniqueItems());\n\n        ArraySchema withMax = (ArraySchema) properties.get(\"array_with_max\");\n\n        assertNull(withMax.getMinItems());\n        assertEquals(withMax.getMaxItems(), Integer.valueOf(10));\n        assertNull(withMax.getUniqueItems());\n\n        ArraySchema withUnique = (ArraySchema) properties.get(\"array_with_unique\");\n\n        assertNull(withUnique.getMinItems());\n        assertNull(withUnique.getMaxItems());\n        assertEquals(withUnique.getUniqueItems(), Boolean.TRUE);\n\n        ArraySchema withAll = (ArraySchema) properties.get(\"array_with_all\");\n\n        assertEquals(withAll.getMinItems(), Integer.valueOf(1));\n        assertEquals(withAll.getMaxItems(), Integer.valueOf(10));\n        assertEquals(withAll.getUniqueItems(), Boolean.TRUE);\n    }\n\n    @Test(description = \"should deserialize a property with vendor extensions of different types\")\n    public void testDeserializePropertyWithVendorExtensions() throws Exception {\n\n        OpenAPI oas = TestUtils.deserializeJsonFileFromClasspath(\"specFiles/propertyWithVendorExtensions.json\", OpenAPI.class);\n\n        Map<String, Object> oasVendorExtensions = oas.getExtensions();\n        Map<String, Object> vendorExtensions = ((Schema) oas.getComponents().getSchemas().get(\"Health\").getProperties().get(\"status\")).getExtensions();\n\n        assertVendorExtensions(oasVendorExtensions);\n        assertVendorExtensions(vendorExtensions);\n\n        //check for vendor extensions in array property types\n        vendorExtensions = ((Schema) oas.getComponents().getSchemas().get(\"Health\").getProperties().get(\"array\")).getExtensions();\n\n        String xStringValue = (String) vendorExtensions.get(\"x-string-value\");\n        assertNotNull(xStringValue);\n        assertEquals(xStringValue, \"string_value\");\n    }\n\n    private void assertVendorExtensions(Map<String, Object> vendorExtensions) {\n        assertNotNull(vendorExtensions);\n        assertEquals(6, vendorExtensions.size());\n\n        String xStringValue = (String) vendorExtensions.get(\"x-string-value\");\n        assertNotNull(xStringValue);\n        assertEquals(xStringValue, \"Hello World\");\n\n        assertTrue(vendorExtensions.containsKey(\"x-null-value\"));\n        assertNull(vendorExtensions.get(\"x-null-value\"));\n\n        Map<String, String> xMapValue = (Map) vendorExtensions.get(\"x-map-value\");\n        assertNotNull(xMapValue);\n        assertEquals(xMapValue.get(\"hello\"), \"world\");\n        assertEquals(xMapValue.get(\"foo\"), \"bar\");\n\n        List<String> xListValue = (List) vendorExtensions.get(\"x-list-value\");\n        assertNotNull(xListValue);\n        assertEquals(xListValue.get(0), \"Hello\");\n        assertEquals(xListValue.get(1), \"World\");\n\n        Integer xNumberValue = (Integer) vendorExtensions.get(\"x-number-value\");\n        assertNotNull(xNumberValue);\n        assertEquals(xNumberValue.intValue(), 123);\n\n        Boolean xBooleanValue = (Boolean) vendorExtensions.get(\"x-boolean-value\");\n        assertNotNull(xBooleanValue);\n        assertTrue(xBooleanValue);\n\n        assertFalse(vendorExtensions.containsKey(\"not-an-extension\"));\n\n    }\n\n    @Test\n    public void shouldDeserializeArrayPropertyMinItems() throws Exception {\n        String path = \"json-schema-validation/array.json\";\n        ArraySchema property = (ArraySchema) TestUtils.deserializeJsonFileFromClasspath(path, Schema.class);\n\n        assertNotNull(property.getMinItems());\n        assertEquals(property.getMinItems().intValue(), 1);\n    }\n\n    @Test\n    public void shouldDeserializeArrayPropertyMaxItems() throws Exception {\n        String path = \"json-schema-validation/array.json\";\n        ArraySchema property = (ArraySchema) TestUtils.deserializeJsonFileFromClasspath(path, Schema.class);\n\n        assertNotNull(property.getMaxItems());\n        assertEquals(property.getMaxItems().intValue(), 10);\n    }\n\n    @Test\n    public void shouldDeserializeArrayPropertyUniqueItems() throws Exception {\n        String path = \"json-schema-validation/array.json\";\n        ArraySchema property = (ArraySchema) TestUtils.deserializeJsonFileFromClasspath(path, Schema.class);\n\n        assertNotNull(property.getUniqueItems());\n        assertTrue(property.getUniqueItems());\n    }\n\n    @Test\n    public void givenMapProperty_shouldDeserializeMinProperties() {\n        String path = \"json-schema-validation/map.json\";\n        MapSchema property = (MapSchema) TestUtils.deserializeJsonFileFromClasspath(path, Schema.class);\n\n        assertNotNull(property.getMinProperties());\n        assertEquals(property.getMinProperties().intValue(), 1);\n    }\n\n    @Test\n    public void givenMapProperty_shouldDeserializeMaxProperties() {\n        String path = \"json-schema-validation/map.json\";\n        MapSchema property = (MapSchema) TestUtils.deserializeJsonFileFromClasspath(path, Schema.class);\n\n        assertNotNull(property.getMaxProperties());\n        assertEquals(property.getMaxProperties().intValue(), 10);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/deserialization/properties/MapPropertyDeserializerTest.java",
    "content": "package io.swagger.v3.core.deserialization.properties;\n\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.MapSchema;\nimport io.swagger.v3.oas.models.media.ObjectSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport org.testng.annotations.Test;\n\nimport static io.swagger.v3.core.util.TestUtils.normalizeLineEnds;\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertFalse;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class MapPropertyDeserializerTest {\n    private static final String json = \"{\\n\" +\n            \"  \\\"tags\\\": [\\n\" +\n            \"    \\\"store\\\"\\n\" +\n            \"  ],\\n\" +\n            \"  \\\"summary\\\": \\\"Returns pet inventories by status\\\",\\n\" +\n            \"  \\\"description\\\": \\\"Returns a map of status codes to quantities\\\",\\n\" +\n            \"  \\\"operationId\\\": \\\"getInventory\\\",\\n\" +\n            \"  \\\"produces\\\": [\\n\" +\n            \"    \\\"application/json\\\"\\n\" +\n            \"  ],\\n\" +\n            \"  \\\"parameters\\\": [],\\n\" +\n            \"  \\\"responses\\\": {\\n\" +\n            \"    \\\"200\\\": {\\n\" +\n            \"      \\\"description\\\": \\\"successful operation\\\",\\n\" +\n            \"      \\\"content\\\": {\\n\" +\n            \"        \\\"*/*\\\": {\\n\" +\n            \"          \\\"schema\\\": {\\n\" +\n            \"            \\\"type\\\": \\\"object\\\",\\n\" +\n            \"            \\\"x-foo\\\": \\\"vendor x\\\",\\n\" +\n            \"            \\\"additionalProperties\\\": {\\n\" +\n            \"              \\\"type\\\": \\\"integer\\\",\\n\" +\n            \"              \\\"format\\\": \\\"int32\\\"\\n\" +\n            \"            }\\n\" +\n            \"          }\\n\" +\n            \"        }\\n\" +\n            \"      }\\n\" +\n            \"    }\\n\" +\n            \"  },\\n\" +\n            \"  \\\"security\\\": [\\n\" +\n            \"    {\\n\" +\n            \"      \\\"api_key\\\": []\\n\" +\n            \"    }\\n\" +\n            \"  ]\\n\" +\n            \"}\";\n\n    private static final String jsonAdditionalPropertiesBoolean = \"{\\n\" +\n            \"  \\\"tags\\\": [\\n\" +\n            \"    \\\"store\\\"\\n\" +\n            \"  ],\\n\" +\n            \"  \\\"summary\\\": \\\"Returns pet inventories by status\\\",\\n\" +\n            \"  \\\"description\\\": \\\"Returns a map of status codes to quantities\\\",\\n\" +\n            \"  \\\"operationId\\\": \\\"getInventory\\\",\\n\" +\n            \"  \\\"produces\\\": [\\n\" +\n            \"    \\\"application/json\\\"\\n\" +\n            \"  ],\\n\" +\n            \"  \\\"parameters\\\": [],\\n\" +\n            \"  \\\"responses\\\": {\\n\" +\n            \"    \\\"200\\\": {\\n\" +\n            \"      \\\"description\\\": \\\"successful operation\\\",\\n\" +\n            \"      \\\"content\\\": {\\n\" +\n            \"        \\\"*/*\\\": {\\n\" +\n            \"          \\\"schema\\\": {\\n\" +\n            \"            \\\"type\\\": \\\"object\\\",\\n\" +\n            \"            \\\"x-foo\\\": \\\"vendor x\\\",\\n\" +\n            \"            \\\"additionalProperties\\\": false\\n\" +\n            \"          }\\n\" +\n            \"        }\\n\" +\n            \"      }\\n\" +\n            \"    }\\n\" +\n            \"  },\\n\" +\n            \"  \\\"security\\\": [\\n\" +\n            \"    {\\n\" +\n            \"      \\\"api_key\\\": []\\n\" +\n            \"    }\\n\" +\n            \"  ]\\n\" +\n            \"}\";\n\n    private static final String jsonAdditionalPropertiesBooleanTrue = \"{\\n\" +\n            \"  \\\"tags\\\": [\\n\" +\n            \"    \\\"store\\\"\\n\" +\n            \"  ],\\n\" +\n            \"  \\\"summary\\\": \\\"Returns pet inventories by status\\\",\\n\" +\n            \"  \\\"description\\\": \\\"Returns a map of status codes to quantities\\\",\\n\" +\n            \"  \\\"operationId\\\": \\\"getInventory\\\",\\n\" +\n            \"  \\\"produces\\\": [\\n\" +\n            \"    \\\"application/json\\\"\\n\" +\n            \"  ],\\n\" +\n            \"  \\\"parameters\\\": [],\\n\" +\n            \"  \\\"responses\\\": {\\n\" +\n            \"    \\\"200\\\": {\\n\" +\n            \"      \\\"description\\\": \\\"successful operation\\\",\\n\" +\n            \"      \\\"content\\\": {\\n\" +\n            \"        \\\"*/*\\\": {\\n\" +\n            \"          \\\"schema\\\": {\\n\" +\n            \"            \\\"type\\\": \\\"object\\\",\\n\" +\n            \"            \\\"x-foo\\\": \\\"vendor x\\\",\\n\" +\n            \"            \\\"additionalProperties\\\": true\\n\" +\n            \"          }\\n\" +\n            \"        }\\n\" +\n            \"      }\\n\" +\n            \"    }\\n\" +\n            \"  },\\n\" +\n            \"  \\\"security\\\": [\\n\" +\n            \"    {\\n\" +\n            \"      \\\"api_key\\\": []\\n\" +\n            \"    }\\n\" +\n            \"  ]\\n\" +\n            \"}\";\n\n    @Test(description = \"it should deserialize a response per #1349\")\n    public void testMapDeserialization() throws Exception {\n\n        Operation operation = Json.mapper().readValue(json, Operation.class);\n        ApiResponse response = operation.getResponses().get(\"200\");\n        assertNotNull(response);\n\n        Schema responseSchema = response.getContent().get(\"*/*\").getSchema();\n        assertNotNull(responseSchema);\n        assertTrue(responseSchema instanceof MapSchema);\n\n        MapSchema mp = (MapSchema) responseSchema;\n        assertTrue(mp.getAdditionalProperties() instanceof IntegerSchema);\n    }\n\n    @Test(description = \"it should deserialize a boolean additionalProperties\")\n    public void testBooleanAdditionalPropertiesDeserialization() throws Exception {\n\n        Operation operation = Json.mapper().readValue(jsonAdditionalPropertiesBoolean, Operation.class);\n        ApiResponse response = operation.getResponses().get(\"200\");\n        assertNotNull(response);\n\n        Schema responseSchema = response.getContent().get(\"*/*\").getSchema();\n        assertNotNull(responseSchema);\n        assertTrue(responseSchema instanceof ObjectSchema);\n\n        assertTrue(responseSchema.getAdditionalProperties() instanceof Boolean);\n        assertFalse((Boolean)responseSchema.getAdditionalProperties());\n\n        operation = Json.mapper().readValue(jsonAdditionalPropertiesBooleanTrue, Operation.class);\n        response = operation.getResponses().get(\"200\");\n        assertNotNull(response);\n\n        responseSchema = response.getContent().get(\"*/*\").getSchema();\n        assertNotNull(responseSchema);\n        assertTrue(responseSchema instanceof MapSchema);\n\n        assertTrue(responseSchema.getAdditionalProperties() instanceof Boolean);\n        assertTrue((Boolean)responseSchema.getAdditionalProperties());\n    }\n\n    @Test(description = \"it should serialize a boolean additionalProperties\")\n    public void testBooleanAdditionalPropertiesSerialization() throws Exception {\n\n        Operation operation = Json.mapper().readValue(json, Operation.class);\n        ApiResponse response = operation.getResponses().get(\"200\");\n        assertNotNull(response);\n\n        Schema responseSchema = response.getContent().get(\"*/*\").getSchema();\n\n        Schema schema = new ObjectSchema().additionalProperties(true);\n        assertEquals(normalizeLineEnds(Json.pretty(schema)), \"{\\n\" +\n                \"  \\\"type\\\" : \\\"object\\\",\\n\" +\n                \"  \\\"additionalProperties\\\" : true\\n\" +\n                \"}\");\n\n        schema = new ObjectSchema().additionalProperties(responseSchema);\n        assertEquals(normalizeLineEnds(Json.pretty(schema)), \"{\\n\" +\n                \"  \\\"type\\\" : \\\"object\\\",\\n\" +\n                \"  \\\"additionalProperties\\\" : {\\n\" +\n                \"    \\\"type\\\" : \\\"object\\\",\\n\" +\n                \"    \\\"additionalProperties\\\" : {\\n\" +\n                \"      \\\"type\\\" : \\\"integer\\\",\\n\" +\n                \"      \\\"format\\\" : \\\"int32\\\"\\n\" +\n                \"    },\\n\" +\n                \"    \\\"x-foo\\\" : \\\"vendor x\\\"\\n\" +\n                \"  }\\n\" +\n                \"}\");\n    }\n\n    @Test(description = \"vendor extensions should be included with object type\")\n    public void testMapDeserializationVendorExtensions() throws Exception {\n        Operation operation = Json.mapper().readValue(json, Operation.class);\n        ApiResponse response = operation.getResponses().get(\"200\");\n        assertNotNull(response);\n\n        Schema responseSchema = response.getContent().get(\"*/*\").getSchema();\n        assertNotNull(responseSchema);\n\n        MapSchema mp = (MapSchema) responseSchema;\n        assertTrue(mp.getExtensions().size() > 0);\n        assertNotNull(mp.getExtensions().get(\"x-foo\"));\n        assertEquals(mp.getExtensions().get(\"x-foo\"), \"vendor x\");\n    }\n\n    @Test(description = \"it should read an example within an inlined schema\")\n    public void testIssue1261InlineSchemaExample() throws Exception {\n        Operation operation = Yaml.mapper().readValue(\n                \"      responses:\\n\" +\n                        \"        \\\"200\\\":\\n\" +\n                        \"          content:\\n\" +\n                        \"            '*/*':\\n\" +\n                        \"              description: OK\\n\" +\n                        \"              schema:\\n\" +\n                        \"                type: object\\n\" +\n                        \"                properties:\\n\" +\n                        \"                  id:\\n\" +\n                        \"                    type: integer\\n\" +\n                        \"                    format: int32\\n\" +\n                        \"                  name:\\n\" +\n                        \"                    type: string\\n\" +\n                        \"                required: [id, name]\\n\" +\n                        \"                example: ok\", Operation.class);\n\n        ApiResponse response = operation.getResponses().get(\"200\");\n        assertNotNull(response);\n        Schema schema = response.getContent().get(\"*/*\").getSchema();\n        Object example = schema.getExample();\n        assertNotNull(example);\n        assertTrue(example instanceof String);\n        assertEquals(example, \"ok\");\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/deserialization/properties/PropertyDeserializerTest.java",
    "content": "package io.swagger.v3.core.deserialization.properties;\n\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.math.BigDecimal;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertTrue;\n\npublic class PropertyDeserializerTest {\n    @Test\n    public void deserializeParameterWithMinimumMaximumValues() throws Exception {\n        String json =\n                \"{\\n\" +\n                        \"  \\\"in\\\": \\\"query\\\",\\n\" +\n                        \"  \\\"type\\\": \\\"integer\\\",\\n\" +\n                        \"  \\\"format\\\": \\\"int32\\\",\\n\" +\n                        \"  \\\"minimum\\\": 32,\\n\" +\n                        \"  \\\"maximum\\\": 100\\n\" +\n                        \"}\";\n\n        Schema property = Json.mapper().readValue(json, Schema.class);\n\n        assertTrue(property instanceof IntegerSchema);\n        IntegerSchema ip = (IntegerSchema) property;\n        assertEquals(ip.getMinimum(), new BigDecimal(\"32\"));\n        assertEquals(ip.getMaximum(), new BigDecimal(\"100\"));\n    }\n\n    @Test\n    public void deserializePropertyWithMinimumMaximumValues() throws Exception {\n        String json =\n                \"{\\n\" +\n                        \"  \\\"type\\\": \\\"integer\\\",\\n\" +\n                        \"  \\\"format\\\": \\\"int32\\\",\\n\" +\n                        \"  \\\"minimum\\\": 32,\\n\" +\n                        \"  \\\"maximum\\\": 100\\n\" +\n                        \"}\";\n\n        Schema param = Json.mapper().readValue(json, Schema.class);\n        IntegerSchema ip = (IntegerSchema) param;\n        assertEquals(ip.getMinimum(), new BigDecimal(\"32\"));\n        assertEquals(ip.getMaximum(), new BigDecimal(\"100\"));\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/SpecFilterTest.java",
    "content": "package io.swagger.v3.core.filter;\n\nimport com.google.common.collect.Sets;\nimport io.swagger.v3.core.filter.resources.ChangeGetOperationsFilter;\nimport io.swagger.v3.core.filter.resources.InternalModelPropertiesRemoverFilter;\nimport io.swagger.v3.core.filter.resources.NoGetOperationsFilter;\nimport io.swagger.v3.core.filter.resources.NoOpOperationsFilter;\nimport io.swagger.v3.core.filter.resources.NoOpenAPIFilter;\nimport io.swagger.v3.core.filter.resources.NoParametersWithoutQueryInFilter;\nimport io.swagger.v3.core.filter.resources.NoPathItemFilter;\nimport io.swagger.v3.core.filter.resources.NoPetOperationsFilter;\nimport io.swagger.v3.core.filter.resources.NoPetRefSchemaFilter;\nimport io.swagger.v3.core.filter.resources.RemoveInternalParamsFilter;\nimport io.swagger.v3.core.filter.resources.RemoveUnreferencedDefinitionsFilter;\nimport io.swagger.v3.core.filter.resources.ReplaceGetOperationsFilter;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.core.util.Yaml31;\nimport io.swagger.v3.core.util.ResourceUtils;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.tags.Tag;\nimport org.apache.commons.lang3.StringUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.concurrent.ConcurrentHashMap;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertFalse;\nimport static org.testng.Assert.assertNotEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\nimport static org.testng.Assert.assertTrue;\nimport static org.testng.Assert.fail;\n\npublic class SpecFilterTest {\n    private static final Logger LOGGER = LoggerFactory.getLogger(SpecFilterTest.class);\n\n    private static final String RESOURCE_RECURSIVE_MODELS = \"specFiles/recursivemodels.json\";\n    private static final String RESOURCE_PATH = \"specFiles/petstore-3.0-v2.json\";\n    private static final String RESOURCE_PATH_3303 = \"specFiles/petstore-3.0-v2-ticket-3303.json\";\n    private static final String RESOURCE_WITH_REF_DEFINITION_4737 = \"specFiles/3.1.0/issue-4737-3.1.yaml\";\n    private static final String RESOURCE_WITH_REFERRED_DEFINITIONS= \"specFiles/3.1.0/specWithReferredSchemas-3.1.yaml\";\n    private static final String RESOURCE_PATH_LIST = \"specFiles/3.1.0/list-3.1.json\";\n    private static final String RESOURCE_PATH_COMPOSED_SCHEMA = \"specFiles/3.1.0/composed-schema-3.1.json\";\n    private static final String RESOURCE_REFERRED_SCHEMAS = \"specFiles/petstore-3.0-referred-schemas.json\";\n    private static final String RESOURCE_PATH_WITHOUT_MODELS = \"specFiles/petstore-3.0-v2_withoutModels.json\";\n    private static final String RESOURCE_DEPRECATED_OPERATIONS = \"specFiles/deprecatedoperationmodel.json\";\n    private static final String CHANGED_OPERATION_ID = \"Changed Operation\";\n    private static final String CHANGED_OPERATION_DESCRIPTION = \"Changing some attributes of the operation\";\n    private static final String NEW_OPERATION_ID = \"New Operation\";\n    private static final String NEW_OPERATION_DESCRIPTION = \"Replaced Operation\";\n    private static final String QUERY = \"query\";\n    private static final String PET_MODEL = \"Pet\";\n    private static final String TAG_MODEL = \"/Tag\";\n    private static final String PET_TAG = \"pet\";\n    private static final String STORE_TAG = \"store\";\n    private static final String USER_TAG = \"user\";\n\n    @Test(description = \"it should clone everything\")\n    public void cloneEverything() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, new NoOpOperationsFilter(), null, null, null);\n\n        assertEquals(Json.pretty(filtered), Json.pretty(openAPI));\n    }\n\n    @Test(description = \"it should filter away get operations in a resource\")\n    public void filterAwayGetOperations() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n        final NoGetOperationsFilter filter = new NoGetOperationsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, filter, null, null, null);\n\n        if (filtered.getPaths() != null) {\n            for (Map.Entry<String, PathItem> entry : filtered.getPaths().entrySet()) {\n                assertNull(entry.getValue().getGet());\n            }\n        } else {\n            fail(\"paths should not be null\");\n        }\n    }\n\n    @Test(description = \"it should filter away the pet resource\")\n    public void filterAwayPetResource() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n        final NoPetOperationsFilter filter = new NoPetOperationsFilter();\n\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, filter, null, null, null);\n        if (filtered.getPaths() != null) {\n            for (Map.Entry<String, PathItem> entry : filtered.getPaths().entrySet()) {\n                assertNull(entry.getValue().getDelete());\n                assertNull(entry.getValue().getPost());\n                assertNull(entry.getValue().getPut());\n                assertNull(entry.getValue().getGet());\n                assertNull(entry.getValue().getHead());\n                assertNull(entry.getValue().getOptions());\n            }\n        } else {\n            fail(\"paths should not be null\");\n        }\n    }\n\n    @Test(description = \"it should replace away with a new operation\")\n    public void replaceGetResources() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n        OpenAPI filter = new SpecFilter().filter(openAPI, new ReplaceGetOperationsFilter(), null, null, null);\n        assertOperations(filter, NEW_OPERATION_ID, NEW_OPERATION_DESCRIPTION);\n    }\n\n    @Test(description = \"it should change away with a new operation\")\n    public void changeGetResources() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n        OpenAPI filter = new SpecFilter().filter(openAPI, new ChangeGetOperationsFilter(), null, null, null);\n        assertOperations(filter, CHANGED_OPERATION_ID, CHANGED_OPERATION_DESCRIPTION);\n    }\n\n    private void assertOperations(OpenAPI filtered, String operationId, String description) {\n        if (filtered.getPaths() != null) {\n            for (Map.Entry<String, PathItem> entry : filtered.getPaths().entrySet()) {\n                Operation get = entry.getValue().getGet();\n                if (get != null) {\n                    assertEquals(get.getOperationId(), operationId);\n                    assertEquals(get.getDescription(), description);\n                }\n            }\n        } else {\n            fail(\"paths should not be null\");\n        }\n    }\n\n    @Test(description = \"it should filter an openAPI object\")\n    public void filterAwayOpenAPI() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, new NoOpenAPIFilter(), null, null, null);\n        assertNull(filtered);\n    }\n\n    @Test(description = \"it should filter any PathItem objects without Ref\")\n    public void filterAwayPathItemWithoutRef() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, new NoPathItemFilter(), null, null, null);\n        assertEquals(0, filtered.getPaths().size());\n    }\n\n    @Test(description = \"it should filter any query parameter\")\n    public void filterAwayQueryParameters() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, new NoParametersWithoutQueryInFilter(), null, null, null);\n        if (filtered.getPaths() != null) {\n            for (Map.Entry<String, PathItem> entry : filtered.getPaths().entrySet()) {\n                validateParameters(entry.getValue().getGet());\n                validateParameters(entry.getValue().getPost());\n                validateParameters(entry.getValue().getPut());\n                validateParameters(entry.getValue().getPatch());\n                validateParameters(entry.getValue().getHead());\n                validateParameters(entry.getValue().getDelete());\n                validateParameters(entry.getValue().getOptions());\n            }\n        }\n    }\n\n    private void validateParameters(Operation operation) {\n        if (operation != null && operation.getParameters() != null) {\n            for (Parameter parameter : operation.getParameters()) {\n                assertNotEquals(QUERY, parameter.getIn());\n            }\n        }\n    }\n\n    @Test(description = \"it should clone everything concurrently\")\n    public void cloneEverythingConcurrent() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n\n        ThreadGroup tg = new ThreadGroup(\"SpecFilterTest\" + \"|\" + System.currentTimeMillis());\n        final Map<String, OpenAPI> filteredMap = new ConcurrentHashMap<>();\n        for (int i = 0; i < 10; i++) {\n            final int id = i;\n            new Thread(tg, \"SpecFilterTest\") {\n                public void run() {\n                    try {\n                        filteredMap.put(\"filtered \" + id, new SpecFilter().filter(openAPI, new NoOpOperationsFilter(), null, null, null));\n                    } catch (Exception e) {\n                        LOGGER.error(\"Failed to filter OpenAPI concurrently\", e);\n                    }\n                }\n            }.start();\n        }\n\n        new Thread(new FailureHandler(tg, filteredMap, openAPI)).start();\n    }\n\n    class FailureHandler implements Runnable {\n        ThreadGroup tg;\n        Map<String, OpenAPI> filteredMap;\n        private OpenAPI openAPI;\n\n        private FailureHandler(ThreadGroup tg, Map<String, OpenAPI> filteredMap, OpenAPI openAPI) {\n            this.tg = tg;\n            this.filteredMap = filteredMap;\n            this.openAPI = openAPI;\n        }\n\n        @Override\n        public void run() {\n            try {\n                Thread[] thds = new Thread[tg.activeCount()];\n                tg.enumerate(thds);\n                for (Thread t : thds) {\n                    if (t != null) {\n                        t.join(10000);\n                    }\n                }\n            } catch (Exception e) {\n                LOGGER.error(\"Interrupted while waiting for filtering threads to complete\", e);\n            }\n            for (OpenAPI filtered : filteredMap.values()) {\n                assertEquals(Json.pretty(openAPI), Json.pretty(filtered));\n            }\n        }\n    }\n\n    @Test(description = \"it should clone everything from JSON without models\")\n    public void cloneWithoutModels() throws IOException {\n        final String json = ResourceUtils.loadClassResource(getClass(), RESOURCE_PATH_WITHOUT_MODELS);\n        final OpenAPI openAPI = Json.mapper().readValue(json, OpenAPI.class);\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, new NoOpOperationsFilter(), null, null, null);\n\n        SerializationMatchers.assertEqualsToJson(filtered, json);\n    }\n\n    @Test\n    public void shouldRemoveBrokenRefs() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n        openAPI.getPaths().get(\"/pet/{petId}\").getGet().getResponses().getDefault().getHeaders().remove(\"X-Rate-Limit-Limit\");\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"PetHeader\"));\n        final RemoveUnreferencedDefinitionsFilter remover = new RemoveUnreferencedDefinitionsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, remover, null, null, null);\n\n        assertNull(filtered.getComponents().getSchemas().get(\"PetHeader\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"Category\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"Pet\"));\n    }\n\n    @Test\n    public void shouldRemoveBrokenNestedRefs() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH_3303);\n        openAPI.getPaths().get(\"/pet/{petId}\").getGet().getResponses().getDefault().getHeaders().remove(\"X-Rate-Limit-Limit\");\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"PetHeader\"));\n        final RemoveUnreferencedDefinitionsFilter remover = new RemoveUnreferencedDefinitionsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, remover, null, null, null);\n\n        assertNull(filtered.getComponents().getSchemas().get(\"PetHeader\"));\n        assertNull(filtered.getComponents().getSchemas().get(\"Bar\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"Category\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"Pet\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"Foo\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"allOfChild\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"anyOfChild\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"oneOfChild\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"allOfparentA\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"allOfparentB\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"anyOfparentA\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"anyOfparentB\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"oneOfparentA\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"oneOfparentB\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"oneOfNestedParentA\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"oneOfNestedParentB\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"discriminatorParent\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"discriminatorMatchedChildA\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"discriminatorRefProperty\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"discriminatorParentRefProperty\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"discriminatorMatchedChildB\"));\n    }\n\n    @Test\n    public void shouldRemoveBrokenNestedRefsKeepArray() throws IOException {\n        final OpenAPI openAPI = getOpenAPI31(RESOURCE_PATH_LIST);\n        final RemoveUnreferencedDefinitionsFilter remover = new RemoveUnreferencedDefinitionsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, remover, null, null, null);\n\n        assertEquals(filtered.getComponents().getSchemas().size(), 2, \"Expected to have parent and child list schemas\");\n        assertTrue(filtered.getComponents().getSchemas().containsKey(\"SomeChildObject\"), \"Schemas should contains child list\");\n    }\n\n    @Test\n    public void shouldRemoveBrokenNestedRefsKeepComposedSchemas() throws IOException {\n        final OpenAPI openAPI = getOpenAPI31(RESOURCE_PATH_COMPOSED_SCHEMA);\n        final RemoveUnreferencedDefinitionsFilter remover = new RemoveUnreferencedDefinitionsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, remover, null, null, null);\n\n        assertEquals(filtered.getComponents().getSchemas().size(), 5, \"Expected to have parent and abstract child with both implementations schemas\");\n        assertTrue(filtered.getComponents().getSchemas().containsKey(\"SomeChild1ImplObject\"), \"Schemas should contains child 1 implementation\");\n        assertTrue(filtered.getComponents().getSchemas().containsKey(\"SomeChild2ImplObject\"), \"Schemas should contains child 2 implementation\");\n        assertTrue(filtered.getComponents().getSchemas().containsKey(\"SomeChildObject\"), \"Schemas should contains child abstract parent\");\n        assertTrue(filtered.getComponents().getSchemas().containsKey(\"PatternPropertiesReferencedObject\"), \"Schemas should contains pattern properties referenced schema\");\n    }\n\n    @Test\n    public void shouldNotRemoveGoodRefs() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"PetHeader\"));\n        final RemoveUnreferencedDefinitionsFilter remover = new RemoveUnreferencedDefinitionsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, remover, null, null, null);\n\n        assertNotNull(filtered.getComponents().getSchemas().get(\"PetHeader\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"Category\"));\n    }\n\n    @Test(description = \"it should filter any Pet Ref in Schemas\")\n    public void filterAwayPetRefInSchemas() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, new NoPetRefSchemaFilter(), null, null, null);\n        validateSchemasInComponents(filtered.getComponents(), PET_MODEL);\n    }\n\n    private void validateSchemasInComponents(Components components, String model) {\n        if (components != null) {\n            if (components.getSchemas() != null) {\n                components.getSchemas().forEach((k, v) -> assertNotEquals(model, k));\n            }\n        }\n    }\n\n    @Test(description = \"it should filter away secret parameters\")\n    public void filterAwaySecretParameters() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n        final RemoveInternalParamsFilter filter = new RemoveInternalParamsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, filter, null, null, null);\n\n        if (filtered.getPaths() != null) {\n            for (Map.Entry<String, PathItem> entry : filtered.getPaths().entrySet()) {\n                final Operation get = entry.getValue().getGet();\n                if (get != null) {\n                    for (Parameter param : get.getParameters()) {\n                        final String description = param.getDescription();\n                        if (StringUtils.isNotBlank(description)) {\n                            assertFalse(description.startsWith(\"secret\"));\n                        }\n                    }\n                }\n            }\n        } else {\n            fail(\"paths should not be null\");\n        }\n    }\n\n    @Test(description = \"it should filter away internal model properties\")\n    public void filterAwayInternalModelProperties() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n        final InternalModelPropertiesRemoverFilter filter = new InternalModelPropertiesRemoverFilter();\n\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, filter, null, null, null);\n        for (Map.Entry<String, Schema> entry : filtered.getComponents().getSchemas().entrySet()) {\n            for (String propName : (Set<String>) entry.getValue().getProperties().keySet()) {\n                assertFalse(propName.startsWith(\"_\"));\n            }\n        }\n    }\n\n    @Test(description = \"it should retain non-broken reference model composed properties\")\n    public void retainNonBrokenReferenceModelComposedProperties() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_REFERRED_SCHEMAS);\n\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"User\"));\n\n        final NoOpOperationsFilter noOperationsFilter = new NoOpOperationsFilter();\n        OpenAPI filtered = new SpecFilter().filter(openAPI, noOperationsFilter, null, null, null);\n\n        assertNotNull(filtered.getComponents().getSchemas().get(\"User\"));\n\n        final RemoveUnreferencedDefinitionsFilter refFilter = new RemoveUnreferencedDefinitionsFilter();\n        filtered = new SpecFilter().filter(openAPI, refFilter, null, null, null);\n\n        assertNotNull(filtered.getComponents().getSchemas().get(\"User\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"Pet\"));\n\n    }\n\n    @Test(description = \"recursive models, e.g. A-> A or A-> B and B -> A should not result in stack overflow\")\n    public void removeUnreferencedDefinitionsOfRecuriveModels() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_RECURSIVE_MODELS);\n        final RemoveUnreferencedDefinitionsFilter remover = new RemoveUnreferencedDefinitionsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, remover, null, null, null);\n\n        assertNotNull(filtered.getComponents().getSchemas().get(\"SelfReferencingModel\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"IndirectRecursiveModelA\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"IndirectRecursiveModelB\"));\n    }\n\n    @Test(description = \"broken references should not result in NPE\")\n    public void removeUnreferencedModelOverride() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_REFERRED_SCHEMAS);\n        final RemoveUnreferencedDefinitionsFilter remover = new RemoveUnreferencedDefinitionsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, remover, null, null, null);\n\n        assertNotNull(filtered.getComponents().getSchemas().get(\"Order\"));\n    }\n\n    @Test(description = \"Retain models referenced from additonalProperties\")\n    public void retainModelsReferencesFromAdditionalProperties() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_REFERRED_SCHEMAS);\n        final RemoveUnreferencedDefinitionsFilter remover = new RemoveUnreferencedDefinitionsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, remover, null, null, null);\n\n        assertNotNull(filtered.getComponents().getSchemas().get(\"Order\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"ReferredOrder\"));\n    }\n\n    @Test(description = \"Clone should retain any 'deperecated' flags present on operations\")\n    public void cloneRetainDeperecatedFlags() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_DEPRECATED_OPERATIONS);\n        final RemoveUnreferencedDefinitionsFilter remover = new RemoveUnreferencedDefinitionsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, remover, null, null, null);\n\n        Operation operation = filtered.getPaths().get(\"/test\").getGet();\n\n        Boolean deprectedFlag = operation.getDeprecated();\n        assertNotNull(deprectedFlag);\n        assertEquals(deprectedFlag, Boolean.TRUE);\n    }\n\n    @Test(description = \"it should contain all tags in the top level OpenAPI object\")\n    public void shouldContainAllTopLevelTags() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_REFERRED_SCHEMAS);\n        final NoOpOperationsFilter filter = new NoOpOperationsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, filter, null, null, null);\n        assertEquals(getTagNames(filtered), Sets.newHashSet(PET_TAG, USER_TAG, STORE_TAG));\n    }\n\n    @Test(description = \"it should not contain user tags in the top level OpenAPI object\")\n    public void shouldNotContainTopLevelUserTags() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_REFERRED_SCHEMAS);\n        final NoPetOperationsFilter filter = new NoPetOperationsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, filter, null, null, null);\n        assertEquals(getTagNames(filtered), Sets.newHashSet(USER_TAG, STORE_TAG));\n\n    }\n\n    @Test(description = \"it should filter with null definitions\")\n    public void filterWithNullDefinitions() throws IOException {\n        final OpenAPI openAPI = getOpenAPI(RESOURCE_PATH);\n        openAPI.getComponents().setSchemas(null);\n\n        final InternalModelPropertiesRemoverFilter filter = new InternalModelPropertiesRemoverFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, filter, null, null, null);\n        assertNotNull(filtered);\n    }\n\n    @Test(description = \"RemoveUnreferencedDefinitionsFilter should not remove schema definition if ref used in Webhook\")\n    public void testTicket4737() throws IOException {\n        final OpenAPI openAPI = getOpenAPIYaml31(RESOURCE_WITH_REF_DEFINITION_4737);\n        final RemoveUnreferencedDefinitionsFilter remover = new RemoveUnreferencedDefinitionsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, remover, null, null, null);\n        assertNotNull(filtered.getComponents().getSchemas().get(\"RequestDto\"));\n    }\n\n    @Test\n    public void shouldNotRemoveUsedDefinitions() throws IOException {\n        final OpenAPI openAPI = getOpenAPIYaml31(RESOURCE_WITH_REFERRED_DEFINITIONS);\n        final RemoveUnreferencedDefinitionsFilter remover = new RemoveUnreferencedDefinitionsFilter();\n        final OpenAPI filtered = new SpecFilter().filter(openAPI, remover, null, null, null);\n        assertNotNull(filtered.getComponents().getSchemas().get(\"ResponseDefinition\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"WebhookResponseDefinition\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"WebhookOperationDefinition\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"RequestBodyDefinition\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"ParameterDefinition\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"HeaderDefinition\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"CallbackDefinition\"));\n        assertNotNull(filtered.getComponents().getSchemas().get(\"PathItemDefinition\"));\n        assertNull(filtered.getComponents().getSchemas().get(\"UnusedDefinition\"));\n    }\n\n    private Set getTagNames(OpenAPI openAPI) {\n        Set<String> result = new HashSet<>();\n        if (openAPI.getTags() != null) {\n            for (Tag item : openAPI.getTags()) {\n                result.add(item.getName());\n            }\n        }\n        return result;\n    }\n\n    private OpenAPI getOpenAPI(String path) throws IOException {\n        final String json = ResourceUtils.loadClassResource(getClass(), path);\n        return Json.mapper().readValue(json, OpenAPI.class);\n    }\n\n    private OpenAPI getOpenAPI31(String path) throws IOException {\n        final String json = ResourceUtils.loadClassResource(getClass(), path);\n        return Json31.mapper().readValue(json, OpenAPI.class);\n    }\n\n    private OpenAPI getOpenAPIYaml(String path) throws IOException {\n        final String yaml = ResourceUtils.loadClassResource(getClass(), path);\n        return Yaml.mapper().readValue(yaml, OpenAPI.class);\n    }\n\n    private OpenAPI getOpenAPIYaml31(String path) throws IOException {\n        final String yaml = ResourceUtils.loadClassResource(getClass(), path);\n        return Yaml31.mapper().readValue(yaml, OpenAPI.class);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/ChangeGetOperationsFilter.java",
    "content": "package io.swagger.v3.core.filter.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.core.model.ApiDescription;\nimport io.swagger.v3.oas.models.Operation;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\n/**\n * Sample filter to avoid all get operations for the resource\n **/\npublic class ChangeGetOperationsFilter extends AbstractSpecFilter {\n    private static final String GET = \"GET\";\n    private static final String CHANGED_OPERATION_ID = \"Changed Operation\";\n    private static final String CHANGED_OPERATION_DESCRIPTION = \"Changing some attributes of the operation\";\n\n    @Override\n    public Optional<Operation> filterOperation(Operation operation, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (GET.equals(api.getMethod())) {\n            return Optional.of(operation.operationId(CHANGED_OPERATION_ID).description(CHANGED_OPERATION_DESCRIPTION));\n        }\n        return Optional.of(operation);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/InternalModelPropertiesRemoverFilter.java",
    "content": "package io.swagger.v3.core.filter.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.apache.commons.lang3.StringUtils;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\n/**\n * Sample filter to model properties starting with \"_\" unless a header\n * \"super-user\" is passed\n */\npublic class InternalModelPropertiesRemoverFilter extends AbstractSpecFilter {\n    @Override\n    public Optional<Schema> filterSchemaProperty(Schema property, Schema schema, String propName, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (StringUtils.isNotBlank(property.getName()) && property.getName().startsWith(\"_\")) {\n            if (headers != null && headers.containsKey(\"super-user\")) {\n                return Optional.of(property);\n            }\n            return Optional.empty();\n        } else {\n            return Optional.of(property);\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/NoCategoryRefSchemaFilter.java",
    "content": "package io.swagger.v3.core.filter.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.apache.commons.lang3.StringUtils;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\npublic class NoCategoryRefSchemaFilter extends AbstractSpecFilter {\n    private static final String MODEL = \"Category\";\n\n    @Override\n    public Optional<Schema> filterSchemaProperty(Schema property, Schema schema, String propName, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (schema == null || StringUtils.isBlank(schema.get$ref())) {\n            return Optional.of(schema);\n        }\n\n        if (schema.get$ref().contains(MODEL)) {\n            return Optional.empty();\n        }\n        return Optional.of(schema);\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/NoGetOperationsFilter.java",
    "content": "package io.swagger.v3.core.filter.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.core.model.ApiDescription;\nimport io.swagger.v3.oas.models.Operation;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\n/**\n * Sample filter to avoid all get operations for the resource\n **/\npublic class NoGetOperationsFilter extends AbstractSpecFilter {\n    private static final String GET = \"GET\";\n\n    @Override\n    public Optional<Operation> filterOperation(Operation operation, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (GET.equals(api.getMethod())) {\n            return Optional.empty();\n        }\n        return Optional.of(operation);\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/NoOpOperationsFilter.java",
    "content": "package io.swagger.v3.core.filter.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\n\n/**\n * Does nothing\n **/\npublic class NoOpOperationsFilter extends AbstractSpecFilter {\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/NoOpenAPIFilter.java",
    "content": "package io.swagger.v3.core.filter.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.oas.models.OpenAPI;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\n/**\n * Does nothing\n **/\npublic class NoOpenAPIFilter extends AbstractSpecFilter {\n\n    public static final String VERSION = \"3.0.1\";\n\n    @Override\n    public Optional<OpenAPI> filterOpenAPI(OpenAPI openAPI, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (VERSION.equals(openAPI.getOpenapi())) {\n            return Optional.empty();\n        }\n        return Optional.of(openAPI);\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/NoParametersWithoutQueryInFilter.java",
    "content": "package io.swagger.v3.core.filter.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.core.model.ApiDescription;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.parameters.Parameter;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\n/**\n * Does nothing\n **/\npublic class NoParametersWithoutQueryInFilter extends AbstractSpecFilter {\n    private static final String QUERY_IN = \"query\";\n\n    @Override\n    public Optional<Parameter> filterParameter(Parameter parameter, Operation operation, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (QUERY_IN.equals(parameter.getIn())) {\n            return Optional.empty();\n        }\n        return Optional.of(parameter);\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/NoPathItemFilter.java",
    "content": "package io.swagger.v3.core.filter.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.core.model.ApiDescription;\nimport io.swagger.v3.oas.models.PathItem;\nimport org.apache.commons.lang3.StringUtils;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\n/**\n * Does nothing\n **/\npublic class NoPathItemFilter extends AbstractSpecFilter {\n    @Override\n    public Optional<PathItem> filterPathItem(PathItem pathItem, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (StringUtils.isBlank(pathItem.get$ref())) {\n            return Optional.empty();\n        }\n        return Optional.of(pathItem);\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/NoPetOperationsFilter.java",
    "content": "package io.swagger.v3.core.filter.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.core.model.ApiDescription;\nimport io.swagger.v3.oas.models.Operation;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\n/**\n * Sample filter to avoid all resources for the /user resource\n **/\npublic class NoPetOperationsFilter extends AbstractSpecFilter {\n\n    public static final String PET_RESOURCE = \"/pet\";\n\n    @Override\n    public Optional<Operation> filterOperation(Operation operation, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (api.getPath().startsWith(PET_RESOURCE)) {\n            return Optional.empty();\n        }\n        return Optional.of(operation);\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/NoPetRefSchemaFilter.java",
    "content": "package io.swagger.v3.core.filter.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.apache.commons.lang3.StringUtils;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\npublic class NoPetRefSchemaFilter extends AbstractSpecFilter {\n    private static final String MODEL = \"Pet\";\n\n    @Override\n    public Optional<Schema> filterSchema(Schema schema, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (schema == null || StringUtils.isBlank(schema.getXml().getName())) {\n            return Optional.of(schema);\n        }\n\n        if (schema.getXml().getName().equals(MODEL)) {\n            return Optional.empty();\n        }\n        return Optional.of(schema);\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/NoTagRefSchemaPropertyFilter.java",
    "content": "package io.swagger.v3.core.filter.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.apache.commons.lang3.StringUtils;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\npublic class NoTagRefSchemaPropertyFilter extends AbstractSpecFilter {\n    private static final String MODEL = \"Tag\";\n\n    @Override\n    public Optional<Schema> filterSchemaProperty(Schema property, Schema schema, String propName, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (property == null || StringUtils.isBlank(property.get$ref())) {\n            return Optional.of(property);\n        }\n\n        if (property.get$ref().contains(MODEL)) {\n            return Optional.empty();\n        }\n        return Optional.of(property);\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/RemoveInternalParamsFilter.java",
    "content": "package io.swagger.v3.core.filter.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.core.model.ApiDescription;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.parameters.Parameter;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\n/**\n * Sample filter to parameters if \"internal\" has been set and the header\n * \"super-user\" is not passed\n **/\npublic class RemoveInternalParamsFilter extends AbstractSpecFilter {\n    @Override\n    public Optional<Parameter> filterParameter(Parameter parameter, Operation operation, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (parameter.getDescription() != null && parameter.getDescription().startsWith(\"secret:\")) {\n            if (headers != null) {\n                if (headers.containsKey(\"super-user\")) {\n                    return Optional.of(parameter);\n                }\n            }\n            return Optional.empty();\n        }\n        return Optional.of(parameter);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/RemoveUnreferencedDefinitionsFilter.java",
    "content": "package io.swagger.v3.core.filter.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\n\n/**\n * signals to remove unreferenced definitions.\n **/\npublic class RemoveUnreferencedDefinitionsFilter extends AbstractSpecFilter {\n    @Override\n    public boolean isRemovingUnreferencedDefinitions() {\n        return true;\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/ReplaceGetOperationsFilter.java",
    "content": "package io.swagger.v3.core.filter.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.core.model.ApiDescription;\nimport io.swagger.v3.oas.models.Operation;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\n/**\n * Sample filter to avoid all get operations for the resource\n **/\npublic class ReplaceGetOperationsFilter extends AbstractSpecFilter {\n    private static final String GET = \"GET\";\n    private static final String NEW_OPERATION_ID = \"New Operation\";\n    private static final String NEW_OPERATION_DESCRIPTION = \"Replaced Operation\";\n\n    @Override\n    public Optional<Operation> filterOperation(Operation operation, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n        if (GET.equals(api.getMethod())) {\n            return Optional.of(new Operation().description(NEW_OPERATION_DESCRIPTION).\n                    operationId(NEW_OPERATION_ID));\n        }\n        return Optional.of(operation);\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/issues/Issue4339Test.java",
    "content": "package io.swagger.v3.core.issues;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.util.Configuration;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.math.BigDecimal;\n\nimport static org.testng.Assert.*;\n\n/**\n * Reproduces GitHub Issue #4339\n * Schema annotation processing isn't working with nullable and \"null\" example or default value\n *\n * Expected behavior:\n * All data types should respect nullable=true and produce null values in example/default fields\n * when example=\"null\" or defaultValue=\"null\" is specified.\n *\n * Tests both OAS 3.0 and OAS 3.1 specifications.\n *\n * @see <a href=\"https://github.com/swagger-api/swagger-core/issues/4339\">...</a>\n */\npublic class Issue4339Test {\n\n    //OAS 3.0 Tests\n    @Test\n    public void testNullableStringWithNullExampleAndDefault_OAS30() {\n        final ModelResolver modelResolver = new ModelResolver(Json.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(false);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableStringModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema nullableStringField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableStringField\");\n        assertNotNull(nullableStringField, \"nullableStringField property should exist\");\n        assertEquals(nullableStringField.getNullable(), Boolean.TRUE, \"Field should be nullable\");\n        \n        assertNull(nullableStringField.getExample(),\n            \"Example should be null for nullable field with example=\\\"null\\\", but got: \" + nullableStringField.getExample());\n        assertNull(nullableStringField.getDefault(), \n            \"Default should be null for nullable field with defaultValue=\\\"null\\\", but got: \" + nullableStringField.getDefault());\n    }\n\n    @Test\n    public void testNullableIntegerWithNullExampleAndDefault_OAS30() {\n        final ModelResolver modelResolver = new ModelResolver(Json.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(false);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableIntegerModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema nullableIntegerField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableIntegerField\");\n        assertNotNull(nullableIntegerField, \"nullableIntegerField property should exist\");\n        assertEquals(nullableIntegerField.getNullable(), Boolean.TRUE, \"Field should be nullable\");\n        \n        assertNull(nullableIntegerField.getExample(),\n            \"Example should be null for nullable integer field with example=\\\"null\\\"\");\n        assertNull(nullableIntegerField.getDefault(), \n            \"Default should be null for nullable integer field with defaultValue=\\\"null\\\"\");\n    }\n\n\n    @Test\n    public void testNullableBigDecimalWithNullExampleAndDefault_OAS30() {\n        final ModelResolver modelResolver = new ModelResolver(Json.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(false);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableBigDecimalModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema nullableBigDecimalField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableBigDecimalField\");\n        assertNotNull(nullableBigDecimalField, \"nullableBigDecimalField property should exist\");\n        assertEquals(nullableBigDecimalField.getNullable(), Boolean.TRUE, \"Field should be nullable\");\n        \n        assertNull(nullableBigDecimalField.getExample(),\n            \"Example should be null for nullable number field with example=\\\"null\\\"\");\n        assertNull(nullableBigDecimalField.getDefault(), \n            \"Default should be null for nullable number field with defaultValue=\\\"null\\\"\");\n    }\n\n    @Test\n    public void testNullableBooleanWithNullExampleAndDefault_OAS30() {\n        final ModelResolver modelResolver = new ModelResolver(Json.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(false);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableBooleanModel.class));\n\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema nullableBooleanField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableBooleanField\");\n        assertNotNull(nullableBooleanField, \"nullableBooleanField property should exist\");\n        assertEquals(nullableBooleanField.getNullable(), Boolean.TRUE, \"Field should be nullable\");\n\n        assertNull(nullableBooleanField.getExample(), \n            \"Example should be null for nullable boolean field with example=\\\"null\\\", but got: \" + nullableBooleanField.getExample());\n        assertNull(nullableBooleanField.getDefault(), \n            \"Default should be null for nullable boolean field with defaultValue=\\\"null\\\", but got: \" + nullableBooleanField.getDefault());\n    }\n\n    @Test\n    public void testNullableObjectWithNullExampleAndDefault_OAS30() {\n        final ModelResolver modelResolver = new ModelResolver(Json.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(false);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableObjectModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema nullableObjectField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableObjectField\");\n        assertNotNull(nullableObjectField, \"nullableObjectField property should exist\");\n        assertEquals(nullableObjectField.getNullable(), Boolean.TRUE, \"Field should be nullable\");\n        \n        assertNull(nullableObjectField.getExample(), \"Object example should be null\");\n        assertNull(nullableObjectField.getDefault(), \"Object default should be null\");\n    }\n\n    // OAS 3.1 Tests\n\n\n    @Test\n    public void testNullableStringWithNullExampleAndDefault_OAS31() {\n        final ModelResolver modelResolver = new ModelResolver(Json31.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(true);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableStringModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema nullableStringField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableStringField\");\n        assertNotNull(nullableStringField, \"nullableStringField property should exist\");\n        assertTrue(isNullableInOAS31(nullableStringField), \"Field should be nullable (type array should contain 'null')\");\n\n        assertNull(nullableStringField.getExample(), \n            \"Example should be null for nullable field with example=\\\"null\\\", but got: \" + nullableStringField.getExample());\n        assertNull(nullableStringField.getDefault(), \n            \"Default should be null for nullable field with defaultValue=\\\"null\\\", but got: \" + nullableStringField.getDefault());\n    }\n\n    @Test\n    public void testNullableIntegerWithNullExampleAndDefault_OAS31() {\n        final ModelResolver modelResolver = new ModelResolver(Json31.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(true);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableIntegerModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema nullableIntegerField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableIntegerField\");\n        assertNotNull(nullableIntegerField, \"nullableIntegerField property should exist\");\n        assertTrue(isNullableInOAS31(nullableIntegerField), \"Field should be nullable (type array should contain 'null')\");\n        \n        assertNull(nullableIntegerField.getExample(),\n            \"Example should be null for nullable integer field with example=\\\"null\\\"\");\n        assertNull(nullableIntegerField.getDefault(), \n            \"Default should be null for nullable integer field with defaultValue=\\\"null\\\"\");\n    }\n\n    @Test\n    public void testNullableBigDecimalWithNullExampleAndDefault_OAS31() {\n        final ModelResolver modelResolver = new ModelResolver(Json31.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(true);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableBigDecimalModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema nullableBigDecimalField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableBigDecimalField\");\n        assertNotNull(nullableBigDecimalField, \"nullableBigDecimalField property should exist\");\n        assertTrue(isNullableInOAS31(nullableBigDecimalField), \"Field should be nullable (type array should contain 'null')\");\n        \n        assertNull(nullableBigDecimalField.getExample(),\n            \"Example should be null for nullable number field with example=\\\"null\\\"\");\n        assertNull(nullableBigDecimalField.getDefault(), \n            \"Default should be null for nullable number field with defaultValue=\\\"null\\\"\");\n    }\n\n\n    @Test\n    public void testNullableBooleanWithNullExampleAndDefault_OAS31() {\n        final ModelResolver modelResolver = new ModelResolver(Json31.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(true);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableBooleanModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema nullableBooleanField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableBooleanField\");\n        assertNotNull(nullableBooleanField, \"nullableBooleanField property should exist\");\n        assertTrue(isNullableInOAS31(nullableBooleanField), \"Field should be nullable (type array should contain 'null')\");\n        \n\n        assertNull(nullableBooleanField.getExample(), \n            \"Example should be null for nullable boolean field with example=\\\"null\\\", but got: \" + nullableBooleanField.getExample());\n        assertNull(nullableBooleanField.getDefault(), \n            \"Default should be null for nullable boolean field with defaultValue=\\\"null\\\", but got: \" + nullableBooleanField.getDefault());\n    }\n\n\n    @Test\n    public void testNullableObjectWithNullExampleAndDefault_OAS31() {\n        final ModelResolver modelResolver = new ModelResolver(Json31.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(true);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableObjectModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema nullableObjectField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableObjectField\");\n        assertNotNull(nullableObjectField, \"nullableObjectField property should exist\");\n        assertTrue(isNullableInOAS31(nullableObjectField), \"Field should be nullable (type array should contain 'null')\");\n        \n        assertNull(nullableObjectField.getExample(), \"Object example should be null\");\n        assertNull(nullableObjectField.getDefault(), \"Object default should be null\");\n    }\n\n    // Tests for omitted example/default values\n\n\n    @Test\n    public void testNullableWithoutExampleOrDefault_OAS30() {\n        final ModelResolver modelResolver = new ModelResolver(Json.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(false);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableWithoutExampleDefaultModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema stringField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"stringField\");\n        assertNotNull(stringField, \"stringField property should exist\");\n        assertEquals(stringField.getNullable(), Boolean.TRUE, \"Field should be nullable\");\n        assertNull(stringField.getExample(), \"Example should be null (not set)\");\n        assertNull(stringField.getDefault(), \"Default should be null (not set)\");\n\n        io.swagger.v3.oas.models.media.Schema integerField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"integerField\");\n        assertNotNull(integerField, \"integerField property should exist\");\n        assertEquals(integerField.getNullable(), Boolean.TRUE, \"Field should be nullable\");\n        assertNull(integerField.getExample(), \"Example should be null (not set)\");\n        assertNull(integerField.getDefault(), \"Default should be null (not set)\");\n\n        io.swagger.v3.oas.models.media.Schema booleanField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"booleanField\");\n        assertNotNull(booleanField, \"booleanField property should exist\");\n        assertEquals(booleanField.getNullable(), Boolean.TRUE, \"Field should be nullable\");\n        assertNull(booleanField.getExample(), \"Example should be null (not set)\");\n        assertNull(booleanField.getDefault(), \"Default should be null (not set)\");\n    }\n\n    @Test\n    public void testNullableWithoutExampleOrDefault_OAS31() {\n        final ModelResolver modelResolver = new ModelResolver(Json31.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(true);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableWithoutExampleDefaultModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema stringField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"stringField\");\n        assertNotNull(stringField, \"stringField property should exist\");\n        assertTrue(isNullableInOAS31(stringField), \"Field should be nullable (type array should contain 'null')\");\n        assertNull(stringField.getExample(), \"Example should be null (not set)\");\n        assertNull(stringField.getDefault(), \"Default should be null (not set)\");\n\n        io.swagger.v3.oas.models.media.Schema integerField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"integerField\");\n        assertNotNull(integerField, \"integerField property should exist\");\n        assertTrue(isNullableInOAS31(integerField), \"Field should be nullable (type array should contain 'null')\");\n        assertNull(integerField.getExample(), \"Example should be null (not set)\");\n        assertNull(integerField.getDefault(), \"Default should be null (not set)\");\n\n        io.swagger.v3.oas.models.media.Schema booleanField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"booleanField\");\n        assertNotNull(booleanField, \"booleanField property should exist\");\n        assertTrue(isNullableInOAS31(booleanField), \"Field should be nullable (type array should contain 'null')\");\n        assertNull(booleanField.getExample(), \"Example should be null (not set)\");\n        assertNull(booleanField.getDefault(), \"Default should be null (not set)\");\n    }\n\n    @Test\n    public void testNullableWithDefaultOnly_OAS30() {\n        final ModelResolver modelResolver = new ModelResolver(Json.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(false);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableWithDefaultOnlyModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema stringField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"stringField\");\n        assertNotNull(stringField, \"stringField property should exist\");\n        assertNull(stringField.getExample(), \"Example should be null (not set)\");\n        assertEquals(stringField.getDefault(), \"defaultValue\", \"Default should be 'defaultValue'\");\n    }\n\n    @Test\n    public void testNullableWithExampleOnly_OAS30() {\n        final ModelResolver modelResolver = new ModelResolver(Json.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(false);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableWithExampleOnlyModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema stringField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"stringField\");\n        assertNotNull(stringField, \"stringField property should exist\");\n        assertEquals(stringField.getExample(), \"exampleValue\", \"Example should be 'exampleValue'\");\n        assertNull(stringField.getDefault(), \"Default should be null (not set)\");\n    }\n\n    // ========== Tests for nullable=false with example/default=\"null\" ==========\n\n    /**\n     * Test non-nullable field with example=\"null\" and defaultValue=\"null\" - OAS 3.0\n     * When nullable=false, \"null\" string should NOT be parsed as null value\n     * It should be treated as the literal string \"null\"\n     */\n    @Test\n    public void testNonNullableStringWithNullExampleAndDefault_OAS30() {\n        final ModelResolver modelResolver = new ModelResolver(Json.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(false);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NonNullableStringModel.class));\n\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema stringField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"stringField\");\n        assertNotNull(stringField, \"stringField property should exist\");\n        assertNull(stringField.getNullable(), \"Field should not have nullable set (or be false)\");\n\n        // When nullable=false, \"null\" string should be treated as literal string \"null\", not null value\n        assertEquals(stringField.getExample(), \"null\",\n                \"Example should be the string \\\"null\\\", not null value when nullable=false\");\n        assertEquals(stringField.getDefault(), \"null\",\n                \"Default should be the string \\\"null\\\", not null value when nullable=false\");\n    }\n\n    /**\n     * Test non-nullable field with example=\"null\" and defaultValue=\"null\" - OAS 3.1\n     * When nullable=false, \"null\" string should NOT be parsed as null value\n     */\n    @Test\n    public void testNonNullableStringWithNullExampleAndDefault_OAS31() {\n        final ModelResolver modelResolver = new ModelResolver(Json31.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(true);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NonNullableStringModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema stringField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"stringField\");\n        assertNotNull(stringField, \"stringField property should exist\");\n        assertNull(stringField.getNullable(), \"Field should not have nullable set in OAS 3.1\");\n\n        // When nullable=false, \"null\" string should be treated as literal string \"null\", not null value\n        assertEquals(stringField.getExample(), \"null\",\n                \"Example should be the string \\\"null\\\", not null value when nullable=false\");\n        assertEquals(stringField.getDefault(), \"null\",\n                \"Default should be the string \\\"null\\\", not null value when nullable=false\");\n    }\n\n    /**\n     * Test non-nullable Boolean field - OAS 3.0\n     */\n    @Test\n    public void testNonNullableBooleanWithNullExampleAndDefault_OAS30() {\n        final ModelResolver modelResolver = new ModelResolver(Json.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(false);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NonNullableBooleanModel.class));\n\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema booleanField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"booleanField\");\n        assertNotNull(booleanField, \"booleanField property should exist\");\n        assertNull(booleanField.getNullable(), \"Field should not have nullable set\");\n\n        assertEquals(booleanField.getExample(), false,\n                \"Should convert to false\");\n        assertEquals(booleanField.getDefault(), false,\n                \"Should convert to false\");\n    }\n\n    /**\n     * Test non-nullable Integer field - OAS 3.1\n     * Should treat \"null\" as string, not parse to null value\n     */\n    @Test\n    public void testNonNullableIntegerWithNullExampleAndDefault_OAS31() {\n        final ModelResolver modelResolver = new ModelResolver(Json31.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(true);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NonNullableIntegerModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema integerField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"integerField\");\n        assertNotNull(integerField, \"integerField property should exist\");\n\n        assertEquals(integerField.getExample(), \"null\",\n                \"Example should be the string \\\"null\\\", not null value\");\n        assertEquals(integerField.getDefault(), \"null\",\n                \"Default should be the string \\\"null\\\", not null value\");\n    }\n\n    // ========== Test for Issue #4229 (same root cause as #4339) ==========\n\n    /**\n     * Test case from Issue #4229: Nullable Integer ignores example value \"null\" and defaults to 0\n     * https://github.com/swagger-api/swagger-core/issues/4229\n     * This should now be fixed by the same changes that fix #4339\n     */\n    @Test\n    public void testIssue4229_NullableIntegerWithNullExample() {\n        final ModelResolver modelResolver = new ModelResolver(Json.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(false);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(Issue4229TestData.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema idSchema =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"id\");\n        assertNotNull(idSchema, \"id property should exist\");\n        assertEquals(idSchema.getNullable(), Boolean.TRUE, \"Field should be nullable\");\n\n        // Issue #4229: exampleSetFlag should be true and example should be null, not 0\n        assertTrue(idSchema.getExampleSetFlag(),\n                \"exampleSetFlag should be true when example=\\\"null\\\" is set\");\n        assertNull(idSchema.getExample(),\n                \"Example should be null, not 0 (fixes issue #4229)\");\n    }\n\n    // ========== Tests for OAS 3.1 \"examples\" array field ==========\n\n    /**\n     * Test OAS 3.1 examples array with null value\n     * In OAS 3.1, there's an \"examples\" array field in addition to the single \"example\" field\n     */\n    @Test\n    public void testNullableStringWithNullInExamplesArray_OAS31() {\n        final ModelResolver modelResolver = new ModelResolver(Json31.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(true);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableStringWithExamplesModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema stringField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"stringField\");\n        assertNotNull(stringField, \"stringField property should exist\");\n        assertTrue(isNullableInOAS31(stringField), \"Field should be nullable (type array should contain 'null')\");\n\n        assertNotNull(stringField.getExamples(), \"examples array should exist\");\n        assertEquals(stringField.getExamples().size(), 3, \"examples array should have 3 elements\");\n\n        assertTrue(stringField.getExamples().contains(\"validValue\"), \"examples should contain 'validValue'\");\n        assertTrue(stringField.getExamples().contains(null), \"examples should contain null value\");\n        assertTrue(stringField.getExamples().contains(\"anotherValue\"), \"examples should contain 'anotherValue'\");\n    }\n\n    /**\n     * Test OAS 3.1 examples array with multiple values including null\n     */\n    @Test\n    public void testNullableIntegerWithMultipleExamplesIncludingNull_OAS31() {\n        final ModelResolver modelResolver = new ModelResolver(Json31.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(true);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableIntegerWithMultipleExamplesModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema integerField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"integerField\");\n        assertNotNull(integerField, \"integerField property should exist\");\n\n        assertNotNull(integerField.getExamples(), \"examples array should exist\");\n        assertEquals(integerField.getExamples().size(), 3, \"examples array should have 3 elements\");\n\n        assertTrue(integerField.getExamples().contains(\"1\"), \"examples should contain '1' as string\");\n        assertTrue(integerField.getExamples().contains(null), \"examples should contain null value\");\n        assertTrue(integerField.getExamples().contains(\"100\"), \"examples should contain '100' as string\");\n    }\n\n    /**\n     * Test that examples array is NOT set in OAS 3.0 (only OAS 3.1)\n     * \n     * Note: In OAS 3.0, the 'examples' field (plural, as array) is only valid on:\n     * - Parameter Object (parameters[*].examples) - as Map<String, Example>\n     * - Media Type Object (content[media-type].examples) - as Map<String, Example>\n     * - Header Object (headers[*].examples) - as Map<String, Example>\n     * \n     * For Schema objects, OAS 3.0 only supports the singular 'example' field.\n     * The 'examples' array was added to Schema objects in OAS 3.1.\n     */\n    @Test\n    public void testExamplesArrayNotSetInOAS30() {\n        final ModelResolver modelResolver = new ModelResolver(Json.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(false);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableStringWithExamplesModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema stringField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"stringField\");\n        assertNotNull(stringField, \"stringField property should exist\");\n        assertEquals(stringField.getNullable(), Boolean.TRUE, \"Field should be nullable\");\n\n        assertNull(stringField.getExamples(), \"examples array should NOT be set in OAS 3.0\");\n    }\n\n    /**\n     * Test that when both example and examples are set, only examples is used in OAS 3.1\n     * The single example field is ignored by design when examples array is present\n     */\n    @Test\n    public void testExamplesArrayTakesPrecedenceOverExample_OAS31() {\n        final ModelResolver modelResolver = new ModelResolver(Json31.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(true);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(BothExampleAndExamplesModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        io.swagger.v3.oas.models.media.Schema stringField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"stringField\");\n        assertNotNull(stringField, \"stringField property should exist\");\n        assertTrue(isNullableInOAS31(stringField), \"Field should be nullable (type array should contain 'null')\");\n\n        assertNull(stringField.getExample(),\n                \"example field should be null/not set when examples array is present\");\n        assertNotNull(stringField.getExamples(), \"examples array should be set\");\n        assertEquals(stringField.getExamples().size(), 3, \"examples array should have 3 elements\");\n\n        assertTrue(stringField.getExamples().contains(\"arrayValue1\"), \"examples should contain 'arrayValue1'\");\n        assertTrue(stringField.getExamples().contains(null), \"examples should contain null\");\n        assertTrue(stringField.getExamples().contains(\"arrayValue3\"), \"examples should contain 'arrayValue3'\");\n\n        assertFalse(stringField.getExamples().contains(\"singleExampleValue\"),\n                \"examples should NOT contain the value from single example field\");\n    }\n\n    private boolean isNullableInOAS31(io.swagger.v3.oas.models.media.Schema schema) {\n        if (schema.getTypes() != null && schema.getTypes().contains(\"null\")) {\n            return true;\n        }\n        return false;\n    }\n\n    // Test model classes\n\n    public static class NullableStringModel {\n        @Schema(nullable = true, example = \"null\", defaultValue = \"null\")\n        private String nullableStringField;\n\n        public String getNullableStringField() {\n            return nullableStringField;\n        }\n\n        public void setNullableStringField(String nullableStringField) {\n            this.nullableStringField = nullableStringField;\n        }\n    }\n\n    public static class NullableIntegerModel {\n        @Schema(nullable = true, example = \"null\", defaultValue = \"null\")\n        private Integer nullableIntegerField;\n\n        public Integer getNullableIntegerField() {\n            return nullableIntegerField;\n        }\n\n        public void setNullableIntegerField(Integer nullableIntegerField) {\n            this.nullableIntegerField = nullableIntegerField;\n        }\n    }\n\n    public static class NullableBigDecimalModel {\n        @Schema(nullable = true, example = \"null\", defaultValue = \"null\")\n        private BigDecimal nullableBigDecimalField;\n\n        public BigDecimal getNullableBigDecimalField() {\n            return nullableBigDecimalField;\n        }\n\n        public void setNullableBigDecimalField(BigDecimal nullableBigDecimalField) {\n            this.nullableBigDecimalField = nullableBigDecimalField;\n        }\n    }\n\n    public static class NullableBooleanModel {\n        @Schema(nullable = true, example = \"null\", defaultValue = \"null\")\n        private Boolean nullableBooleanField;\n\n        public Boolean getNullableBooleanField() {\n            return nullableBooleanField;\n        }\n\n        public void setNullableBooleanField(Boolean nullableBooleanField) {\n            this.nullableBooleanField = nullableBooleanField;\n        }\n    }\n\n    public static class NullableObjectModel {\n        @Schema(nullable = true, example = \"null\", defaultValue = \"null\")\n        private Object nullableObjectField;\n\n        public Object getNullableObjectField() {\n            return nullableObjectField;\n        }\n\n        public void setNullableObjectField(Object nullableObjectField) {\n            this.nullableObjectField = nullableObjectField;\n        }\n    }\n\n\n    public static class NullableWithoutExampleDefaultModel {\n        @Schema(nullable = true)\n        private String stringField;\n\n        @Schema(nullable = true)\n        private Integer integerField;\n\n        @Schema(nullable = true)\n        private Boolean booleanField;\n\n        public String getStringField() {\n            return stringField;\n        }\n\n        public void setStringField(String stringField) {\n            this.stringField = stringField;\n        }\n\n        public Integer getIntegerField() {\n            return integerField;\n        }\n\n        public void setIntegerField(Integer integerField) {\n            this.integerField = integerField;\n        }\n\n        public Boolean getBooleanField() {\n            return booleanField;\n        }\n\n        public void setBooleanField(Boolean booleanField) {\n            this.booleanField = booleanField;\n        }\n    }\n\n    public static class NullableWithDefaultOnlyModel {\n        @Schema(nullable = true, defaultValue = \"defaultValue\")\n        private String stringField;\n\n        public String getStringField() {\n            return stringField;\n        }\n\n        public void setStringField(String stringField) {\n            this.stringField = stringField;\n        }\n    }\n\n    public static class NullableWithExampleOnlyModel {\n        @Schema(nullable = true, example = \"exampleValue\")\n        private String stringField;\n\n        public String getStringField() {\n            return stringField;\n        }\n\n        public void setStringField(String stringField) {\n            this.stringField = stringField;\n        }\n    }\n\n\n    // Test model classes for non-nullable fields with null example/default\n\n    public static class NonNullableStringModel {\n        @Schema(nullable = false, example = \"null\", defaultValue = \"null\")\n        private String stringField;\n\n        public String getStringField() {\n            return stringField;\n        }\n\n        public void setStringField(String stringField) {\n            this.stringField = stringField;\n        }\n    }\n\n    public static class NonNullableBooleanModel {\n        @Schema(nullable = false, example = \"null\", defaultValue = \"null\")\n        private Boolean booleanField;\n\n        public Boolean getBooleanField() {\n            return booleanField;\n        }\n\n        public void setBooleanField(Boolean booleanField) {\n            this.booleanField = booleanField;\n        }\n    }\n\n    public static class NonNullableIntegerModel {\n        @Schema(nullable = false, example = \"null\", defaultValue = \"null\")\n        private Integer integerField;\n\n        public Integer getIntegerField() {\n            return integerField;\n        }\n\n        public void setIntegerField(Integer integerField) {\n            this.integerField = integerField;\n        }\n    }\n\n    /**\n     * Test model class for Issue #4229\n     * Matches the exact example from the issue report\n     */\n    public static class Issue4229TestData {\n        @Schema(nullable = true, example = \"null\")\n        private Integer id;\n\n        public Integer getId() {\n            return id;\n        }\n\n        public void setId(Integer id) {\n            this.id = id;\n        }\n    }\n\n    /**\n     * Test model with examples array containing \"null\" string in OAS 3.1\n     */\n    public static class NullableStringWithExamplesModel {\n        @Schema(nullable = true, examples = {\"validValue\", \"null\", \"anotherValue\"})\n        private String stringField;\n\n        public String getStringField() {\n            return stringField;\n        }\n\n        public void setStringField(String stringField) {\n            this.stringField = stringField;\n        }\n    }\n\n    /**\n     * Test model with examples array containing multiple values including \"null\"\n     */\n    public static class NullableIntegerWithMultipleExamplesModel {\n        @Schema(nullable = true, examples = {\"1\", \"null\", \"100\"})\n        private Integer integerField;\n\n        public Integer getIntegerField() {\n            return integerField;\n        }\n\n        public void setIntegerField(Integer integerField) {\n            this.integerField = integerField;\n        }\n    }\n\n\n    /**\n     * Test model with both example and examples set\n     * Only examples should be used in the generated OpenAPI\n     */\n    public static class BothExampleAndExamplesModel {\n        @Schema(nullable = true, example = \"singleExampleValue\", examples = {\"arrayValue1\", \"null\", \"arrayValue3\"})\n        private String stringField;\n\n        public String getStringField() {\n            return stringField;\n        }\n\n        public void setStringField(String stringField) {\n            this.stringField = stringField;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/issues/Issue4838Test.java",
    "content": "package io.swagger.v3.core.issues;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.util.Configuration;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport org.checkerframework.checker.nullness.qual.NonNull;\nimport org.testng.annotations.Test;\n\nimport java.math.BigDecimal;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class Issue4838Test {\n\n    @Test\n    public void defaultValueShouldBeEmptyForStringFieldInOas30() {\n        final ModelConverterContextImpl context = getModelConverterContext(Json.mapper(), false);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableStringModel.class));\n\n        io.swagger.v3.oas.models.media.Schema nullableStringField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableStringField\");\n\n        assertNotNull(nullableStringField);\n        assertTrue(nullableStringField.getNullable());\n        assertNotNull(nullableStringField.getDefault());\n        assertEquals(nullableStringField.getDefault(), \"\");\n    }\n\n    @Test\n    public void defaultValueShouldBeNullForIntegerFieldInOas30() {\n        final ModelConverterContextImpl context = getModelConverterContext(Json.mapper(), false);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableIntegerModel.class));\n\n        io.swagger.v3.oas.models.media.Schema nullableIntegerField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableIntegerField\");\n\n        assertNotNull(nullableIntegerField);\n        assertTrue(nullableIntegerField.getNullable());\n        assertNull(nullableIntegerField.getExample());\n        assertNull(nullableIntegerField.getDefault());\n    }\n\n\n    @Test\n    public void defaultValueShouldBeProvidedFromBigDecimalSchemaForOas30() {\n        final ModelConverterContextImpl context = getModelConverterContext(Json.mapper(), false);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableBigDecimalModel.class));\n\n        io.swagger.v3.oas.models.media.Schema nullableBigDecimalField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableBigDecimalField\");\n\n        System.out.println(nullableBigDecimalField);\n        assertNotNull(nullableBigDecimalField);\n        assertTrue(nullableBigDecimalField.getNullable());\n        assertNull(nullableBigDecimalField.getExample());\n        assertEquals(nullableBigDecimalField.getDefault().toString(), \"123\");\n    }\n\n    @Test\n    public void defaultValueShouldBeNullProvidedFromBooleanSchemaForOas30() {\n        final ModelConverterContextImpl context = getModelConverterContext(Json.mapper(), false);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableBooleanModel.class));\n\n        io.swagger.v3.oas.models.media.Schema nullableBooleanField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableBooleanField\");\n\n        assertNotNull(nullableBooleanField);\n        assertTrue(nullableBooleanField.getNullable());\n        assertNull(nullableBooleanField.getExample());\n        assertNull(nullableBooleanField.getDefault());\n    }\n\n    @Test\n    public void defaultValueShouldBeEmptyForStringFieldInOas31() {\n        final ModelConverterContextImpl context = getModelConverterContext(Json31.mapper(), true);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableStringModel.class));\n\n        io.swagger.v3.oas.models.media.Schema nullableStringField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableStringField\");\n\n        assertNotNull(nullableStringField);\n        assertTrue(isNullableInOAS31(nullableStringField));\n        assertNotNull(nullableStringField.getDefault());\n        assertEquals(nullableStringField.getDefault(), \"\");\n    }\n\n    @Test\n    public void defaultValueShouldBeNullForIntegerFieldInOas31() {\n        final ModelConverterContextImpl context = getModelConverterContext(Json31.mapper(), true);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableIntegerModel.class));\n\n        io.swagger.v3.oas.models.media.Schema nullableIntegerField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableIntegerField\");\n\n        assertNotNull(nullableIntegerField);\n        assertTrue(isNullableInOAS31(nullableIntegerField));\n        assertNull(nullableIntegerField.getExample());\n        assertNull(nullableIntegerField.getDefault());\n    }\n\n    @Test\n    public void defaultValueShouldBeProvidedFromBigDecimalSchemaForOas31() {\n        final ModelConverterContextImpl context = getModelConverterContext(Json31.mapper(), true);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableBigDecimalModel.class));\n\n        io.swagger.v3.oas.models.media.Schema nullableBigDecimalField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableBigDecimalField\");\n\n        assertNotNull(nullableBigDecimalField);\n        assertTrue(isNullableInOAS31(nullableBigDecimalField));\n        assertNull(nullableBigDecimalField.getExample());\n        assertEquals(nullableBigDecimalField.getDefault(), 123);\n    }\n\n\n    @Test\n    public void defaultValueShouldBeNullProvidedFromBooleanSchemaForOas31() {\n        final ModelConverterContextImpl context = getModelConverterContext(Json31.mapper(), true);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableBooleanModel.class));\n\n        io.swagger.v3.oas.models.media.Schema nullableBooleanField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableBooleanField\");\n\n        assertNotNull(nullableBooleanField);\n        assertTrue(isNullableInOAS31(nullableBooleanField));\n        assertNull(nullableBooleanField.getExample());\n        assertNull(nullableBooleanField.getDefault());\n    }\n\n    private static @NonNull ModelConverterContextImpl getModelConverterContext(ObjectMapper mapper, boolean openAPI31) {\n        final ModelResolver modelResolver = new ModelResolver(mapper);\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(openAPI31);\n        modelResolver.setConfiguration(configuration);\n        return new ModelConverterContextImpl(modelResolver);\n    }\n\n    private boolean isNullableInOAS31(io.swagger.v3.oas.models.media.Schema schema) {\n        return schema.getTypes() != null && schema.getTypes().contains(\"null\");\n    }\n\n    public static class NullableStringModel {\n        @Schema(nullable = true, defaultValue = \"\")\n        private String nullableStringField;\n\n        public String getNullableStringField() {\n            return nullableStringField;\n        }\n\n        public void setNullableStringField(String nullableStringField) {\n            this.nullableStringField = nullableStringField;\n        }\n    }\n\n    public static class NullableIntegerModel {\n        @Schema(nullable = true, defaultValue = \"null\")\n        private Integer nullableIntegerField;\n\n        public Integer getNullableIntegerField() {\n            return nullableIntegerField;\n        }\n\n        public void setNullableIntegerField(Integer nullableIntegerField) {\n            this.nullableIntegerField = nullableIntegerField;\n        }\n    }\n\n    public static class NullableBigDecimalModel {\n        @Schema(nullable = true, defaultValue = \"123\")\n        private BigDecimal nullableBigDecimalField;\n\n        public BigDecimal getNullableBigDecimalField() {\n            return nullableBigDecimalField;\n        }\n\n        public void setNullableBigDecimalField(BigDecimal nullableBigDecimalField) {\n            this.nullableBigDecimalField = nullableBigDecimalField;\n        }\n    }\n\n    public static class NullableBooleanModel {\n        @Schema(nullable = true)\n        private Boolean nullableBooleanField;\n\n        public Boolean getNullableBooleanField() {\n            return nullableBooleanField;\n        }\n\n        public void setNullableBooleanField(Boolean nullableBooleanField) {\n            this.nullableBooleanField = nullableBooleanField;\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/issues/Issue5001Test.java",
    "content": "package io.swagger.v3.core.issues;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.util.Configuration;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport org.testng.annotations.Test;\n\nimport javax.annotation.Nullable;\nimport java.util.Set;\n\nimport static org.testng.Assert.*;\n\n/**\n * Reproduces GitHub Issue #5001\n * Native support for @Nullable annotations to generate proper nullable types\n *\n * Tests that @Nullable annotation is recognized and generates appropriate nullable output:\n * - OAS 3.0: nullable keyword\n * - OAS 3.1: type array with \"null\"\n *\n * Note: This test uses javax.annotation.Nullable which is automatically transformed to\n * jakarta.annotation.Nullable in the swagger-core-jakarta module via the Eclipse Transformer.\n *\n * @see <a href=\"https://github.com/swagger-api/swagger-core/issues/5001\">...</a>\n */\npublic class Issue5001Test {\n\n    /**\n     * Tests @Nullable annotation with OAS 3.1 (type array output)\n     */\n    @Test\n    public void testNullableWithOAS31() throws Exception {\n        final ModelResolver modelResolver = new ModelResolver(Json31.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(true);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        // Field with @Nullable should generate type array [\"string\", \"null\"]\n        io.swagger.v3.oas.models.media.Schema nullableField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableString\");\n        assertNotNull(nullableField, \"nullableString property should exist\");\n        assertNotNull(nullableField.getTypes(), \"@Nullable should generate types array in OAS 3.1\");\n        assertTrue(nullableField.getTypes().contains(\"string\"), \"types should include 'string'\");\n        assertTrue(nullableField.getTypes().contains(\"null\"), \"types should include 'null'\");\n        assertEquals(((Set<?>) nullableField.getTypes()).size(), 2, \"Should have exactly 2 types\");\n        \n        assertNull(nullableField.getNullable(),\n            \"OAS 3.1: @Nullable should NOT set nullable property - only use types array. \" +\n            \"Setting nullable property is a spec violation in OpenAPI 3.1\");\n\n        // Non-nullable field should only have string type\n        io.swagger.v3.oas.models.media.Schema requiredField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"requiredString\");\n        assertNotNull(requiredField);\n        assertNotNull(requiredField.getTypes());\n        assertTrue(requiredField.getTypes().contains(\"string\"));\n        assertFalse(requiredField.getTypes().contains(\"null\"), \"Non-nullable field should not have 'null' type\");\n    }\n\n    /**\n     * Tests @Nullable annotation with OAS 3.0 (nullable keyword output)\n     */\n    @Test\n    public void testNullableWithOAS30() throws Exception {\n        final ModelResolver modelResolver = new ModelResolver(Json.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(false);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(NullableModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        // Field with @Nullable should set nullable=true in OAS 3.0\n        io.swagger.v3.oas.models.media.Schema nullableField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"nullableString\");\n        assertNotNull(nullableField, \"nullableString property should exist\");\n        assertEquals(nullableField.getNullable(), Boolean.TRUE, \"@Nullable should set nullable=true in OAS 3.0\");\n        assertEquals(nullableField.getType(), \"string\", \"type should be 'string'\");\n\n        // Non-nullable field should not have nullable property\n        io.swagger.v3.oas.models.media.Schema requiredField =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"requiredString\");\n        assertNotNull(requiredField);\n        assertNotEquals(requiredField.getNullable(), Boolean.TRUE, \"Non-nullable field should not be nullable\");\n    }\n\n    /**\n     * Tests explicit @Schema annotations with OAS 3.1\n     */\n    @Test\n    public void testExplicitSchemaAnnotationsWithOAS31() throws Exception {\n        final ModelResolver modelResolver = new ModelResolver(Json31.mapper());\n        Configuration configuration = new Configuration();\n        configuration.setOpenAPI31(true);\n        modelResolver.setConfiguration(configuration);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final io.swagger.v3.oas.models.media.Schema model = context\n                .resolve(new AnnotatedType(ExplicitSchemaModel.class));\n\n        assertNotNull(model);\n        assertNotNull(model.getProperties());\n\n        // @Schema(nullable=true) should generate types array but not set nullable property in OAS 3.1\n        io.swagger.v3.oas.models.media.Schema explicitNullable =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"explicitNullableString\");\n        assertNotNull(explicitNullable);\n        assertTrue(explicitNullable.getTypes().contains(\"string\"));\n        assertTrue(explicitNullable.getTypes().contains(\"null\"));\n\n        assertNull(explicitNullable.getNullable(),\n            \"OAS 3.1 SPEC VIOLATION: @Schema(nullable=true) should NOT set nullable property - \" +\n            \"only use types array. The nullable keyword doesn't exist in OpenAPI 3.1 spec\");\n\n\n        // @Schema(types={\"string\", \"null\"}) should work\n        io.swagger.v3.oas.models.media.Schema explicitTypes =\n                (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"explicitTypesString\");\n        assertNotNull(explicitTypes);\n        assertNotNull(explicitTypes.getTypes());\n        assertTrue(explicitTypes.getTypes().contains(\"string\"));\n        assertTrue(explicitTypes.getTypes().contains(\"null\"));\n    }\n\n    /**\n     * Model using @Nullable annotation\n     * Note: Uses javax.annotation.Nullable which gets transformed to jakarta.annotation.Nullable\n     * in the swagger-core-jakarta module\n     */\n    public static class NullableModel {\n        @Nullable\n        private String nullableString;\n\n        private String requiredString;\n\n        public String getNullableString() {\n            return nullableString;\n        }\n\n        public void setNullableString(String nullableString) {\n            this.nullableString = nullableString;\n        }\n\n        public String getRequiredString() {\n            return requiredString;\n        }\n\n        public void setRequiredString(String requiredString) {\n            this.requiredString = requiredString;\n        }\n    }\n\n    /**\n     * Model using explicit @Schema annotations\n     */\n    public static class ExplicitSchemaModel {\n        @Schema(nullable = true)\n        private String explicitNullableString;\n\n        @Schema(types = {\"string\", \"null\"})\n        private String explicitTypesString;\n\n        public String getExplicitNullableString() {\n            return explicitNullableString;\n        }\n\n        public void setExplicitNullableString(String explicitNullableString) {\n            this.explicitNullableString = explicitNullableString;\n        }\n\n        public String getExplicitTypesString() {\n            return explicitTypesString;\n        }\n\n        public void setExplicitTypesString(String explicitTypesString) {\n            this.explicitTypesString = explicitTypesString;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/matchers/SerializationMatchers.java",
    "content": "package io.swagger.v3.core.matchers;\n\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.node.NumericNode;\nimport com.fasterxml.jackson.databind.node.ObjectNode;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.core.util.Yaml31;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.io.IOException;\nimport java.util.Comparator;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class SerializationMatchers {\n    private static final Logger LOGGER = LoggerFactory.getLogger(SerializationMatchers.class);\n\n    public static void assertEqualsToYaml(Object objectToSerialize, String yamlStr) {\n        apply(objectToSerialize, yamlStr, Yaml.mapper());\n    }\n\n    public static void assertEqualsToJson(Object objectToSerialize, String jsonStr) {\n        apply(objectToSerialize, jsonStr, Json.mapper());\n    }\n\n    public static void assertEqualsToYaml31(Object objectToSerialize, String yamlStr) {\n        apply31(objectToSerialize, yamlStr, Yaml31.mapper());\n    }\n\n    public static void assertEqualsToJson31(Object objectToSerialize, String jsonStr) {\n        apply31(objectToSerialize, jsonStr, Json31.mapper());\n    }\n\n    private static void apply(Object objectToSerialize, String str, ObjectMapper mapper) {\n        final ObjectNode lhs = mapper.convertValue(objectToSerialize, ObjectNode.class);\n        ObjectNode rhs = null;\n        try {\n            rhs = mapper.readValue(str, ObjectNode.class);\n        } catch (IOException e) {\n            LOGGER.error(\"Failed to read value\", e);\n        }\n        if (!lhs.equals(new ObjectNodeComparator(), rhs)) {\n            assertEquals(Yaml.pretty(lhs), Yaml.pretty(rhs));\n        }\n    }\n\n    private static void apply31(Object objectToSerialize, String str, ObjectMapper mapper) {\n        final ObjectNode lhs = mapper.convertValue(objectToSerialize, ObjectNode.class);\n        ObjectNode rhs = null;\n        try {\n            rhs = mapper.readValue(str, ObjectNode.class);\n        } catch (IOException e) {\n            LOGGER.error(\"Failed to read value\", e);\n        }\n        if (!lhs.equals(new ObjectNodeComparator(), rhs)) {\n            assertEquals(Yaml31.pretty(lhs), Yaml31.pretty(rhs));\n        }\n    }\n\n    static final class ObjectNodeComparator implements Comparator<JsonNode> {\n        @Override\n        public int compare(JsonNode o1, JsonNode o2) {\n            if (o1.equals(o2)) {\n                return 0;\n            }\n            if ((o1 instanceof NumericNode) && (o2 instanceof NumericNode)) {\n                double d1 = ((NumericNode) o1).asDouble();\n                double d2 = ((NumericNode) o2).asDouble();\n                return Double.compare(d1, d2);\n            }\n            int comp = o1.asText().compareTo(o2.asText());\n            if (comp == 0) {\n                return Integer.compare(o1.hashCode(), o2.hashCode());\n            }\n            return comp;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Address.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport javax.xml.bind.annotation.XmlElement;\n\npublic class Address {\n    private Integer streetNumber;\n\n    @XmlElement(name = \"streetNumber\")\n    public Integer getStreetNumber() {\n        return streetNumber;\n    }\n\n    public void setStreetNumber(Integer streetNumber) {\n        this.streetNumber = streetNumber;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ApiFirstRequiredFieldModel.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlAccessType;\nimport javax.xml.bind.annotation.XmlAccessorType;\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement\n@XmlAccessorType(XmlAccessType.FIELD)\n@Schema(name = \"aaa\")\npublic class ApiFirstRequiredFieldModel {\n    @Schema(name = \"bla\", required = true)\n    @XmlElement(name = \"a\")\n    public String getA() {\n        return \"aaa\";\n    }\n\n    public String getC() {\n        return \"kkk\";\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/BeanValidationsModel.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport javax.annotation.Nonnull;\nimport javax.validation.constraints.DecimalMax;\nimport javax.validation.constraints.DecimalMin;\nimport javax.validation.constraints.Email;\nimport javax.validation.constraints.Max;\nimport javax.validation.constraints.Min;\nimport javax.validation.constraints.NotNull;\nimport javax.validation.constraints.Pattern;\nimport javax.validation.constraints.Size;\nimport java.util.List;\nimport java.util.Optional;\n\npublic class BeanValidationsModel {\n    @NotNull\n    protected Long id;\n\n    @Min(13)\n    @Max(99)\n    protected Integer age;\n\n    @Pattern(regexp = \"(?![-._])[-._a-zA-Z0-9]{3,32}\")\n    @Nonnull\n    protected String username;\n\n    @Size(min = 6, max = 20)\n    protected String password;\n\n    protected String passwordHint;\n\n    @Email\n    protected String email;\n\n    @DecimalMin(value = \"0.1\", inclusive = false)\n    protected Double minBalance;\n\n    @DecimalMax(value = \"1000000\", inclusive = false)\n    protected Double maxBalance;\n\n    protected Integer birthYear;\n\n    @Size(min = 2, max = 10)\n    private List<@Size(min = 3, max = 4) String> items;\n\n    private Optional<@Size(min= 1, max=10) String> optionalValue;\n\n    public Long getId() {\n        return id;\n    }\n\n    public void setId(Long id) {\n        this.id = id;\n    }\n\n    public Integer getAge() {\n        return age;\n    }\n\n    public void setAge(Integer age) {\n        this.age = age;\n    }\n\n    public String getUsername() {\n        return username;\n    }\n\n    public void setUsername(String username) {\n        this.username = username;\n    }\n\n    public String getPassword() {\n        return password;\n    }\n\n    public void setPassword(String password) {\n        this.password = password;\n    }\n\n    public String getPasswordHint() {\n        return passwordHint;\n    }\n\n    public void setPasswordHint(String passwordHint) {\n        this.passwordHint = passwordHint;\n    }\n\n    public String getEmail() {\n        return email;\n    }\n\n    public void setEmail(String email) {\n        this.email = email;\n    }\n\n    public Double getMinBalance() {\n        return minBalance;\n    }\n\n    public void setMinBalance(Double minBalance) {\n        this.minBalance = minBalance;\n    }\n\n    public Double getMaxBalance() {\n        return maxBalance;\n    }\n\n    public void setMaxBalance(Double maxBalance) {\n        this.maxBalance = maxBalance;\n    }\n\n    public Integer getBirthYear() {\n        return birthYear;\n    }\n\n    public void setBirthYear(Integer birthYear) {\n        this.birthYear = birthYear;\n    }\n\n    public List<String> getItems() {\n        return items;\n    }\n\n    public void setItems(List<String> items) {\n        this.items = items;\n    }\n\n    public Optional<String> getOptionalValue() {\n        return optionalValue;\n    }\n\n    public void setOptionalValue(Optional<String> optionalValue) {\n        this.optionalValue = optionalValue;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Car.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class Car {\n    @Schema(accessMode = Schema.AccessMode.READ_ONLY)\n    public Integer getWheelCount() {\n        return new Integer(4);\n    }\n\n    public void setWheelCount(Integer wheelCount) {\n        // does nothing\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Cat.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.core.oas.models.composition.Pet;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema\npublic interface Cat extends Pet {\n    Integer getClawCount();\n\n    void setClawCount(Integer name);\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Children.java",
    "content": "package io.swagger.v3.core.oas.models;\n\npublic class Children {\n    public String getName() {\n        return null;\n    }\n\n    public void setName(String name) {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ClientOptInput.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport com.fasterxml.jackson.databind.JsonNode;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.models.OpenAPI;\n\npublic class ClientOptInput {\n    private String opts;\n    private JsonNode model;\n    private OpenAPI swagger;\n\n    public String getOpts() {\n        return opts;\n    }\n\n    public void setOpts(String opts) {\n        this.opts = opts;\n    }\n\n    @Schema(hidden = true)\n    public JsonNode getModel() {\n        return model;\n    }\n\n    public void setModel(JsonNode model) {\n        this.model = model;\n    }\n\n    @Schema(type = \"Object\")\n    public OpenAPI getSwagger() {\n        return swagger;\n    }\n\n    public void setSwagger(OpenAPI swagger) {\n        this.swagger = swagger;\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Department.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport com.fasterxml.jackson.annotation.JsonInclude.Include;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonRootName;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo.As;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo.Id;\nimport com.fasterxml.jackson.annotation.JsonTypeName;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlAccessType;\nimport javax.xml.bind.annotation.XmlAccessorType;\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"department\")\n@XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)\n@JsonRootName(\"department\")\n@JsonTypeName(\"department\")\n@JsonInclude(Include.NON_EMPTY)\n@JsonTypeInfo(include = As.WRAPPER_OBJECT, use = Id.NAME)\n@Schema(description = \"Represents a Department in the system\", title = \"department\")\npublic class Department {\n    private String name;\n    private String deptCode;\n    private Link<Department> parent;\n\n    public Department() {\n    }\n\n    @XmlElement\n    @JsonProperty\n    @Schema(required = true)\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    @XmlElement\n    @JsonProperty\n    @Schema(required = true)\n    public String getDeptCode() {\n        return deptCode;\n    }\n\n    public void setDeptCode(String deptCode) {\n        this.deptCode = deptCode;\n    }\n\n    @JsonProperty(\"parentDepartment\")\n    @XmlElement(name = \"parentDepartment\")\n    @Schema(\n            type = \"Link\",\n            required = true,\n            description = \"This department's parent. If this is a top-level department, the parent would be the enterprise.\")\n    public Link<Department> getParent() {\n        return parent;\n    }\n\n    public void setParent(Link<Department> parent) {\n        this.parent = parent;\n    }\n\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Employee.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport com.fasterxml.jackson.annotation.JsonInclude.Include;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonRootName;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo.As;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo.Id;\nimport com.fasterxml.jackson.annotation.JsonTypeName;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlAccessType;\nimport javax.xml.bind.annotation.XmlAccessorType;\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\nimport java.util.Set;\n\n@XmlRootElement(name = \"employee\")\n@XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)\n@JsonRootName(\"employee\")\n@JsonTypeName(\"employee\")\n@JsonInclude(Include.NON_EMPTY)\n@JsonTypeInfo(include = As.WRAPPER_OBJECT, use = Id.NAME)\n@Schema(description = \"Represents an Employee in the system\", title = \"employee\")\npublic class Employee {\n    private int id;\n    private String firstName;\n    private String lastName;\n    private Link<Department> dept;\n    private Link<Employee> manager;\n    private Set<Link<Employee>> subordinates;\n\n    public Employee() {\n        // TODO Auto-generated constructor stub\n    }\n\n    @XmlElement\n    @JsonProperty\n    @Schema(description = \"Note, this is server generated.\", title = \"Read-only\")\n    public int getId() {\n        return id;\n    }\n\n    public void setId(int id) {\n        this.id = id;\n    }\n\n    @XmlElement\n    @JsonProperty\n    @Schema(required = true)\n    public String getFirstName() {\n        return firstName;\n    }\n\n    public void setFirstName(String firstName) {\n        this.firstName = firstName;\n    }\n\n    @XmlElement\n    @JsonProperty\n    @Schema(required = true)\n    public String getLastName() {\n        return lastName;\n    }\n\n    public void setLastName(String lastName) {\n        this.lastName = lastName;\n    }\n\n    @JsonProperty(\"department\")\n    @XmlElement(name = \"department\")\n    @Schema(type = \"Link\", required = true, description = \"The department this employee belongs to.\")\n    public Link<Department> getDept() {\n        return dept;\n    }\n\n    public void setDept(Link<Department> dept) {\n        this.dept = dept;\n    }\n\n    @JsonProperty(\"manager\")\n    @XmlElement(name = \"manager\")\n    @Schema(type = \"Link\", required = true, description = \"The employee this employee reports to.\")\n    public Link<Employee> getManager() {\n        return manager;\n    }\n\n    public void setManager(Link<Employee> manager) {\n        this.manager = manager;\n    }\n\n    @JsonProperty(\"team\")\n    @XmlElement(name = \"team\")\n    @Schema(required = true, description = \"List of employees that report to this employee.\")\n    public Set<Link<Employee>> getSubordinates() {\n        return subordinates;\n    }\n\n    public void setSubordinates(Set<Link<Employee>> subordinates) {\n        this.subordinates = subordinates;\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/EmptyModel.java",
    "content": "package io.swagger.v3.core.oas.models;\n\npublic class EmptyModel {\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Error.java",
    "content": "package io.swagger.v3.core.oas.models;\n\npublic class Error {\n    int code;\n    String message;\n\n    public Error() {\n    }\n\n    public Error(int code, String message) {\n        this.code = code;\n        this.message = message;\n    }\n\n    public int getCode() {\n        return code;\n    }\n\n    public void setCode(int code) {\n        this.code = code;\n    }\n\n    public String getMessage() {\n        return message;\n    }\n\n    public void setMessage(String message) {\n        this.message = message;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/GuavaModel.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport com.google.common.base.Optional;\n\npublic class GuavaModel {\n    private Optional<String> name;\n\n    public Optional<String> getName() {\n        return name;\n    }\n\n    public void setName(Optional<String> name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Issue534.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlElementWrapper;\nimport java.util.List;\n\npublic class Issue534 {\n    public String name;\n\n    @XmlElementWrapper(name = \"order_specials\")\n    @XmlElement(name = \"order_special\")\n    @Schema(hidden = true)\n    public List<SpecialOrderItem> getOrder_specials() {\n        return null;\n    }\n\n    public void setOrder_specials(List<SpecialOrderItem> items) {\n\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JCovariantGetter.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic abstract class JCovariantGetter {\n    @Schema\n    public Object getMyProperty() {\n        return \"42\";\n    }\n\n    @Schema\n    public Object getMyOtherProperty() {\n        return \"42\";\n    }\n\n    public static class Sub extends JCovariantGetter {\n        @Override\n        public Integer getMyProperty() {\n            return 42;\n        }\n\n        @Override\n        public Integer getMyOtherProperty() {\n            return 42;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JacksonIntegerValueEnum.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport com.fasterxml.jackson.annotation.JsonValue;\nimport io.swagger.v3.oas.annotations.Hidden;\n\n/**\n * Enum holds values different from names.  Schema model will derive Integer value from jackson annotation JsonValue on public method.\n */\npublic enum JacksonIntegerValueEnum {\n    FIRST(2),\n    SECOND(4),\n    THIRD(6),\n    @Hidden HIDDEN(-1);\n\n    private final int value;\n\n    JacksonIntegerValueEnum(int value) {\n        this.value = value;\n    }\n\n    @JsonValue\n    public Integer getValue() {\n        return value;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JacksonIntegerValueFieldEnum.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport com.fasterxml.jackson.annotation.JsonValue;\nimport io.swagger.v3.oas.annotations.Hidden;\n\n/**\n * Enum holds values different from names. Schema model will derive Integer value from jackson annotation JsonValue on private field.\n */\npublic enum JacksonIntegerValueFieldEnum {\n    FIRST(2),\n    SECOND(4),\n    THIRD(6),\n    @Hidden HIDDEN(-1);\n\n    @JsonValue\n    private final int value;\n\n    JacksonIntegerValueFieldEnum(int value) {\n        this.value = value;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JacksonPropertyEnum.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport io.swagger.v3.oas.annotations.Hidden;\n\npublic enum JacksonPropertyEnum {\n    @JsonProperty(\"p1\") PRIVATE,\n    @JsonProperty(\"p2\") PUBLIC,\n    SYSTEM,\n    INVITE_ONLY,\n    @Hidden HIDDEN\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JacksonReadonlyModel.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonProperty;\n\npublic class JacksonReadonlyModel {\n    @JsonProperty (access = JsonProperty.Access.READ_ONLY)\n    public Integer getCount() {\n        return null;\n    }\n\n    @JsonIgnore\n    public void setCount(Integer count) {\n\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JacksonValueEnum.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport com.fasterxml.jackson.annotation.JsonValue;\nimport io.swagger.v3.oas.annotations.Hidden;\n\n/**\n * Enum holds values different from names. Schema model will derive String value from jackson annotation JsonValue on public method.\n */\npublic enum JacksonValueEnum {\n    FIRST(\"one\"),\n    SECOND(\"two\"),\n    THIRD(\"three\"),\n    @Hidden HIDDEN(\"hidden\");\n\n    private final String value;\n\n    JacksonValueEnum(String value) {\n        this.value = value;\n    }\n\n    @JsonValue\n    public String getValue() {\n        return value;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JacksonValueFieldEnum.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport com.fasterxml.jackson.annotation.JsonValue;\nimport io.swagger.v3.oas.annotations.Hidden;\n\n/**\n * Enum holds values different from names.  Schema model will derive String value from jackson annotation JsonValue on private field.\n */\npublic enum JacksonValueFieldEnum {\n    FIRST(\"one\"),\n    SECOND(\"two\"),\n    THIRD(\"three\"),\n    @Hidden HIDDEN(\"hidden\");\n\n    @JsonValue\n    private final String value;\n\n    JacksonValueFieldEnum(String value) {\n        this.value = value;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JacksonValuePrivateEnum.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport com.fasterxml.jackson.annotation.JsonValue;\nimport io.swagger.v3.oas.annotations.Hidden;\n\n/**\n * Enum holds values different from names.  Schema model will derive String value from jackson annotation JsonValue on private method.\n */\npublic enum JacksonValuePrivateEnum {\n    FIRST(\"one\"),\n    SECOND(\"two\"),\n    THIRD(\"three\"),\n    @Hidden HIDDEN(\"hidden\");\n\n    private final String value;\n\n    JacksonValuePrivateEnum(String value) {\n        this.value = value;\n    }\n\n    @JsonValue\n    private String getValue() {\n        return value;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JodaDateTimeModel.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport org.joda.time.DateTime;\n\npublic class JodaDateTimeModel {\n    private DateTime createdAt;\n\n    public DateTime getCreatedAt() {\n        return createdAt;\n    }\n\n    public void setCreatedAt(DateTime createdAt) {\n        this.createdAt = createdAt;\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Link.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport com.fasterxml.jackson.annotation.JsonInclude.Include;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonRootName;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo.As;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo.Id;\nimport com.fasterxml.jackson.annotation.JsonTypeName;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlAccessType;\nimport javax.xml.bind.annotation.XmlAccessorType;\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"link\")\n@XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)\n@JsonRootName(\"link\")\n@JsonTypeName(\"link\")\n@JsonInclude(Include.NON_EMPTY)\n@JsonTypeInfo(include = As.WRAPPER_OBJECT, use = Id.NAME)\n@Schema(description = \"Represents an association to another resource in the system\", title = \"link\")\npublic class Link<T> {\n    private String href;\n    private String rel;\n    private String status;\n\n    public Link() {\n    }\n\n    @XmlElement\n    @JsonProperty\n    @Schema(required = true)\n    public String getHref() {\n        return href;\n    }\n\n    public void setHref(String href) {\n        this.href = href;\n    }\n\n    @XmlElement\n    @JsonProperty\n    @Schema(required = true)\n    public String getRel() {\n        return rel;\n    }\n\n    public void setRel(String rel) {\n        this.rel = rel;\n    }\n\n    @XmlElement\n    @JsonProperty\n    @Schema(required = true)\n    public String getStatus() {\n        return status;\n    }\n\n    public void setStatus(String status) {\n        this.status = status;\n    }\n\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Manufacturers.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport java.util.HashSet;\n\npublic class Manufacturers {\n    private HashSet<String> countries;\n\n    public HashSet<String> getCountries() {\n        return countries;\n    }\n\n    public void setCountries(HashSet<String> countries) {\n        this.countries = countries;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Model1155.java",
    "content": "package io.swagger.v3.core.oas.models;\n\npublic class Model1155 {\n    private boolean valid;\n    private String value;\n    public boolean is;\n    public String get;\n    public boolean isA;\n    public String getA;\n\n    public boolean isValid() {\n        return valid;\n    }\n\n    public void setValid(boolean valid) {\n        this.valid = valid;\n    }\n\n    public String getValue() {\n        return value;\n    }\n\n    public void setValue(String value) {\n        this.value = value;\n    }\n\n    // jackson treats this as getter\n    public boolean is_persistent() {\n        return true;\n    }\n\n    // jackson treats this as getter\n    public String gettersAndHaters() {\n        return null;\n    }\n\n    // jackson doesn't treat this as getter\n    boolean isometric() {\n        return true;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Model1979.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class Model1979 {\n    @Schema(nullable = true)\n    public String id;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelExampleTest.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.ObjectSchema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Test;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\n\npublic class ModelExampleTest {\n    @Test(description = \"it should create a model\")\n    public void createModel() {\n        ObjectSchema model = new ObjectSchema();\n        model.addProperties(\"name\", new StringSchema().example(\"Tony\"));\n        model.addProperties(\"id\", new IntegerSchema().example(123));\n        assertNotNull(model);\n    }\n\n    @Test(description = \"it should create a model with example\")\n    public void createModelWithExample() {\n        ObjectSchema model = new ObjectSchema();\n\n        model.addProperties(\"name\", new StringSchema().example(\"Tony\"));\n        model.addProperties(\"id\", new IntegerSchema().example(123));\n        model.example(\"{\\\"name\\\":\\\"Fred\\\",\\\"id\\\":123456\\\"}\");\n\n        assertEquals(model.getExample(), \"{\\\"name\\\":\\\"Fred\\\",\\\"id\\\":123456\\\"}\");\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelPropertyName.java",
    "content": "package io.swagger.v3.core.oas.models;\n\npublic class ModelPropertyName {\n    public boolean is_persistent() {\n        return true;\n    }\n\n    public String gettersAndHaters() {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithAltPropertyName.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(name = \"sample_model\")\npublic class ModelWithAltPropertyName {\n    protected int id;\n\n    @Schema(\n            name = \"the_id\",\n            description = \"Note, this is server generated.\",\n            title = \"Read-only\")\n    public int getId() {\n        return id;\n    }\n\n    public void setId(int id) {\n        this.id = id;\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithApiModel.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(name = \"MyModel\")\npublic class ModelWithApiModel {\n    public String name;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithArrayOfSubclasses.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.DiscriminatorMapping;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class ModelWithArrayOfSubclasses {\n    \n    @Schema(description = \"The holder\")\n    public class Holder extends SubB {\n    }\n  \n    @Schema(\n            discriminatorProperty = \"name\",\n            discriminatorMapping = {\n                    @DiscriminatorMapping(schema = SubA.class, value = \"a\"),\n                    @DiscriminatorMapping(schema = SubB.class, value = \"b\")\n            },\n            description = \"Stuff\"\n    )\n    public class Base {\n      \n        private String name;\n      \n        public String getName() {\n            return name;\n        }\n    }\n\n    @Schema(description = \"The SubA class\")\n    public class SubA extends Base {\n      \n        private Long count;\n      \n        public Long getCount() {\n            return count;\n        }\n    }\n\n    @Schema(description = \"The SubB class\")\n    public class SubB extends Base {\n      \n        private String friend;\n        private Base[] baseArray;\n\n        public String getFriend() {\n            return friend;\n        }\n\n        @ArraySchema(\n                schema = @Schema(implementation = Base.class),\n                arraySchema = @Schema(\n                        type = \"array\",\n                        description = \"Thingy\"\n                ),\n                minItems = 0,\n                uniqueItems = true\n        )\n        public Base[] getBaseArray() {\n            return baseArray;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithBooleanProperty.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class ModelWithBooleanProperty {\n    @Schema(allowableValues = \"true\")\n    public Boolean isGreat;\n\n    @Schema(allowableValues = {\"1\", \"2\"})\n    public Integer intValue;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithEnumArray.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport java.util.Set;\n\npublic class ModelWithEnumArray {\n    private Set<Action> actions;\n\n    public Set<Action> getActions() {\n        return actions;\n    }\n\n    public enum Action {\n        CREATE, UPDATE, DELETE, COPY;\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithEnumField.java",
    "content": "package io.swagger.v3.core.oas.models;\n\npublic class ModelWithEnumField {\n    public TestEnum enumValue;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithEnumProperty.java",
    "content": "package io.swagger.v3.core.oas.models;\n\npublic class ModelWithEnumProperty {\n    private TestEnum e;\n\n    public TestEnum getEnumValue() {\n        return e;\n    }\n\n    public void setEnumValue(TestEnum e) {\n        this.e = e;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithEnumRefProperty.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class ModelWithEnumRefProperty {\n    private TestEnum a;\n    private TestEnum b;\n\n    @Schema(enumAsRef = true)\n    public TestSecondEnum c;\n\n    public TestSecondEnum d;\n\n    @Schema(enumAsRef = true)\n    public TestEnum getA() {\n        return a;\n    }\n\n    public void setA(TestEnum e) {\n        this.a = a;\n    }\n\n    @Schema(enumAsRef = true)\n    public TestEnum getB() {\n        return b;\n    }\n\n    public void setB(TestEnum b) {\n        this.b = b;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithFormattedStrings.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport java.net.URI;\nimport java.net.URL;\nimport java.util.Date;\nimport java.util.UUID;\n\npublic class ModelWithFormattedStrings {\n\n    public UUID uuid;\n    public URI uri;\n    public URL url;\n    public Date date;\n    public byte aByte;\n    public Byte aByteObject;\n}\n\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithJAXBAnnotations.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\n\nimport javax.xml.bind.annotation.XmlAttribute;\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlElementWrapper;\nimport javax.xml.bind.annotation.XmlRootElement;\nimport java.util.List;\n\n@XmlRootElement(name = \"rootName\")\npublic class ModelWithJAXBAnnotations {\n    @XmlAttribute\n    public String id;\n\n    @XmlElement(name = \"renamed\")\n    public String name;\n\n    @JsonIgnore\n    @XmlAttribute\n    public String hidden;\n\n    public List<String> list;\n\n    @XmlElementWrapper(name = \"wrappedListItems\")\n    @XmlElement(name = \"wrappedList\")\n    public List<String> wrappedList;\n\n    @XmlAttribute(name = \"doNotUseMe\")\n    public List<String> forcedElement;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithJacksonEnumField.java",
    "content": "package io.swagger.v3.core.oas.models;\n\n/**\n *  Class of different enums for testing schema model\n */\npublic class ModelWithJacksonEnumField {\n    public JacksonPropertyEnum firstEnumValue;\n    public JacksonValueEnum secondEnumValue;\n    public JacksonIntegerValueEnum thirdEnumValue;\n    public JacksonValueFieldEnum fourthEnumValue;\n    public JacksonIntegerValueFieldEnum fifthEnumValue;\n    public JacksonValuePrivateEnum sixthEnumValue;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithJaxBDefaultValues.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement\npublic class ModelWithJaxBDefaultValues {\n    @XmlElement(defaultValue = \"Tony\")\n    public String name;\n\n    @XmlElement(defaultValue = \"100\")\n    public Integer age;\n\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithModelPropertyOverrides.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class ModelWithModelPropertyOverrides {\n    @ArraySchema(schema = @Schema(implementation = Children.class))\n    private String children;\n\n    public String getChildren() {\n        return children;\n    }\n\n    public void setChildren(String children) {\n        this.children = children;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithNumbers.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport java.math.BigDecimal;\nimport java.math.BigInteger;\n\npublic class ModelWithNumbers {\n    public short shortPrimitive;\n    public Short shortObject;\n    public int intPrimitive;\n    public Integer intObject;\n    public long longPrimitive;\n    public Long longObject;\n    public float floatPrimitive;\n    public Float floatObject;\n    public double doublePrimitive;\n    public Double doubleObject;\n    public BigInteger bigInteger;\n    public BigDecimal bigDecimal;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithOffset.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class ModelWithOffset {\n    public String id;\n\n    @Schema(implementation = java.time.OffsetDateTime.class)\n    public String offset;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithPrimitiveArray.java",
    "content": "package io.swagger.v3.core.oas.models;\n\npublic class ModelWithPrimitiveArray {\n    public int[] intArray;\n\n    private long[] longArray;\n\n    public long[] getLongArray() {\n        return longArray;\n    }\n\n    public void setLongArray(long[] longArray) {\n        this.longArray = longArray;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithRanges.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class ModelWithRanges {\n    @Schema(description = \"values with include range\", minimum = \"1\", maximum = \"5\")\n    public int getInclusiveRange() {\n        return 2;\n    }\n\n    @Schema(description = \"values with include range\", minimum = \"1\", exclusiveMinimum = true, maximum = \"5\", exclusiveMaximum = true)\n    public int getExclusiveRange() {\n        return 2;\n    }\n\n    @Schema(description = \"values with include range\", minimum = \"1\")\n    public int getPositiveInfinityRange() {\n        return 2;\n    }\n\n    @Schema(description = \"values with include range\", maximum = \"5\")\n    public int getNegativeInfinityRange() {\n        return 2;\n    }\n\n    @Schema(description = \"some string values\", allowableValues = {\"str1\", \"str2\"})\n    public String getStringValues() {\n        return \"test\";\n    }\n\n    @Schema(description = \"some string values\", minimum = \"1.0\", maximum = \"8.0\", exclusiveMaximum = true)\n    public Double getDoubleValues() {\n        return 1.0;\n    }\n\n    @Schema(description = \"some int values\", allowableValues = {\"1\", \"2\"})\n    public int getIntAllowableValues() {\n        return 2;\n    }\n\n    @Schema(description = \"some int values with null\", allowableValues = {\"1\", \"2\", \"null\"})\n    public int getIntAllowableValuesWithNull() {\n        return 2;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithTuple2.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport com.fasterxml.jackson.databind.BeanDescription;\nimport com.fasterxml.jackson.databind.JavaType;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.core.converter.ModelConverterContext;\nimport io.swagger.v3.core.jackson.AbstractModelConverter;\nimport io.swagger.v3.oas.models.media.MapSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.apache.commons.lang3.StringUtils;\nimport org.apache.commons.lang3.text.WordUtils;\nimport org.apache.commons.lang3.tuple.Pair;\n\nimport java.util.Iterator;\nimport java.util.Set;\n\nimport static io.swagger.v3.core.util.RefUtils.constructRef;\n\npublic class ModelWithTuple2 {\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"Possible values for state property of timesheet or timesheet entry\", required = true)\n    public Pair<String, String> timesheetStates;\n\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"set of pairs\", required = true)\n    public Set<Pair<String, String>> manyPairs;\n\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"set of pairs with complex left\", required = true)\n    public Set<Pair<ComplexLeft, String>> complexLeft;\n\n    static class ComplexLeft {\n        public String name;\n        public Integer age;\n    }\n\n    public static class TupleAsMapModelConverter extends AbstractModelConverter {\n\n        public TupleAsMapModelConverter(ObjectMapper mapper) {\n            super(mapper);\n        }\n\n        @Override\n        public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator<ModelConverter> chain) {\n            final JavaType javaType = _mapper.constructType(type.getType());\n            if (Pair.class.isAssignableFrom(javaType.getRawClass())) {\n                final JavaType left = javaType.containedType(0);\n                final String name = \"MapOf\" + WordUtils.capitalize(_typeName(left));\n\n                return new MapSchema()\n                        .name(name)\n                        .additionalProperties(context.resolve(new AnnotatedType(left)));\n            }\n            return super.resolve(type, context, chain);\n        }\n    }\n\n    public static class TupleAsMapPropertyConverter extends AbstractModelConverter {\n\n        public TupleAsMapPropertyConverter(ObjectMapper mapper) {\n            super(mapper);\n        }\n\n        @Override\n        public Schema resolve(AnnotatedType type, ModelConverterContext context,\n                              Iterator<ModelConverter> chain) {\n            final JavaType javaType = _mapper.constructType(type.getType());\n            if (Pair.class.isAssignableFrom(javaType.getRawClass())) {\n                if (!type.isSchemaProperty()) {\n                    return null;\n                }\n                final JavaType left = javaType.containedType(0);\n                Schema schema = context.resolve(new AnnotatedType().type(left).schemaProperty(type.isSchemaProperty()));\n                String pName = null;\n                if (left != null) {\n                    BeanDescription valueTypeBeanDesc = _mapper.getSerializationConfig().introspect(left);\n                    pName = _typeName(left, valueTypeBeanDesc);\n                }\n\n                if (\"object\".equals(schema.getType()) && pName != null) {\n                    // create a reference for the items\n                    if (context.getDefinedModels().containsKey(pName)) {\n                        schema = new Schema().$ref(constructRef(pName));\n                    }\n                } else if (schema.get$ref() != null) {\n                    schema = new Schema().$ref(StringUtils.isNotEmpty(schema.get$ref()) ? schema.get$ref() : schema.getName());\n                }\n                return new MapSchema().additionalProperties(schema);\n            }\n            if (chain.hasNext()) {\n                return chain.next().resolve(type, context, chain);\n            }\n            return null;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Person.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport java.util.Date;\nimport java.util.Map;\n\npublic class Person {\n    private Long id;\n    private String firstName;\n    private Address address;\n    private Map<String, String> properties;\n    private Date birthDate;\n    private Float floatValue;\n    private Double doubleValue;\n\n    public Long getId() {\n        return id;\n    }\n\n    public void setId(Long id) {\n        this.id = id;\n    }\n\n    public String getFirstName() {\n        return firstName;\n    }\n\n    public void setFirstName(String firstName) {\n        this.firstName = firstName;\n    }\n\n    public Address getAddress() {\n        return address;\n    }\n\n    public void setAddress(Address address) {\n        this.address = address;\n    }\n\n    public Map<String, String> getProperties() {\n        return properties;\n    }\n\n    public void setProperties(Map<String, String> properties) {\n        this.properties = properties;\n    }\n\n    public Date getBirthDate() {\n        return birthDate;\n    }\n\n    public void setBirthDate(Date birthDate) {\n        this.birthDate = birthDate;\n    }\n\n    public Float getFloat() {\n        return floatValue;\n    }\n\n    public void setFloat(Float floatValue) {\n        this.floatValue = floatValue;\n    }\n\n    public Double getDouble() {\n        return doubleValue;\n    }\n\n    public void setDouble(Double doubleValue) {\n        this.doubleValue = doubleValue;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ReadOnlyFields.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class ReadOnlyFields {\n    @Schema(accessMode = Schema.AccessMode.READ_ONLY)\n    public Long id;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ReadOnlyModel.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class ReadOnlyModel {\n    private Integer id;\n    private Integer readWriteId;\n\n    @Schema(accessMode = Schema.AccessMode.READ_ONLY)\n    public Integer getId() {\n        return id;\n    }\n\n    public void setId(Integer id) {\n        this.id = id;\n    }\n\n    @Schema(accessMode = Schema.AccessMode.READ_WRITE)\n    public Integer getReadWriteId() {\n        return readWriteId;\n    }\n\n    public void setReadWriteId(Integer readWriteId) {\n        this.readWriteId = readWriteId;\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/RequiredFields.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.validation.constraints.NotNull;\nimport javax.validation.constraints.NotBlank;\nimport javax.validation.constraints.NotEmpty;\n\nimport java.util.List;\nimport java.util.Optional;\n\npublic class RequiredFields {\n    @Schema(description = \"required\", required = true)\n    public Long required;\n\n    @Schema(description = \"not required\")\n    public Long notRequired;\n\n    @Schema(description = \"Optional field\")\n    public Optional<Long> optionalField;\n\n    @Schema(description = \"not required with annotation\")\n    @NotNull\n    public Long notRequiredWithAnnotation;\n\n    @Schema(description = \"primitive type without constraint\")\n    public long primitiveTypeWithoutConstraint;\n\n    @Schema(description = \"primitive type with constraint\")\n    @NotNull\n    public long primitiveTypeWithConstraint;\n\n    @Schema(description = \"mode auto\", requiredMode = Schema.RequiredMode.AUTO)\n    public Long modeAuto;\n\n    @Schema(description = \"mode auto with annotation\", requiredMode = Schema.RequiredMode.AUTO)\n    @NotNull\n    public Long modeAutoWithAnnotation;\n\n    @Schema(description = \"mode required\", requiredMode = Schema.RequiredMode.REQUIRED)\n    public Long modeRequired;\n\n    @Schema(description = \"mode not required\", requiredMode = Schema.RequiredMode.NOT_REQUIRED)\n    public Long modeNotRequired;\n\n    @Schema(description = \"mode not required with annotation\", requiredMode = Schema.RequiredMode.NOT_REQUIRED)\n    @NotNull\n    public Long modeNotRequiredWithAnnotation;\n\n    @Schema(description = \"mode not required with annotation for NotBlank\", requiredMode = Schema.RequiredMode.NOT_REQUIRED)\n    @NotBlank\n    public String modeNotRequiredWithAnnotationForNotBlank;\n\n    @Schema(description = \"mode not required with annotation for NotEmpty\", requiredMode = Schema.RequiredMode.NOT_REQUIRED)\n    @NotEmpty\n    public List<String>  modeNotRequiredWithAnnotationForNotEmpty;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/RequiredRefFieldModel.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement\npublic class RequiredRefFieldModel {\n\n    @XmlElement(name = \"a\")\n    @Schema(required = true)\n    public String getA() {\n        return \"aaa\";\n    }\n\n    @XmlElement(name = \"b\")\n    @Schema(required = true)\n    public B getB() {\n        return null;\n    }\n\n    static class B {\n        public String foo;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/SpecialOrderItem.java",
    "content": "package io.swagger.v3.core.oas.models;\n\npublic class SpecialOrderItem {\n    public String name;\n    public Long id;\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/TestEnum.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport javax.xml.bind.annotation.XmlEnum;\nimport javax.xml.bind.annotation.XmlEnumValue;\nimport javax.xml.bind.annotation.XmlType;\n\n@XmlType\n@XmlEnum(String.class)\npublic enum TestEnum {\n    @XmlEnumValue(\"PRIVATE\") PRIVATE,\n    @XmlEnumValue(\"PUBLIC\") PUBLIC,\n    @XmlEnumValue(\"SYSTEM\") SYSTEM,\n    @XmlEnumValue(\"INVITE_ONLY\") INVITE_ONLY;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/TestSecondEnum.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport javax.xml.bind.annotation.XmlEnum;\nimport javax.xml.bind.annotation.XmlEnumValue;\nimport javax.xml.bind.annotation.XmlType;\n\n@XmlType\n@XmlEnum(String.class)\npublic enum TestSecondEnum {\n    @XmlEnumValue(\"A_PRIVATE\") A_PRIVATE,\n    @XmlEnumValue(\"A_PUBLIC\") A_PUBLIC,\n    @XmlEnumValue(\"A_SYSTEM\") A_SYSTEM,\n    @XmlEnumValue(\"A_INVITE_ONLY\") A_INVITE_ONLY;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/XmlFirstRequiredFieldModel.java",
    "content": "package io.swagger.v3.core.oas.models;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlAccessType;\nimport javax.xml.bind.annotation.XmlAccessorType;\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement\n@XmlAccessorType(XmlAccessType.FIELD)\n@Schema(name = \"aaa\")\npublic class XmlFirstRequiredFieldModel {\n    @XmlElement(name = \"a\")\n    @Schema(description = \"bla\", required = true)\n    public String getA() {\n        return \"aaa\";\n    }\n\n    public String getC() {\n        return \"kkk\";\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/AbstractBaseModelWithSubTypes.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@JsonSubTypes({@JsonSubTypes.Type(value = Thing1.class, name = \"thing3\"), @JsonSubTypes.Type(value = Thing2.class, name = \"thing2\")})\n@Schema(description = \"I am an Abstract Base Model with Sub-Types\", discriminatorProperty = \"_type\")\nabstract public class AbstractBaseModelWithSubTypes {\n\n    @Schema(description = \"This value is used as a discriminator for serialization\")\n    public String _type;\n    @Schema(description = \"An arbitrary field\")\n    public String a;\n    @Schema(description = \"An arbitrary field\")\n    public String b;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/AbstractBaseModelWithoutFields.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@JsonSubTypes({@JsonSubTypes.Type(value = Thing3.class, name = \"thing3\")})\n@Schema(description = \"I am an Abstract Base Model without any declared fields and with Sub-Types\")\npublic abstract class AbstractBaseModelWithoutFields {\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/AbstractModelWithApiModel.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(name = \"MyProperty\")\n@JsonSubTypes({@JsonSubTypes.Type(value = ModelWithUrlProperty.class), @JsonSubTypes.Type(value = ModelWithValueProperty.class)})\npublic abstract class AbstractModelWithApiModel {\n\n    private final String type;\n\n    protected AbstractModelWithApiModel(String type) {\n        this.type = type;\n    }\n\n    public String getType() {\n        return type;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/Animal.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport com.fasterxml.jackson.annotation.JsonSubTypes.Type;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\n\n@JsonTypeInfo(\n        use = JsonTypeInfo.Id.NAME,\n        include = JsonTypeInfo.As.EXTERNAL_PROPERTY,\n        property = \"type\")\n@JsonSubTypes({\n        @Type(value = Human.class, name = \"human\"),\n        @Type(value = Pet.class, name = \"pet\")\n})\npublic interface Animal {\n    String getName();\n\n    void setName(String name);\n\n    String getType();\n\n    void setType(String type);\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/AnimalClass.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport com.fasterxml.jackson.annotation.JsonSubTypes.Type;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\n\n@JsonTypeInfo(\n        use = JsonTypeInfo.Id.NAME,\n        include = JsonTypeInfo.As.EXTERNAL_PROPERTY,\n        property = \"type\")\n@JsonSubTypes({\n        @Type(value = HumanClass.class, name = \"human\"),\n        @Type(value = PetClass.class, name = \"pet\")\n})\npublic class AnimalClass {\n\n    String type;\n    String name;\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public String getType() {\n        return type;\n    }\n\n    public void setType(String type) {\n        this.type = type;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/AnimalWithSchemaSubtypes.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@JsonTypeInfo(\n        use = JsonTypeInfo.Id.NAME,\n        include = JsonTypeInfo.As.EXTERNAL_PROPERTY,\n        property = \"type\")\n@Schema(subTypes = {HumanWithSchemaSubtypes.class, PetWithSchemaSubtypes.class})\npublic class AnimalWithSchemaSubtypes {\n\n    String type;\n    String name;\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public String getType() {\n        return type;\n    }\n\n    public void setType(String type) {\n        this.type = type;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/Human.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport com.fasterxml.jackson.annotation.JsonPropertyOrder;\n\n@JsonPropertyOrder({\"name\", \"type\", \"firstName\", \"lastName\"})\npublic class Human implements Animal {\n    private String name;\n    private String type;\n    private String firstName;\n    private String lastName;\n\n    public String getType() {\n        return type;\n    }\n\n    public void setType(String type) {\n        this.type = type;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public String getFirstName() {\n        return firstName;\n    }\n\n    public void setFirstName(String firstName) {\n        this.firstName = firstName;\n    }\n\n    public String getLastName() {\n        return lastName;\n    }\n\n    public void setLastName(String lastName) {\n        this.lastName = lastName;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/HumanClass.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport com.fasterxml.jackson.annotation.JsonPropertyOrder;\n\n@JsonPropertyOrder({\"name\", \"type\", \"firstName\", \"lastName\"})\npublic class HumanClass extends AnimalClass {\n    private String name;\n    private String type;\n    private String firstName;\n    private String lastName;\n\n    public String getType() {\n        return type;\n    }\n\n    public void setType(String type) {\n        this.type = type;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public String getFirstName() {\n        return firstName;\n    }\n\n    public void setFirstName(String firstName) {\n        this.firstName = firstName;\n    }\n\n    public String getLastName() {\n        return lastName;\n    }\n\n    public void setLastName(String lastName) {\n        this.lastName = lastName;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/HumanWithSchemaSubtypes.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport com.fasterxml.jackson.annotation.JsonPropertyOrder;\n\n@JsonPropertyOrder({\"name\", \"type\", \"firstName\", \"lastName\"})\npublic class HumanWithSchemaSubtypes extends AnimalWithSchemaSubtypes {\n    private String name;\n    private String type;\n    private String firstName;\n    private String lastName;\n\n    public String getType() {\n        return type;\n    }\n\n    public void setType(String type) {\n        this.type = type;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public String getFirstName() {\n        return firstName;\n    }\n\n    public void setFirstName(String firstName) {\n        this.firstName = firstName;\n    }\n\n    public String getLastName() {\n        return lastName;\n    }\n\n    public void setLastName(String lastName) {\n        this.lastName = lastName;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/ModelWithFieldWithSubTypes.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(description = \"Class that has a field that is the AbstractBaseModelWithSubTypes\")\npublic class ModelWithFieldWithSubTypes {\n\n    @Schema(description = \"Contained field with sub-types\")\n    AbstractBaseModelWithSubTypes z;\n\n    public AbstractBaseModelWithSubTypes getZ() {\n        return z;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/ModelWithUrlProperty.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport java.net.MalformedURLException;\nimport java.net.URL;\n\npublic class ModelWithUrlProperty extends AbstractModelWithApiModel {\n\n    private final URL url;\n\n    public ModelWithUrlProperty(String type, String url) {\n        super(type);\n        try {\n            this.url = new URL(url);\n        } catch (MalformedURLException e) {\n            throw new IllegalArgumentException(e);\n        }\n    }\n\n    public URL getUrl() {\n        return url;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/ModelWithValueProperty.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\npublic class ModelWithValueProperty extends AbstractModelWithApiModel {\n\n    private final String value;\n\n    public ModelWithValueProperty(String type, String value) {\n        super(type);\n        this.value = value;\n    }\n\n    public String getValue() {\n        return value;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/Pet.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic interface Pet extends Animal {\n    @Schema(required = true, description = \"The pet type\")\n    String getType();\n\n    void setType(String type);\n\n    @Schema(required = true, description = \"The name of the pet\")\n    String getName();\n\n    void setName(String name);\n\n    @Schema(required = true)\n    Boolean getIsDomestic();\n\n    void setIsDomestic(Boolean isDomestic);\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/PetClass.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class PetClass extends AnimalClass {\n    private String name;\n    private String type;\n    private Boolean isDomestic;\n\n    @Schema(required = true, description = \"The pet type\")\n    public String getType() {\n        return type;\n    }\n\n    public void setType(String type) {\n        this.type = type;\n    }\n\n    @Schema(required = true, description = \"The name of the pet\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    @Schema(required = true)\n    public Boolean getIsDomestic() {\n        return isDomestic;\n    }\n\n    public void setIsDomestic(Boolean isDomestic) {\n        this.isDomestic = isDomestic;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/PetWithSchemaSubtypes.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class PetWithSchemaSubtypes extends AnimalWithSchemaSubtypes {\n    private String name;\n    private String type;\n    private Boolean isDomestic;\n\n    @Schema(required = true, description = \"The pet type\")\n    public String getType() {\n        return type;\n    }\n\n    public void setType(String type) {\n        this.type = type;\n    }\n\n    @Schema(required = true, description = \"The name of the pet\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    @Schema(required = true)\n    public Boolean getIsDomestic() {\n        return isDomestic;\n    }\n\n    public void setIsDomestic(Boolean isDomestic) {\n        this.isDomestic = isDomestic;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/Thing1.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(description = \"Shake hands with Thing1\", allOf = {AbstractBaseModelWithSubTypes.class})\npublic class Thing1 extends AbstractBaseModelWithSubTypes {\n\n    @Schema(description = \"Override the abstract a\")\n    public String a;\n    @Schema(description = \"Thing1 has an additional field\")\n    public int x;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/Thing2.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(description = \"and Thing2\", allOf = {AbstractBaseModelWithSubTypes.class})\npublic class Thing2 extends AbstractBaseModelWithSubTypes {\n\n    @Schema(description = \"Override the abstract a\")\n    public String a;\n    @Schema(description = \"Thing2 has an additional field\")\n    public String s;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/Thing3.java",
    "content": "package io.swagger.v3.core.oas.models.composition;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(description = \"Thing3\", allOf = {AbstractBaseModelWithoutFields.class})\npublic class Thing3 extends AbstractBaseModelWithoutFields {\n\n    @Schema(description = \"Additional field a\")\n    String a;\n    @Schema(description = \"Additional field x\")\n    int x;\n\n    public String getA() {\n        return a;\n    }\n\n    public void setA(String a) {\n        this.a = a;\n    }\n\n    public int getX() {\n        return x;\n    }\n\n    public void setX(int x) {\n        this.x = x;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/xmltest/NestedModelWithJAXBAnnotations.java",
    "content": "package io.swagger.v3.core.oas.models.xmltest;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\n\nimport javax.xml.bind.annotation.XmlAttribute;\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlElementWrapper;\nimport javax.xml.bind.annotation.XmlRootElement;\nimport java.util.List;\n\n@XmlRootElement(name = \"RootName\")\npublic class NestedModelWithJAXBAnnotations {\n    @XmlAttribute\n    public String id;\n\n    @XmlElement(name = \"named\")\n    public String name;\n\n    @XmlElement(name = \"SubName\")\n    public SubModelWithJAXBAnnotations subName;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/xmltest/SubModelWithJAXBAnnotations.java",
    "content": "package io.swagger.v3.core.oas.models.xmltest;\n\nimport javax.xml.bind.annotation.*;\n\n@XmlAccessorType(XmlAccessType.FIELD)\n@XmlType(name = \"SubType\", propOrder = {\n        \"id\",\n        \"name\"\n})\npublic class SubModelWithJAXBAnnotations {\n    @XmlAttribute\n    public String id;\n\n    @XmlElement\n    public String name;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/xmltest/package-info.java",
    "content": "@javax.xml.bind.annotation.XmlSchema(\r\n        namespace = \"https://www.openapis.org/test/nested\",\r\n        elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED\r\n)\r\npackage io.swagger.v3.core.oas.models.xmltest;\r\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/ATMTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport static org.testng.Assert.assertNotNull;\n\npublic class ATMTest extends SwaggerTestBase {\n\n    @Test\n    public void testATMModel() throws Exception {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context\n                .resolve(new AnnotatedType(ATM.class));\n        assertNotNull(model);\n    }\n\n    public enum Currency {USA, CANADA}\n\n    static class ATM {\n        private Currency currency;\n\n        public Currency getCurrency() {\n            return currency;\n        }\n\n        public void setCurrency(Currency currency) {\n            this.currency = currency;\n        }\n    }\n}\n\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/AllofResolvingTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class AllofResolvingTest extends SwaggerTestBase {\n\n    @Test\n    public void testAllofResolving() {\n\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(false).schemaResolution(io.swagger.v3.oas.models.media.Schema.SchemaResolution.ALL_OF);\n        final ModelConverterContextImpl c = new ModelConverterContextImpl(modelResolver);\n        // ModelConverters c = ModelConverters.getInstance(false, io.swagger.v3.oas.models.media.Schema.SchemaResolution.INLINE);\n        c.resolve(new AnnotatedType(UserSchema.class));\n\n        String expectedYaml = \"UserProperty:\\n\" +\n                \"  type: object\\n\" +\n                \"  description: Represents a user-specific property\\n\" +\n                \"  example: User-specific example value\\n\" +\n                \"UserSchema:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    propertyOne:\\n\" +\n                \"      allOf:\\n\" +\n                \"      - type: object\\n\" +\n                \"        description: First user schema property\\n\" +\n                \"        nullable: true\\n\" +\n                \"      - $ref: \\\"#/components/schemas/UserProperty\\\"\\n\" +\n                \"    propertyTwo:\\n\" +\n                \"      allOf:\\n\" +\n                \"      - type: object\\n\" +\n                \"        description: Second user schema property\\n\" +\n                \"        example: example value for propertyTwo\\n\" +\n                \"      - $ref: \\\"#/components/schemas/UserProperty\\\"\\n\" +\n                \"    propertyThree:\\n\" +\n                \"      allOf:\\n\" +\n                \"      - type: object\\n\" +\n                \"        description: \\\"Third user schema property, with example for testing\\\"\\n\" +\n                \"        example: example value for propertyThree\\n\" +\n                \"      - $ref: \\\"#/components/schemas/UserProperty\\\"\\n\";\n\n        SerializationMatchers.assertEqualsToYaml(c.getDefinedModels(), expectedYaml);\n        // stringSchemaMap = c.readAll(InlineSchemaSecond.class);\n        c.resolve(new AnnotatedType(OrderSchema.class));\n        expectedYaml = \"BasicProperty:\\n\" +\n                \"  type: object\\n\" +\n                \"  description: Represents a basic schema property\\n\" +\n                \"OrderProperty:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    basicProperty:\\n\" +\n                \"      $ref: \\\"#/components/schemas/BasicProperty\\\"\\n\" +\n                \"  description: Represents an order-specific property\\n\" +\n                \"  example: Order-specific example value\\n\" +\n                \"OrderSchema:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    propertyOne:\\n\" +\n                \"      allOf:\\n\" +\n                \"      - type: object\\n\" +\n                \"        description: First order schema property\\n\" +\n                \"        nullable: true\\n\" +\n                \"      - $ref: \\\"#/components/schemas/OrderProperty\\\"\\n\" +\n                \"    userProperty:\\n\" +\n                \"      allOf:\\n\" +\n                \"      - type: object\\n\" +\n                \"        description: \\\"Order schema property, references UserProperty\\\"\\n\" +\n                \"        example: example value for userProperty\\n\" +\n                \"      - $ref: \\\"#/components/schemas/UserProperty\\\"\\n\" +\n                \"UserProperty:\\n\" +\n                \"  type: object\\n\" +\n                \"  description: Represents a user-specific property\\n\" +\n                \"  example: User-specific example value\\n\" +\n                \"UserSchema:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    propertyOne:\\n\" +\n                \"      allOf:\\n\" +\n                \"      - type: object\\n\" +\n                \"        description: First user schema property\\n\" +\n                \"        nullable: true\\n\" +\n                \"      - $ref: \\\"#/components/schemas/UserProperty\\\"\\n\" +\n                \"    propertyTwo:\\n\" +\n                \"      allOf:\\n\" +\n                \"      - type: object\\n\" +\n                \"        description: Second user schema property\\n\" +\n                \"        example: example value for propertyTwo\\n\" +\n                \"      - $ref: \\\"#/components/schemas/UserProperty\\\"\\n\" +\n                \"    propertyThree:\\n\" +\n                \"      allOf:\\n\" +\n                \"      - type: object\\n\" +\n                \"        description: \\\"Third user schema property, with example for testing\\\"\\n\" +\n                \"        example: example value for propertyThree\\n\" +\n                \"      - $ref: \\\"#/components/schemas/UserProperty\\\"\\n\";\n        SerializationMatchers.assertEqualsToYaml(c.getDefinedModels(), expectedYaml);\n    }\n\n    // Renamed class to better describe what it represents\n    static class UserSchema {\n\n        @Schema(description = \"First user schema property\", nullable = true)\n        public UserProperty propertyOne;\n\n        private UserProperty propertyTwo;\n\n        @Schema(description = \"Second user schema property\", example = \"example value for propertyTwo\")\n        public UserProperty getPropertyTwo() {\n            return propertyTwo;\n        }\n\n        // Third property with no specific annotation. It's good to add some description or example for clarity\n        @Schema(description = \"Third user schema property, with example for testing\", example = \"example value for propertyThree\")\n        public UserProperty getPropertyThree() {\n            return null;  // returning null as per the test scenario\n        }\n    }\n\n    // Renamed class to represent a different entity for the schema test\n    static class OrderSchema {\n\n        @Schema(description = \"First order schema property\", nullable = true)\n        public OrderProperty propertyOne;\n\n        private UserProperty userProperty;\n\n        @Schema(description = \"Order schema property, references UserProperty\", example = \"example value for userProperty\")\n        public UserProperty getUserProperty() {\n            return userProperty;\n        }\n    }\n\n    // Renamed properties to make them clearer about their role in the schema\n    @Schema(description = \"Represents a user-specific property\", example = \"User-specific example value\")\n    static class UserProperty {\n        // public String value;\n    }\n\n    @Schema(description = \"Represents an order-specific property\", example = \"Order-specific example value\")\n    static class OrderProperty {\n        public BasicProperty basicProperty;\n    }\n\n    static class BasicSchema {\n\n        @Schema(description = \"First basic schema property\")\n        public BasicProperty propertyOne;\n\n        private BasicProperty propertyTwo;\n\n        @Schema(description = \"Second basic schema property\", example = \"example value for propertyTwo\")\n        public BasicProperty getPropertyTwo() {\n            return propertyTwo;\n        }\n    }\n\n    // Renamed to represent a basic property common in various schemas\n    @Schema(description = \"Represents a basic schema property\")\n    static class BasicProperty {\n        // public String value;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/AnnotationsUtilsExtensionsTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.google.common.collect.ImmutableMap;\nimport io.swagger.v3.core.util.AnnotationsUtils;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.extensions.ExtensionProperty;\nimport org.testng.annotations.DataProvider;\nimport org.testng.annotations.Test;\n\nimport java.lang.reflect.Method;\nimport java.util.Collections;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class AnnotationsUtilsExtensionsTest {\n\n    @DataProvider\n    private Object[][] expectedData() {\n        return new Object[][]{\n                {\"methodOne\", Collections.emptyMap()},\n                {\"methodTwo\", Collections.emptyMap()},\n                {\"methodThree\", ImmutableMap.of(\n                        \"x-test1\", \"value1\",\n                        \"x-test2\", \"value2\",\n                        \"x-test\", ImmutableMap.of(\"test1\", \"value1\", \"test2\", \"value2\"))},\n                {\"methodFour\", ImmutableMap.of(\n                        \"x-test\", ImmutableMap.of(\"test1\", \"value1\", \"test2\", \"value2\"),\n                        \"x-test1\", \"value1\",\n                        \"x-test2\", \"value2\")},\n                {\"methodFive\", ImmutableMap.of(\n                        \"x-test1\", ImmutableMap.of(\"test1\", \"value1\", \"test2\", \"value2\"),\n                        \"x-test2\", \"value2\")},\n                {\"methodSix\", ImmutableMap.of(\"x-test1\", \"value1\", \"x-test2\", \"value2\")}\n        };\n    }\n\n    @Test(dataProvider = \"expectedData\")\n    public void extensionsTest(String methodName, Map<String, Object> expected) throws NoSuchMethodException {\n        final Method method = getClass().getDeclaredMethod(methodName);\n        final Extension[] extensions = method.getAnnotation(Operation.class).extensions();\n        final Map<String, Object> map = AnnotationsUtils.getExtensions(extensions);\n\n        assertEquals(map, expected);\n    }\n\n    @Operation(description = \"method\")\n    private void methodOne() {\n\n    }\n\n    @Operation(description = \"method\", extensions = {\n            @Extension(name = \"test\", properties = {\n                    @ExtensionProperty(name = \"test1\", value = \"\")\n            })})\n    private void methodTwo() {\n\n    }\n\n    @Operation(description = \"method\", extensions = {\n            @Extension(properties = {\n                    @ExtensionProperty(name = \"test1\", value = \"value1\"),\n                    @ExtensionProperty(name = \"test2\", value = \"value2\")\n            }),\n            @Extension(name = \"test\", properties = {\n                    @ExtensionProperty(name = \"test1\", value = \"value1\"),\n                    @ExtensionProperty(name = \"test2\", value = \"value2\")\n            })})\n    private void methodThree() {\n\n    }\n\n    @Operation(description = \"method\", extensions = {\n            @Extension(name = \"test\", properties = {\n                    @ExtensionProperty(name = \"test1\", value = \"value1\"),\n                    @ExtensionProperty(name = \"test2\", value = \"value2\")\n            }),\n            @Extension(properties = {\n                    @ExtensionProperty(name = \"test1\", value = \"value1\"),\n                    @ExtensionProperty(name = \"test2\", value = \"value2\")\n            })\n    })\n    private void methodFour() {\n\n    }\n\n    @Operation(description = \"method\", extensions = {\n            @Extension(properties = {\n                    @ExtensionProperty(name = \"test1\", value = \"value1\"),\n                    @ExtensionProperty(name = \"test2\", value = \"value2\")\n            }),\n            @Extension(name = \"test1\", properties = {\n                    @ExtensionProperty(name = \"test1\", value = \"value1\"),\n                    @ExtensionProperty(name = \"test2\", value = \"value2\")\n            })\n    })\n    private void methodFive() {\n\n    }\n\n    @Operation(description = \"method\", extensions = {\n            @Extension(name = \"test1\", properties = {\n                    @ExtensionProperty(name = \"test1\", value = \"value1\"),\n                    @ExtensionProperty(name = \"test2\", value = \"value2\")\n            }),\n            @Extension(properties = {\n                    @ExtensionProperty(name = \"test1\", value = \"value1\"),\n                    @ExtensionProperty(name = \"test2\", value = \"value2\")\n            })\n    })\n    private void methodSix() {\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/AnnotationsUtilsHeadersTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.google.common.collect.ImmutableMap;\nimport io.swagger.v3.core.util.AnnotationsUtils;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.headers.Header;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.models.headers.Header.StyleEnum;\nimport org.testng.annotations.DataProvider;\nimport org.testng.annotations.Test;\n\nimport java.lang.reflect.Method;\nimport java.util.Arrays;\nimport java.util.Map;\nimport java.util.Optional;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class AnnotationsUtilsHeadersTest {\n\n    private io.swagger.v3.oas.models.headers.Header header() {\n        return new io.swagger.v3.oas.models.headers.Header().style(StyleEnum.SIMPLE);\n    }\n\n    @DataProvider\n    private Object[][] expectedData() {\n        return new Object[][]{\n                {\"methodOne\", Optional.empty()},\n                {\"methodTwo\", Optional.empty()},\n                {\"methodThree\", Optional.empty()},\n                {\"methodFour\", Optional.of(ImmutableMap.of(\n                        \"\", header().description(\"header\"),\n                        \"header1\", header(),\n                        \"header2\", header().description(\"header 2\"),\n                        \"header3\", header().$ref(\"#/components/schemas/header3\")\n                ))},\n        };\n    }\n\n    @Test(dataProvider = \"expectedData\")\n    public void extensionsTest(String methodName,\n                               Optional<Map<String, io.swagger.v3.oas.models.headers.Header>> expected)\n            throws NoSuchMethodException {\n        final Method method = getClass().getDeclaredMethod(methodName);\n        final Header[] headers =\n                Arrays.stream(method.getAnnotation(Operation.class).responses())\n                        .flatMap(response -> Arrays.stream(response.headers())).toArray(Header[]::new);\n\n        final Optional<Map<String, io.swagger.v3.oas.models.headers.Header>> optionalMap =\n                AnnotationsUtils.getHeaders(headers, null, null);\n\n        assertEquals(optionalMap, expected);\n    }\n\n    @Operation(description = \"method\")\n    private void methodOne() {\n\n    }\n\n    @Operation(description = \"method\", responses = {\n            @ApiResponse()\n    })\n    private void methodTwo() {\n\n    }\n\n    @Operation(description = \"method\", responses = {\n            @ApiResponse(headers = {\n                    @Header(name = \"\")\n            })\n    })\n    private void methodThree() {\n\n    }\n\n    @Operation(description = \"method\", responses = {\n            @ApiResponse(headers = {\n                    @Header(name = \"\", description = \"header\"),\n                    @Header(name = \"header1\"),\n                    @Header(name = \"header2\", description = \"header 2\"),\n                    @Header(name = \"header3\", ref = \"#/components/schemas/header3\")\n            })\n    })\n    private void methodFour() {\n\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/BeanValidatorTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.oas.models.BeanValidationsModel;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.EmailSchema;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.NumberSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Test;\n\nimport java.math.BigDecimal;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertTrue;\n\npublic class BeanValidatorTest {\n\n    @Test(description = \"read bean validations\")\n    public void readBeanValidatorTest() {\n        final Map<String, Schema> schemas = ModelConverters.getInstance().readAll(BeanValidationsModel.class);\n        final Schema model = schemas.get(\"BeanValidationsModel\");\n        final Map<String, Schema> properties = model.getProperties();\n\n        assertTrue(model.getRequired().contains(\"id\"));\n        assertTrue(model.getRequired().contains(\"username\"));\n\n        final StringSchema username = (StringSchema) properties.get(\"username\");\n        assertEquals((String) username.getPattern(), \"(?![-._])[-._a-zA-Z0-9]{3,32}\");\n\n        final IntegerSchema age = (IntegerSchema) properties.get(\"age\");\n        assertEquals(age.getMinimum(), new BigDecimal(13.0));\n        assertEquals(age.getMaximum(), new BigDecimal(99.0));\n\n        final StringSchema password = (StringSchema) properties.get(\"password\");\n        assertEquals((int) password.getMinLength(), 6);\n        assertEquals((int) password.getMaxLength(), 20);\n\n        final EmailSchema email = (EmailSchema) properties.get(\"email\");\n        assertEquals((String) email.getFormat(), \"email\");\n\n        final NumberSchema minBalance = (NumberSchema) properties.get(\"minBalance\");\n        assertTrue(minBalance.getExclusiveMinimum());\n\n        final NumberSchema maxBalance = (NumberSchema) properties.get(\"maxBalance\");\n        assertTrue(maxBalance.getExclusiveMaximum());\n\n        final ArraySchema items = (ArraySchema) properties.get(\"items\");\n        assertEquals((int) items.getMinItems(), 2);\n        assertEquals((int) items.getMaxItems(), 10);\n        assertEquals((int) items.getItems().getMinLength(), 3);\n        assertEquals((int) items.getItems().getMaxLength(), 4);\n\n        final StringSchema optionalValue = (StringSchema) properties.get(\"optionalValue\");\n        assertEquals((int) optionalValue.getMinLength(), 1);\n        assertEquals((int) optionalValue.getMaxLength(), 10);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/ComplexPropertyTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport static org.testng.Assert.assertNotNull;\n\npublic class ComplexPropertyTest extends SwaggerTestBase {\n\n    @Test\n    public void testOuterBean() throws Exception {\n        final ModelResolver modelResolver = modelResolver();\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n        final Schema model = context\n                .resolve(new AnnotatedType(OuterBean.class));\n        assertNotNull(model);\n    }\n\n    static class OuterBean {\n        public int counter;\n        public InnerBean inner;\n    }\n\n    static class InnerBean {\n        public int d;\n        public int a;\n        public int c;\n        public int b;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/ComposedSchemaTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.resolving.resources.TestObject2616;\nimport io.swagger.v3.core.resolving.resources.TestObjectTicket2620;\nimport io.swagger.v3.core.resolving.resources.TestObjectTicket2620Subtypes;\nimport io.swagger.v3.core.resolving.resources.TestObjectTicket2900;\nimport io.swagger.v3.core.resolving.resources.TestObjectTicket4247;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.ComposedSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertFalse;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class ComposedSchemaTest {\n\n    @Test(description = \"read composed schem refs #2620\")\n    public void readBilateralComposedSchema_ticket2620() {\n        Map<String, Schema> schemas = ModelConverters.getInstance().readAll(TestObjectTicket2620.class);\n        Schema model = schemas.get(\"Child2TestObject\");\n        Map<String, Schema> properties = model.getProperties();\n        assertNotNull(properties.get(\"name\"));\n        assertNotNull(properties.get(\"childName\"));\n        assertFalse(model instanceof ComposedSchema);\n        model = schemas.get(\"ChildTestObject\");\n        properties = model.getProperties();\n        assertNotNull(properties.get(\"name\"));\n        assertNotNull(properties.get(\"childName\"));\n        assertFalse(model instanceof ComposedSchema);\n\n        model = schemas.get(\"TestObjectTicket2620\");\n        properties = model.getProperties();\n        assertNotNull(properties.get(\"name\"));\n        assertNull(properties.get(\"childName\"));\n        assertTrue(model instanceof ComposedSchema);\n        assertEquals(((ComposedSchema) model).getOneOf().size(), 2);\n\n        schemas = ModelConverters.getInstance().readAll(TestObjectTicket2620Subtypes.class);\n        model = schemas.get(\"Child2TestObject\");\n        assertNull(model.getProperties());\n        properties = ((ComposedSchema)model).getAllOf().get(1).getProperties();\n        assertNull(properties.get(\"name\"));\n        assertNotNull(properties.get(\"childName\"));\n        assertTrue(model instanceof ComposedSchema);\n        model = schemas.get(\"ChildTestObject\");\n        assertNull(model.getProperties());\n        properties = ((ComposedSchema)model).getAllOf().get(1).getProperties();\n        assertNull(properties.get(\"name\"));\n        assertNotNull(properties.get(\"childName\"));\n        assertTrue(model instanceof ComposedSchema);\n        assertEquals(((ComposedSchema) model).getAllOf().size(), 2);\n\n        model = schemas.get(\"TestObjectTicket2620Subtypes\");\n        properties = model.getProperties();\n        assertNotNull(properties.get(\"name\"));\n        assertNull(properties.get(\"childName\"));\n        assertTrue(model instanceof ComposedSchema);\n        assertEquals(((ComposedSchema) model).getOneOf().size(), 2);\n    }\n\n    @Test(description = \"read composed schem refs #2900\")\n    public void readComposedSchema_ticket2900() {\n        Json.mapper().addMixIn(TestObjectTicket2900.GsonJsonPrimitive.class, TestObjectTicket2900.GsonJsonPrimitiveMixIn.class);\n        Map<String, Schema> schemas = ModelConverters.getInstance().readAll(TestObjectTicket2900.class);\n        Schema model = schemas.get(\"SomeDTO\");\n        assertNotNull(model);\n        Map<String, Schema> properties = model.getProperties();\n        assertNotNull(properties.get(\"value\"));\n        assertEquals(properties.get(\"value\").get$ref(), \"#/components/schemas/MyJsonPrimitive\");\n        assertEquals(properties.get(\"valueWithMixIn\").get$ref(), \"#/components/schemas/GsonJsonPrimitive\");\n\n        model = schemas.get(\"MyJsonPrimitive\");\n        assertNotNull(model);\n        assertEquals(((ComposedSchema) model).getOneOf().size(), 2);\n        assertEquals(((ComposedSchema)model).getOneOf().get(0).getType(), \"string\");\n        assertEquals(((ComposedSchema)model).getOneOf().get(1).getType(), \"number\");\n\n        model = schemas.get(\"GsonJsonPrimitive\");\n        assertNotNull(model);\n        assertEquals(((ComposedSchema) model).getOneOf().size(), 2);\n        assertEquals(((ComposedSchema)model).getOneOf().get(0).getType(), \"string\");\n        assertEquals(((ComposedSchema)model).getOneOf().get(1).getType(), \"number\");\n        assertNull(model.getProperties());\n    }\n\n    @Test(description = \"read composed schem refs #2616\")\n    public void readArrayComposedSchema_ticket2616() {\n        Map<String, Schema> schemas = ModelConverters.getInstance().readAll(TestObject2616.class);\n        Schema model = schemas.get(\"testObject\");\n        assertNotNull(model);\n        Map<String, Schema> properties = model.getProperties();\n        assertNotNull(properties.get(\"objects\"));\n        assertTrue(properties.get(\"objects\") instanceof ArraySchema);\n        model = schemas.get(\"AbstractObject\");\n        assertNotNull(model);\n        assertTrue(model instanceof ComposedSchema);\n        assertEquals(((ComposedSchema) model).getOneOf().size(), 2);\n        model = schemas.get(\"AObject\");\n        assertNotNull(model);\n        model = schemas.get(\"BObject\");\n        assertNotNull(model);\n        model = schemas.get(\"objects\");\n        assertNull(model);\n\n    }\n\n    @Test(description = \"read single composed schem refs #2616\")\n    public void readComposedSchema_ticket2616() {\n        Map<String, Schema> schemas = ModelConverters.getInstance().readAll(TestObject2616.TestObject2616_Schema.class);\n        Schema model = schemas.get(\"TestObject2616_Schema\");\n        assertNotNull(model);\n        Map<String, Schema> properties = model.getProperties();\n        assertNotNull(properties.get(\"object\"));\n        assertEquals(properties.get(\"object\").get$ref(), \"#/components/schemas/AbstractObject\");\n        model = schemas.get(\"AbstractObject\");\n        assertNotNull(model);\n        assertTrue(model instanceof ComposedSchema);\n        assertEquals(((ComposedSchema) model).getOneOf().size(), 2);\n        model = schemas.get(\"AObject\");\n        assertNotNull(model);\n        model = schemas.get(\"BObject\");\n        assertNotNull(model);\n        model = schemas.get(\"objects\");\n        assertNull(model);\n    }\n\n    @Test(description = \"read composed schem refs #4247\")\n    public void readComposedSchema_ticket4247() {\n        Map<String, Schema> schemas = ModelConverters.getInstance().readAll(TestObjectTicket4247.class);\n        Schema model = schemas.get(\"TestObjectTicket4247\");\n        assertNotNull(model);\n        Map<String, Schema> properties = model.getProperties();\n        assertNotNull(properties.get(\"value\"));\n        assertEquals(((ComposedSchema) properties.get(\"value\")).getOneOf().size(), 2);\n        assertEquals(((ComposedSchema)properties.get(\"value\")).getOneOf().get(0).getType(), \"string\");\n        assertEquals(((ComposedSchema)properties.get(\"value\")).getOneOf().get(1).getType(), \"number\");\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/CompositionSuperfluousRefTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.converter.ResolvedSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.Assert;\nimport org.testng.annotations.Test;\n\npublic class CompositionSuperfluousRefTest {\n\n    static class SomeDto {}\n    static class OtherDto {}\n\n    static class MyDtoOneOf {\n        @io.swagger.v3.oas.annotations.media.Schema(oneOf = { SomeDto.class, OtherDto.class })\n        public Object myProperty;\n    }\n\n    static class MyDtoWithAnyOf {\n        @io.swagger.v3.oas.annotations.media.Schema(anyOf = { SomeDto.class, OtherDto.class })\n        public Object myProperty;\n    }\n\n    static class MyDtoWithAllOf {\n        @io.swagger.v3.oas.annotations.media.Schema(allOf = { SomeDto.class, OtherDto.class })\n        public Object myProperty;\n    }\n\n    static class MyDtoWithoutComposition {\n        @io.swagger.v3.oas.annotations.media.Schema(implementation = SomeDto.class)\n        public Object myProperty;\n    }\n\n    static class MyDtoWithNonMatchingRef {\n        @io.swagger.v3.oas.annotations.media.Schema(\n                ref = \"#/components/schemas/ThirdDto\",\n                oneOf = { SomeDto.class, OtherDto.class }\n        )\n        public Object myProperty;\n    }\n\n    @Test\n    public void oneOf_shouldNotHaveRef() {\n        ResolvedSchema rs = ModelConverters.getInstance(false)\n                .resolveAsResolvedSchema(new AnnotatedType(MyDtoOneOf.class));\n\n        Schema<?> prop = (Schema<?>) rs.schema.getProperties().get(\"myProperty\");\n\n        Assert.assertNull(prop.get$ref());\n        Assert.assertNotNull(prop.getOneOf());\n        Assert.assertEquals(prop.getOneOf().size(), 2);\n    }\n\n    @Test\n    public void anyOf_shouldNotHaveRef() {\n        ResolvedSchema rs = ModelConverters.getInstance(false)\n                .resolveAsResolvedSchema(new AnnotatedType(MyDtoWithAnyOf.class));\n\n        Schema<?> prop = (Schema<?>) rs.schema.getProperties().get(\"myProperty\");\n\n        Assert.assertNull(prop.get$ref());\n        Assert.assertNotNull(prop.getAnyOf());\n        Assert.assertEquals(prop.getAnyOf().size(), 2);\n    }\n\n    @Test\n    public void allOf_shouldNotHaveRef() {\n\n        ResolvedSchema rs = ModelConverters.getInstance(false)\n                .resolveAsResolvedSchema(new AnnotatedType(MyDtoWithAllOf.class));\n\n        Schema<?> prop = (Schema<?>) rs.schema.getProperties().get(\"myProperty\");\n        Assert.assertNull(prop.get$ref());\n        Assert.assertNotNull(prop.getAllOf());\n        Assert.assertEquals(prop.getAllOf().size(), 2);\n    }\n\n    @Test\n    public void testNonMatchingRef_shouldPreserveRef() {\n        ResolvedSchema rs = ModelConverters.getInstance(false)\n                .resolveAsResolvedSchema(new AnnotatedType(MyDtoWithNonMatchingRef.class));\n\n        Schema<?> prop = (Schema<?>) rs.schema.getProperties().get(\"myProperty\");\n\n        Assert.assertNotNull(prop.get$ref());\n        Assert.assertEquals(prop.get$ref(), \"#/components/schemas/ThirdDto\");\n        //In 3.x refs cannot have siblings\n        Assert.assertNull(prop.getOneOf());\n    }\n\n    @Test\n    public void oneOf_shouldNotHaveRef31() {\n        ResolvedSchema rs = ModelConverters.getInstance(true)\n                .resolveAsResolvedSchema(new AnnotatedType(MyDtoOneOf.class));\n\n        Schema<?> prop = (Schema<?>) rs.schema.getProperties().get(\"myProperty\");\n\n        Assert.assertNull(prop.get$ref());\n        Assert.assertNotNull(prop.getOneOf());\n        Assert.assertEquals(prop.getOneOf().size(), 2);\n    }\n\n    @Test\n    public void anyOf_shouldNotHaveRef31() {\n        ResolvedSchema rs = ModelConverters.getInstance(true)\n                .resolveAsResolvedSchema(new AnnotatedType(MyDtoWithAnyOf.class));\n\n        Schema<?> prop = (Schema<?>) rs.schema.getProperties().get(\"myProperty\");\n\n        Assert.assertNull(prop.get$ref());\n        Assert.assertNotNull(prop.getAnyOf());\n        Assert.assertEquals(prop.getAnyOf().size(), 2);\n    }\n\n    @Test\n    public void allOf_shouldNotHaveRef31() {\n\n        ResolvedSchema rs = ModelConverters.getInstance(true)\n                .resolveAsResolvedSchema(new AnnotatedType(MyDtoWithAllOf.class));\n\n        Schema<?> prop = (Schema<?>) rs.schema.getProperties().get(\"myProperty\");\n        Assert.assertNull(prop.get$ref());\n        Assert.assertNotNull(prop.getAllOf());\n        Assert.assertEquals(prop.getAllOf().size(), 2);\n    }\n\n    @Test\n    public void testNonMatchingRef_shouldPreserveRef31() {\n        ResolvedSchema rs = ModelConverters.getInstance(true)\n                .resolveAsResolvedSchema(new AnnotatedType(MyDtoWithNonMatchingRef.class));\n\n        Schema<?> prop = (Schema<?>) rs.schema.getProperties().get(\"myProperty\");\n\n        Assert.assertNotNull(prop.get$ref());\n        Assert.assertEquals(prop.get$ref(), \"#/components/schemas/ThirdDto\");\n        Assert.assertNotNull(prop.getOneOf());\n        Assert.assertEquals(prop.getOneOf().size(), 2);\n    }\n\n}\n\n\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/ContainerTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.resolving.resources.InnerType;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\n\npublic class ContainerTest extends SwaggerTestBase {\n\n    @Test\n    public void testArray() throws Exception {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context\n                .resolve(new AnnotatedType(ArrayBean.class));\n\n        final Map<String, Schema> props = model.getProperties();\n        assertEquals(1, props.size());\n        final Schema prop = props.get(\"a\");\n        assertNotNull(prop);\n        assertEquals(prop.getType(), \"array\");\n\n        final Schema items = ((ArraySchema) prop).getItems();\n        assertNotNull(items);\n        assertEquals(items.getType(), \"integer\");\n    }\n\n    @Test\n    public void testMap() throws Exception {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context\n                .resolve(new AnnotatedType(MapBean.class));\n\n        final Map<String, Schema> props = model.getProperties();\n        assertEquals(1, props.size());\n        final Schema prop = props.get(\"stuff\");\n        assertNotNull(prop);\n        assertEquals(prop.getType(), \"object\");\n\n        final Schema items = (Schema)prop.getAdditionalProperties();\n        assertNotNull(items);\n        assertEquals(items.getType(), \"string\");\n        assertEquals(items.getFormat(), \"date-time\");\n    }\n\n    @Test\n    public void testComplexMap() throws Exception {\n        ModelResolver resolver = new ModelResolver(mapper());\n\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(resolver);\n        context.resolve(new AnnotatedType(WrapperType.class));\n\n        final Map<String, Schema> models = context.getDefinedModels();\n        final Schema innerType = models.get(\"InnerType\");\n        assertNotNull(innerType);\n        final Map<String, Schema> innerProps = innerType.getProperties();\n        assertEquals(innerProps.size(), 2);\n        final Schema foo = innerProps.get(\"foo\");\n        assertEquals(foo.getType(), \"integer\");\n        assertEquals(foo.getFormat(), \"int32\");\n        final Schema name = innerProps.get(\"name\");\n        assertEquals(name.getType(), \"string\");\n\n        final Schema wrapperType = models.get(\"WrapperType\");\n        assertNotNull(wrapperType);\n        assertEquals(((Schema) wrapperType.getProperties().get(\"innerType\")).getType(), \"object\");\n    }\n\n    static class ArrayBean {\n        public int[] a;\n    }\n\n    static class MapBean {\n        public Map<Short, java.util.Calendar> stuff;\n    }\n\n    static class WrapperType {\n        public Map<String, InnerType> innerType;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/EnumTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.google.common.base.Functions;\nimport com.google.common.collect.Collections2;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Test;\n\nimport java.util.*;\nimport java.util.stream.Collectors;\n\nimport static org.testng.Assert.*;\nimport static org.testng.AssertJUnit.assertFalse;\n\npublic class EnumTest extends SwaggerTestBase {\n\n    @Test\n    public void testEnum() {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context.resolve((new AnnotatedType().type(Currency.class)));\n        assertNotNull(model);\n        assertTrue(model instanceof StringSchema);\n        final StringSchema strModel = (StringSchema) model;\n        assertNotNull(strModel.getEnum());\n        final Collection<String> modelValues =\n                new ArrayList<String>(Collections2.transform(Arrays.asList(Currency.values()), Functions.toStringFunction()));\n        assertEquals(strModel.getEnum(), modelValues);\n\n        final Schema property = context.resolve(new AnnotatedType().type(Currency.class).schemaProperty(true));\n        assertNotNull(property);\n        assertTrue(property instanceof StringSchema);\n        final StringSchema strProperty = (StringSchema) property;\n        assertNotNull(strProperty.getEnum());\n        final Collection<String> values =\n                new ArrayList<>(Collections2.transform(Arrays.asList(Currency.values()), Functions.toStringFunction()));\n        assertEquals(strProperty.getEnum(), values);\n    }\n\n    @Test\n    public void testEnumGenerics() {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context.resolve((new AnnotatedType().type(Contract.class)));\n        assertBasicModelStructure(model, \"Contract\");\n        assertPropertyExists(model, \"type\");\n    }\n\n    @Test\n    public void testEnumPropertyWithSchemaAnnotation() {\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context.resolve(new AnnotatedType().type(ClassWithEnumAsRefProperty.class));\n        assertBasicModelStructure(model, \"ClassWithEnumAsRefProperty\");\n        assertPropertyExists(model, \"enumWithSchemaProperty\");\n\n        final Schema enumPropertySchema = (Schema) model.getProperties().get(\"enumWithSchemaProperty\");\n        assertEnumAsRefProperty(enumPropertySchema, \"#/components/schemas/EnumWithSchemaProperty\");\n        assertEquals(enumPropertySchema.getDescription(), \"Property description\");\n    }\n\n    @Test\n    public void testEnumPropertyWithGlobalSwitchOnlyOpenApi31() {\n        ModelResolver.enumsAsRef = true;\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context.resolve(new AnnotatedType().type(ClassWithPlainEnum.class));\n        assertBasicModelStructure(model, \"ClassWithPlainEnum\");\n        assertPropertyExists(model, \"plainEnum\");\n\n        final Schema enumPropertySchema = (Schema) model.getProperties().get(\"plainEnum\");\n        assertNotNull(enumPropertySchema.get$ref());\n        assertNull(enumPropertySchema.getEnum());\n        assertEquals(enumPropertySchema.getDescription(), \"Plain enum property\");\n\n        assertEnumComponentExists(context, ClassWithPlainEnum.PlainEnum.values(), null);\n\n        // Reset the static field\n        ModelResolver.enumsAsRef = false;\n    }\n\n    @Test\n    public void testArrayOfEnumWithSchemaAnnotationOpenApi31() {\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context.resolve(new AnnotatedType().type(ClassWithEnumArray.class));\n        assertBasicModelStructure(model, \"ClassWithEnumArray\");\n        assertPropertyExists(model, \"enumArray\");\n\n        final Schema arrayPropertySchema = (Schema) model.getProperties().get(\"enumArray\");\n        assertArrayWithEnumRef(arrayPropertySchema);\n\n        assertEnumComponentExists(context, ClassWithEnumArray.ArrayEnum.values(), \"Enum description\");\n    }\n\n    @Test\n    public void testArrayOfEnumWithSchemaAnnotationOpenApi30() {\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(false);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context.resolve(new AnnotatedType().type(ClassWithEnumArray.class));\n        assertBasicModelStructure(model, \"ClassWithEnumArray\");\n        assertPropertyExists(model, \"enumArray\");\n\n        final Schema arrayPropertySchema = (Schema) model.getProperties().get(\"enumArray\");\n        assertArrayWithEnumRef(arrayPropertySchema);\n\n        assertEnumComponentExists(context, ClassWithEnumArray.ArrayEnum.values(), \"Enum description\");\n    }\n\n    @Test\n    public void testControlTestNoRefOpenApi31() {\n        ModelResolver.enumsAsRef = false;\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context.resolve(new AnnotatedType().type(ClassWithPlainEnum.class));\n        assertBasicModelStructure(model, \"ClassWithPlainEnum\");\n        assertPropertyExists(model, \"plainEnum\");\n\n        final Schema enumPropertySchema = (Schema) model.getProperties().get(\"plainEnum\");\n        assertInlineEnumProperty(enumPropertySchema);\n\n        // Apply broad assertions - verify no components are created for inline enums\n        Map<String, Schema> components = context.getDefinedModels();\n        if (components != null && !components.isEmpty()) {\n            Set<String> expected = Arrays.stream(ClassWithPlainEnum.PlainEnum.values())\n                    .map(Enum::name)\n                    .collect(Collectors.toSet());\n            Schema enumComponent = findEnumComponent(components, expected);\n            assertNull(enumComponent, \"No enum component should exist for inline enums\");\n        }\n    }\n\n    @Test\n    public void testControlTestNoRefOpenApi30() {\n        ModelResolver.enumsAsRef = false;\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(false);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context.resolve(new AnnotatedType().type(ClassWithPlainEnum.class));\n        assertBasicModelStructure(model, \"ClassWithPlainEnum\");\n        assertPropertyExists(model, \"plainEnum\");\n\n        final Schema enumPropertySchema = (Schema) model.getProperties().get(\"plainEnum\");\n        assertInlineEnumProperty(enumPropertySchema);\n\n        // Apply broad assertions - verify no components are created for inline enums\n        Map<String, Schema> components = context.getDefinedModels();\n        if (components != null && !components.isEmpty()) {\n            Set<String> expected = Arrays.stream(ClassWithPlainEnum.PlainEnum.values())\n                    .map(Enum::name)\n                    .collect(Collectors.toSet());\n            Schema enumComponent = findEnumComponent(components, expected);\n            assertNull(enumComponent, \"No enum component should exist for inline enums\");\n        }\n    }\n\n    @Test\n    public void testEnumWithAllOfSchemaResolutionOpenApi30() {\n        final ModelResolver modelResolver = new ModelResolver(mapper())\n                .openapi31(false)\n                .schemaResolution(Schema.SchemaResolution.ALL_OF);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context.resolve(new AnnotatedType().type(ClassWithEnumAsRefProperty.class));\n        assertBasicModelStructure(model, \"ClassWithEnumAsRefProperty\");\n        assertPropertyExists(model, \"enumWithSchemaProperty\");\n\n        final Schema enumPropertySchema = (Schema) model.getProperties().get(\"enumWithSchemaProperty\");\n\n        boolean hasEnumRef = false;\n        for (Object allOfItem : enumPropertySchema.getAllOf()) {\n            if (allOfItem instanceof Schema) {\n                Schema allOfSchema = (Schema) allOfItem;\n                if (\"#/components/schemas/EnumWithSchemaProperty\".equals(allOfSchema.get$ref())) {\n                    hasEnumRef = true;\n                    break;\n                }\n            }\n        }\n        assertTrue(hasEnumRef, \"AllOf should contain reference to enum component\");\n        assertEnumComponentExists(context, ClassWithEnumAsRefProperty.EnumWithSchemaProperty.values(), \"Enum description\");\n    }\n\n    private void assertBasicModelStructure(Schema model, String expectedName) {\n        assertNotNull(model);\n        assertEquals(model.getName(), expectedName);\n    }\n\n    private void assertPropertyExists(Schema model, String propertyName) {\n        assertTrue(model.getProperties().containsKey(propertyName));\n        assertNotNull(model.getProperties().get(propertyName));\n    }\n\n    private void assertEnumComponentExists(ModelConverterContextImpl context, Enum<?>[] enumValues, String expectedDescription) {\n        Map<String, Schema> components = context.getDefinedModels();\n        assertNotNull(components);\n        assertFalse(components.isEmpty());\n\n        Set<String> expected = Arrays.stream(enumValues)\n                .map(Enum::name)\n                .collect(Collectors.toCollection(LinkedHashSet::new));\n\n        Schema enumComponent = findEnumComponent(components, expected);\n        assertNotNull(enumComponent);\n        assertEquals(enumComponent.getDescription(), expectedDescription);\n    }\n\n    private void assertEnumComponentExistsWithDefault(ModelConverterContextImpl context, Enum<?>[] enumValues, String expectedDescription, String expectedDefault) {\n        assertEnumComponentExists(context, enumValues, expectedDescription);\n\n        Map<String, Schema> components = context.getDefinedModels();\n        Set<String> expected = Arrays.stream(enumValues)\n                .map(Enum::name)\n                .collect(Collectors.toCollection(LinkedHashSet::new));\n\n        Schema enumComponent = findEnumComponent(components, expected);\n        assertEquals(enumComponent.getDefault(), expectedDefault);\n    }\n\n    private Schema findEnumComponent(Map<String, Schema> components, Set<String> expectedValues) {\n        return components.values().stream()\n                .filter(Objects::nonNull)\n                .filter(s -> s.getEnum() != null)\n                .filter(s -> {\n                    List<?> ev = s.getEnum();\n                    Set<String> vals = ev.stream().map(Object::toString).collect(Collectors.toSet());\n                    return vals.containsAll(expectedValues) && expectedValues.containsAll(vals);\n                })\n                .findFirst()\n                .orElse(null);\n    }\n\n    private void assertEnumAsRefProperty(Schema propertySchema, String expectedRef) {\n        assertEquals(propertySchema.get$ref(), expectedRef);\n        assertNull(propertySchema.getEnum());\n    }\n\n    private void assertInlineEnumProperty(Schema propertySchema) {\n        assertNotNull(propertySchema.getEnum());\n        assertNull(propertySchema.get$ref());\n    }\n\n    private void assertArrayWithEnumRef(Schema arrayPropertySchema) {\n        assertNotNull(arrayPropertySchema.getItems());\n        assertNotNull(arrayPropertySchema.getItems().get$ref());\n    }\n\n\n    public static class ClassWithEnumAsRefProperty {\n\n        @io.swagger.v3.oas.annotations.media.Schema(enumAsRef = true, description = \"Property description\", maximum = \"1923234\")\n        public final EnumWithSchemaProperty enumWithSchemaProperty;\n\n        public ClassWithEnumAsRefProperty(EnumWithSchemaProperty enumWithSchemaProperty) {\n            this.enumWithSchemaProperty = enumWithSchemaProperty;\n        }\n\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Enum description\")\n        public enum EnumWithSchemaProperty {\n            VALUE1,\n            VALUE2\n        }\n    }\n\n    public static class ClassWithEnumArray {\n\n        @io.swagger.v3.oas.annotations.media.ArraySchema(schema = @io.swagger.v3.oas.annotations.media.Schema(enumAsRef = true, description = \"Property Description\"))\n        public final ArrayEnum[] enumArray;\n\n        public ClassWithEnumArray(ArrayEnum[] enumArray) {\n            this.enumArray = enumArray;\n        }\n\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Enum description\")\n        public enum ArrayEnum {\n            FIRST,\n            SECOND,\n            THIRD\n        }\n    }\n\n    public static class ClassWithPlainEnum {\n\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Plain enum property\")\n        public final PlainEnum plainEnum;\n\n        public ClassWithPlainEnum(PlainEnum plainEnum) {\n            this.plainEnum = plainEnum;\n        }\n\n        public enum PlainEnum {\n            ONE,\n            TWO,\n            THREE\n        }\n    }\n\n    public enum Currency {\n        USA, CANADA\n    }\n\n    public static class Contract {\n\n        private Enum<?> type;\n\n        public Enum<?> getType() {\n            return type;\n        }\n\n        public Contract setType(Enum<?> type) {\n            this.type = type;\n            return this;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/HiddenFieldTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonCreator;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class HiddenFieldTest {\n\n    @Test(description = \"it should ignore a hidden field\")\n    public void testHiddenField() {\n        final Map<String, Schema> models = ModelConverters.getInstance().read(ModelWithHiddenFields.class);\n\n        final Schema model = models.get(\"ModelWithHiddenFields\");\n        assertNotNull(model);\n        assertEquals(model.getProperties().size(), 2);\n\n        final Schema idValue = (Schema) model.getProperties().get(\"id\");\n        assertTrue(idValue instanceof IntegerSchema);\n\n        assertTrue(model.getRequired().contains(\"id\"));\n\n        final Schema nameValue = (Schema) model.getProperties().get(\"name\");\n        assertTrue(nameValue instanceof StringSchema);\n\n        final Schema passwordValue = (Schema) model.getProperties().get(\"password\");\n        assertNull(passwordValue);\n    }\n\n    static class ModelWithHiddenFields {\n        @io.swagger.v3.oas.annotations.media.Schema(required = true)\n        public Long id = null;\n\n        @io.swagger.v3.oas.annotations.media.Schema(required = true, hidden = false)\n        public String name = null;\n\n        @io.swagger.v3.oas.annotations.media.Schema(hidden = true)\n        public String password = null;\n    }\n\n    @Test(description = \"it should ignore a hidden field in @JsonCreator\")\n    public void testHiddenFieldInJsonCreator() {\n        final Map<String, Schema> models = ModelConverters.getInstance().read(ModelWithHiddenFieldsInJsonCreator.class);\n\n        final Schema model = models.get(\"ModelWithHiddenFieldsInJsonCreator\");\n        assertNotNull(model);\n        assertEquals(model.getProperties().size(), 1);\n\n        final Schema idValue = (Schema) model.getProperties().get(\"id\");\n        assertTrue(idValue instanceof IntegerSchema);\n\n        final Schema hiddenValue = (Schema) model.getProperties().get(\"hidden\");\n        assertNull(hiddenValue);\n    }\n\n    static class ModelWithHiddenFieldsInJsonCreator {\n        @JsonProperty(\"id\")\n        private final Long id;\n\n        @io.swagger.v3.oas.annotations.media.Schema(hidden = true)\n        @JsonProperty(\"hidden\")\n        private final String hidden;\n\n        @JsonCreator\n        public ModelWithHiddenFieldsInJsonCreator(@JsonProperty(\"id\") Long id,\n                                                  @JsonProperty(\"hidden\") @io.swagger.v3.oas.annotations.media.Schema(hidden = true) String hidden) {\n            this.id = id;\n            this.hidden = hidden;\n        }\n\n        public Long getId() {\n            return id;\n        }\n\n        @io.swagger.v3.oas.annotations.media.Schema(hidden = true)\n        public String getHidden() {\n            return hidden;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/InheritedBeanTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.oas.annotations.media.DiscriminatorMapping;\nimport io.swagger.v3.oas.models.media.ComposedSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.AfterTest;\nimport org.testng.annotations.BeforeMethod;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class InheritedBeanTest extends SwaggerTestBase {\n\n    private ModelResolver modelResolver;\n    private ModelConverterContextImpl context;\n\n    @BeforeMethod\n    public void setup() {\n        ModelResolver.composedModelPropertiesAsSibling = false;\n        modelResolver = new ModelResolver(new ObjectMapper());\n        context = new ModelConverterContextImpl(modelResolver);\n    }\n\n    @AfterTest\n    public void afterTest() {\n        ModelResolver.composedModelPropertiesAsSibling = false;\n    }\n\n    @Test\n    public void testInheritedBean() throws Exception {\n        final Schema baseModel = context.resolve(new AnnotatedType(BaseBean.class));\n        assertNotNull(baseModel);\n        assertBasePropertiesValid(baseModel.getProperties());\n\n        assertEquals(baseModel.getDiscriminator().getPropertyName(), \"type\");\n        assertEquals(baseModel.getDiscriminator().getMapping().get(\"Sub1BeanMapped\"), \"#/components/schemas/Sub1Bean\");\n\n        final Schema subModel = context.getDefinedModels().get(\"Sub1Bean\");\n        assertNotNull(subModel);\n        // make sure child points at parent\n        assertTrue(subModel instanceof ComposedSchema);\n        ComposedSchema cm = (ComposedSchema) subModel;\n        assertEquals(cm.getAllOf().get(0).get$ref(), \"#/components/schemas/BaseBean\");\n\n        // make sure parent properties are filtered out of subclass\n        assertSub1PropertiesValid(cm.getAllOf().get(1).getProperties());\n    }\n\n    @Test\n    public void testInheritedChildBean() throws Exception {\n        final Schema subModel = context.resolve(new AnnotatedType(Sub1Bean.class));\n        assertNotNull(subModel);\n        // make sure child points at parent\n        assertTrue(subModel instanceof ComposedSchema);\n        ComposedSchema cm = (ComposedSchema) subModel;\n        assertEquals(cm.getAllOf().get(0).get$ref(), \"#/components/schemas/BaseBean\");\n\n        // make sure parent properties are filtered out of subclass\n        assertSub1PropertiesValid(cm.getAllOf().get(1).getProperties());\n\n        final Schema baseModel = context.getDefinedModels().get(\"BaseBean\");\n        assertNotNull(baseModel);\n        assertBasePropertiesValid(baseModel.getProperties());\n    }\n\n    @Test\n    public void testComposedChildBean() throws Exception {\n        final Schema subModel = context.resolve(new AnnotatedType(Sub2Bean.class));\n        assertNotNull(subModel);\n        // make sure child points at parent\n        assertTrue(subModel instanceof ComposedSchema);\n        ComposedSchema cm = (ComposedSchema) subModel;\n        assertEquals(cm.getAllOf().get(0).get$ref(), \"#/components/schemas/BaseBean2\");\n\n        // make sure parent properties are filtered out of subclass\n        assertSub1PropertiesValid(cm.getAllOf().get(1).getProperties());\n\n        final Schema baseModel = context.getDefinedModels().get(\"BaseBean2\");\n        assertNotNull(baseModel);\n        assertBase2PropertiesValid(baseModel.getProperties());\n    }\n\n    @Test\n    public void testComposedUberObject() throws Exception {\n        final Schema uberModel = context.resolve(new AnnotatedType(UberObject.class));\n        assertNotNull(uberModel);\n        // make sure child points at parent\n        assertTrue(uberModel instanceof ComposedSchema);\n        ComposedSchema cm = (ComposedSchema) uberModel;\n        assertEquals(cm.getAnyOf().size(), 2);\n        assertEquals(cm.getAnyOf().get(0).get$ref(), \"#/components/schemas/UserObject\");\n        // parent properties are filtered out of subclass when parent doesn't define subtypes\n        assertNotNull(cm.getProperties());\n        assertEquals(cm.getProperties().size(), 3);\n\n        final Schema interfaceModel = context.getDefinedModels().get(\"UserObject\");\n        assertNotNull(interfaceModel);\n        assertUserObjectPropertiesValid(interfaceModel.getProperties());\n\n    }\n\n    @Test\n    public void testHierarchy() throws Exception {\n        final Schema baseModel = context.resolve(new AnnotatedType(BaseBean3.class));\n        assertNotNull(baseModel);\n        assertBasePropertiesValid(baseModel.getProperties());\n\n        assertEquals(baseModel.getDiscriminator().getPropertyName(), \"type\");\n        assertEquals(baseModel.getDiscriminator().getMapping().get(\"ChildBean3Mapped\"), \"#/components/schemas/ChildBean3\");\n\n        final Schema subModel = context.getDefinedModels().get(\"ChildBean3\");\n        assertNotNull(subModel);\n        // make sure child points at parent\n        assertTrue(subModel instanceof ComposedSchema);\n        ComposedSchema cm = (ComposedSchema) subModel;\n        assertEquals(cm.getAllOf().get(0).get$ref(), \"#/components/schemas/BaseBean3\");\n        // make sure parent properties are filtered out of subclass\n        assertSub1PropertiesValid(cm.getAllOf().get(1).getProperties());\n\n        // assert grandchild\n        final Schema subSubModel = context.getDefinedModels().get(\"GrandChildBean3\");\n        assertNotNull(subSubModel);\n        // make sure child points at parent\n        assertTrue(subSubModel instanceof ComposedSchema);\n        cm = (ComposedSchema) subSubModel;\n        assertEquals(cm.getAllOf().get(0).get$ref(), \"#/components/schemas/ChildBean3\");\n        // make sure parent properties are filtered out of subclass\n        assertSub2PropertiesValid(cm.getAllOf().get(1).getProperties());\n\n    }\n\n    private void assertBasePropertiesValid(Map<String, Schema> baseProperites) {\n        assertEquals(baseProperites.size(), 3);\n        for (Map.Entry<String, Schema> entry : baseProperites.entrySet()) {\n            final String name = entry.getKey();\n            final Schema prop = entry.getValue();\n            if (\"type\".equals(name)) {\n                assertEquals(prop.getType(), \"string\");\n            } else if (\"a\".equals(name)) {\n                assertEquals(prop.getType(), \"integer\");\n                assertEquals(prop.getFormat(), \"int32\");\n            } else if (\"b\".equals(name)) {\n                assertEquals(prop.getType(), \"string\");\n            }\n        }\n    }\n\n    private void assertBase2PropertiesValid(Map<String, Schema> baseProperites) {\n        assertEquals(baseProperites.size(), 4);\n        for (Map.Entry<String, Schema> entry : baseProperites.entrySet()) {\n            final String name = entry.getKey();\n            final Schema prop = entry.getValue();\n            if (\"type\".equals(name)) {\n                assertEquals(prop.getType(), \"string\");\n            } else if (\"a\".equals(name)) {\n                assertEquals(prop.getType(), \"integer\");\n                assertEquals(prop.getFormat(), \"int32\");\n            } else if (\"b\".equals(name)) {\n                assertEquals(prop.getType(), \"string\");\n            } else if (\"d\".equals(name)) {\n                assertEquals(prop.getType(), \"integer\");\n                assertEquals(prop.getFormat(), \"int32\");\n            }\n        }\n    }\n\n    private void assertSub1PropertiesValid(Map<String, Schema> subProperties) {\n        assertEquals(subProperties.size(), 1);\n        for (Map.Entry<String, Schema> entry : subProperties.entrySet()) {\n            final String name = entry.getKey();\n            final Schema prop = entry.getValue();\n            if (\"c\".equals(name)) {\n                assertEquals(prop.getType(), \"integer\");\n                assertEquals(prop.getFormat(), \"int32\");\n            }\n        }\n    }\n\n    private void assertUserObjectPropertiesValid(Map<String, Schema> subProperties) {\n        assertEquals(subProperties.size(), 2);\n        for (Map.Entry<String, Schema> entry : subProperties.entrySet()) {\n            final String name = entry.getKey();\n            final Schema prop = entry.getValue();\n            if (\"id\".equals(name)) {\n                assertEquals(prop.getType(), \"string\");\n            }\n            if (\"name\".equals(name)) {\n                assertEquals(prop.getType(), \"string\");\n            }\n        }\n    }\n\n    @JsonTypeInfo(include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.NAME, property = \"type\", visible = true)\n    @JsonSubTypes({@JsonSubTypes.Type(value = Sub1Bean.class, name = \"sub1\")})\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"BaseBean\"\n            , discriminatorProperty = \"type\", discriminatorMapping = {@DiscriminatorMapping(value = \"Sub1BeanMapped\", schema = Sub1Bean.class)}\n    )\n    static class BaseBean {\n        public String type;\n        public int a;\n        public String b;\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"Sub1Bean\", allOf = {BaseBean.class})\n    static class Sub1Bean extends BaseBean {\n        public int c;\n    }\n\n    @JsonTypeInfo(include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.NAME, property = \"type\", visible = true)\n    @JsonSubTypes({@JsonSubTypes.Type(value = Sub2Bean.class, name = \"sub2\")})\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"BaseBean2\")\n    static class BaseBean2 {\n        public String type;\n        public int a;\n        public String b;\n\n        public int getD() {\n            return d;\n        }\n\n        public void setD(int d) {\n            this.d = d;\n        }\n\n        private int d;\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"Sub2Bean\", allOf = {BaseBean2.class}, anyOf = {BaseBean.class})\n    static class Sub2Bean extends BaseBean2 {\n        public int a;\n        public int c;\n    }\n\n    @JsonSubTypes({@JsonSubTypes.Type(value = ChildBean3.class, name = \"childBean3\")})\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"BaseBean3\"\n            , discriminatorProperty = \"type\", discriminatorMapping = {@DiscriminatorMapping(value = \"ChildBean3Mapped\", schema = ChildBean3.class)}\n    )\n    static class BaseBean3 {\n        public String type;\n        public int a;\n        public String b;\n    }\n\n    @JsonSubTypes({@JsonSubTypes.Type(value = GrandChildBean3.class, name = \"grandChildBean3\")})\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"ChildBean3\", allOf = {BaseBean3.class})\n    static class ChildBean3 extends BaseBean3 {\n        public int c;\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"GrandChildBean3\", allOf = {ChildBean3.class})\n    static class GrandChildBean3 extends ChildBean3 {\n        public int d;\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(anyOf = {UserObject.class, EmployeeObject.class})\n    static class UberObject implements UserObject, EmployeeObject {\n        private String id;\n        private String name;\n        private String department;\n\n        @Override\n        public String getDepartment() {\n            return department;\n        }\n\n        @Override\n        public String getId() {\n            return id;\n        }\n\n        @Override\n        public String getName() {\n            return name;\n        }\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"A User Object\")\n    interface UserObject {\n        @io.swagger.v3.oas.annotations.media.Schema(format = \"uuid\", required = true)\n        String getId();\n\n        String getName();\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"An Employee Object\", requiredProperties = {\"department\"})\n    interface EmployeeObject {\n        @io.swagger.v3.oas.annotations.media.Schema(format = \"email\")\n        String getId();\n\n        String getDepartment();\n    }\n\n    @Test\n    public void testMultipleInheritedBean() throws Exception {\n        final Schema baseModel = context.resolve(new AnnotatedType(MultipleBaseBean.class));\n\n        assertNotNull(baseModel);\n        assertBasePropertiesValid(baseModel.getProperties());\n\n        final Schema sub1Model = context.getDefinedModels().get(\"MultipleSub1Bean\");\n        assertNotNull(sub1Model);\n        // make sure child points at parent\n        assertTrue(sub1Model instanceof ComposedSchema);\n        ComposedSchema cm1 = (ComposedSchema) sub1Model;\n        assertEquals(cm1.getAllOf().get(0).get$ref(), \"#/components/schemas/MultipleBaseBean\");\n        // make sure parent properties are filtered out of subclass\n        assertSub1PropertiesValid(cm1.getAllOf().get(1).getProperties());\n\n        final Schema sub2Model = context.getDefinedModels().get(\"MultipleSub2Bean\");\n        assertNotNull(sub2Model);\n        assertTrue(sub2Model instanceof ComposedSchema);\n        ComposedSchema cm2 = (ComposedSchema) sub2Model;\n        assertEquals(cm2.getAllOf().get(0).get$ref(), \"#/components/schemas/MultipleBaseBean\");\n        // make sure parent properties are filtered out of subclass\n        assertSub2PropertiesValid(cm2.getAllOf().get(1).getProperties());\n    }\n\n    @Test\n    public void testMultipleInheritedChildBean() throws Exception {\n        final Schema subModel = context.resolve(new AnnotatedType(MultipleSub1Bean.class));\n        assertNotNull(subModel);\n        // make sure child points at parent\n        assertTrue(subModel instanceof ComposedSchema);\n        ComposedSchema cm = (ComposedSchema) subModel;\n        assertEquals(cm.getAllOf().get(0).get$ref(), \"#/components/schemas/MultipleBaseBean\");\n        // make sure parent properties are filtered out of subclass\n        assertSub1PropertiesValid(cm.getAllOf().get(1).getProperties());\n\n        final Schema baseModel = context.getDefinedModels().get(\"MultipleBaseBean\");\n        assertNotNull(baseModel);\n        assertBasePropertiesValid(baseModel.getProperties());\n\n        final Schema sub1Model = context.getDefinedModels().get(\"MultipleSub1Bean\");\n        assertNotNull(sub1Model);\n        // make sure child points at parent\n        assertTrue(sub1Model instanceof ComposedSchema);\n        ComposedSchema cm1 = (ComposedSchema) sub1Model;\n        assertEquals(cm1.getAllOf().get(0).get$ref(), \"#/components/schemas/MultipleBaseBean\");\n        // make sure parent properties are filtered out of subclass\n        assertSub1PropertiesValid(cm1.getAllOf().get(1).getProperties());\n\n        final Schema sub2Model = context.getDefinedModels().get(\"MultipleSub2Bean\");\n        assertNotNull(sub2Model);\n        assertTrue(sub2Model instanceof ComposedSchema);\n        ComposedSchema cm2 = (ComposedSchema) sub2Model;\n        assertEquals(cm2.getAllOf().get(0).get$ref(), \"#/components/schemas/MultipleBaseBean\");\n        // make sure parent properties are filtered out of subclass\n        assertSub2PropertiesValid(cm2.getAllOf().get(1).getProperties());\n    }\n\n    private void assertSub2PropertiesValid(Map<String, Schema> subProperties) {\n        assertEquals(subProperties.size(), 1);\n        for (Map.Entry<String, Schema> entry : subProperties.entrySet()) {\n            final String name = entry.getKey();\n            final Schema prop = entry.getValue();\n            if (\"d\".equals(name)) {\n                assertEquals(prop.getType(), \"integer\");\n                assertEquals(prop.getFormat(), \"int32\");\n            }\n        }\n    }\n\n    @JsonTypeInfo(include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.NAME, property = \"type\", visible = true)\n    @JsonSubTypes({\n            @JsonSubTypes.Type(value = MultipleSub1Bean.class, name = \"multipleSub1\"),\n            @JsonSubTypes.Type(value = MultipleSub2Bean.class, name = \"multipleSub2\")\n    })\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"MultipleBaseBean\")\n    static class MultipleBaseBean {\n        public String type;\n        public int a;\n        public String b;\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"MultipleSub1Bean\", allOf = {MultipleBaseBean.class})\n    static class MultipleSub1Bean extends MultipleBaseBean {\n        public int c;\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"MultipleSub2Bean\", allOf = {MultipleBaseBean.class})\n    static class MultipleSub2Bean extends MultipleBaseBean {\n        public int d;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/InlineResolvingTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class InlineResolvingTest extends SwaggerTestBase{\n\n    @Test\n    public void testInlineResolving() {\n\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(false).schemaResolution(io.swagger.v3.oas.models.media.Schema.SchemaResolution.INLINE);\n        final ModelConverterContextImpl c = new ModelConverterContextImpl(modelResolver);\n        // ModelConverters c = ModelConverters.getInstance(false, io.swagger.v3.oas.models.media.Schema.SchemaResolution.INLINE);\n        c.resolve(new AnnotatedType(InlineSchemaFirst.class));\n\n        String expectedYaml = \"InlineSchemaFirst:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    property1:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: InlineSchemaFirst property 1\\n\" +\n                \"      nullable: true\\n\" +\n                \"      example: example\\n\" +\n                \"    property2:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: ' InlineSchemaFirst property 2'\\n\" +\n                \"      example: example 2\\n\" +\n                \"InlineSchemaPropertyFirst:\\n\" +\n                \"  type: object\\n\" +\n                \"  description: property\\n\" +\n                \"  example: example\\n\";\n\n        SerializationMatchers.assertEqualsToYaml(c.getDefinedModels(), expectedYaml);\n        // stringSchemaMap = c.readAll(InlineSchemaSecond.class);\n        c.resolve(new AnnotatedType(InlineSchemaSecond.class));\n        expectedYaml = \"InlineSchemaFirst:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    property1:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: InlineSchemaFirst property 1\\n\" +\n                \"      nullable: true\\n\" +\n                \"      example: example\\n\" +\n                \"    property2:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: ' InlineSchemaFirst property 2'\\n\" +\n                \"      example: example 2\\n\" +\n                \"InlineSchemaPropertyFirst:\\n\" +\n                \"  type: object\\n\" +\n                \"  description: property\\n\" +\n                \"  example: example\\n\" +\n                \"InlineSchemaPropertySecond:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    bar:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        property1:\\n\" +\n                \"          type: object\\n\" +\n                \"          description: property 1\\n\" +\n                \"        property2:\\n\" +\n                \"          type: object\\n\" +\n                \"          description: property 2\\n\" +\n                \"          example: example\\n\" +\n                \"  description: propertysecond\\n\" +\n                \"  nullable: true\\n\" +\n                \"  example: examplesecond\\n\" +\n                \"InlineSchemaPropertySimple:\\n\" +\n                \"  type: object\\n\" +\n                \"  description: property\\n\" +\n                \"  example: example\\n\" +\n                \"InlineSchemaSecond:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    propertySecond1:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            property1:\\n\" +\n                \"              type: object\\n\" +\n                \"              description: property 1\\n\" +\n                \"            property2:\\n\" +\n                \"              type: object\\n\" +\n                \"              description: property 2\\n\" +\n                \"              example: example\\n\" +\n                \"      description: InlineSchemaSecond property 1\\n\" +\n                \"      nullable: true\\n\" +\n                \"      example: examplesecond\\n\" +\n                \"    property2:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: InlineSchemaSecond property 2\\n\" +\n                \"      example: InlineSchemaSecond example 2\\n\" +\n                \"InlineSchemaSimple:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    property1:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: property 1\\n\" +\n                \"    property2:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: property 2\\n\" +\n                \"      example: example\\n\";\n        SerializationMatchers.assertEqualsToYaml(c.getDefinedModels(), expectedYaml);\n    }\n\n    static class InlineSchemaFirst {\n\n        // public String foo;\n\n        @Schema(description = \"InlineSchemaFirst property 1\", nullable = true)\n        public InlineSchemaPropertyFirst property1;\n\n\n        private InlineSchemaPropertyFirst property2;\n\n        @Schema(description = \" InlineSchemaFirst property 2\", example = \"example 2\")\n        public InlineSchemaPropertyFirst getProperty2() {\n            return null;\n        }\n    }\n\n    static class InlineSchemaSecond {\n\n        // public String foo;\n\n        @Schema(description = \"InlineSchemaSecond property 1\", nullable = true)\n        public InlineSchemaPropertySecond propertySecond1;\n\n\n        private InlineSchemaPropertyFirst property2;\n\n        @Schema(description = \"InlineSchemaSecond property 2\", example = \"InlineSchemaSecond example 2\")\n        public InlineSchemaPropertyFirst getProperty2() {\n            return null;\n        }\n    }\n\n    @Schema(description = \"property\", example = \"example\")\n    static class InlineSchemaPropertyFirst {\n        // public String bar;\n    }\n\n    @Schema(description = \"propertysecond\", example = \"examplesecond\")\n    static class InlineSchemaPropertySecond {\n        public InlineSchemaSimple bar;\n    }\n\n    static class InlineSchemaSimple {\n\n        @Schema(description = \"property 1\")\n        public InlineSchemaPropertySimple property1;\n\n\n        private InlineSchemaPropertySimple property2;\n\n        @Schema(description = \"property 2\", example = \"example\")\n        public InlineSchemaPropertySimple getProperty2() {\n            return null;\n        }\n    }\n\n    @Schema(description = \"property\")\n    static class InlineSchemaPropertySimple {\n        // public String bar;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/JacksonJsonUnwrappedTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.resources.JacksonUnwrappedRequiredProperty;\nimport org.testng.annotations.Test;\n\npublic class JacksonJsonUnwrappedTest {\n\n  @Test(description = \"test the @JsonUnwrapped behaviour when required Properties\")\n  public void jacksonJsonUnwrappedTest() {\n\n    SerializationMatchers\n        .assertEqualsToYaml(ModelConverters.getInstance().read(\n            JacksonUnwrappedRequiredProperty.class), \"InnerTypeRequired:\\n\" +\n            \"  required:\\n\" +\n            \"  - name\\n\" +\n            \"  type: object\\n\" +\n            \"  properties:\\n\" +\n            \"    foo:\\n\" +\n            \"      type: integer\\n\" +\n            \"      format: int32\\n\" +\n            \"    name:\\n\" +\n            \"      type: string\\n\" +\n            \"JacksonUnwrappedRequiredProperty:\\n\" +\n            \"  required:\\n\" +\n            \"  - name\\n\" +\n            \"  type: object\\n\" +\n            \"  properties:\\n\" +\n                \"    foo:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int32\\n\" +\n                \"    name:\\n\" +\n                \"      type: string\\n\");\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/JaxBDefaultValueTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.oas.models.ModelWithJaxBDefaultValues;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class JaxBDefaultValueTest {\n\n    @Test(description = \"convert a model with Guava optionals\")\n    public void convertModelWithGuavaOptionals() {\n        final Map<String, Schema> schemas = ModelConverters.getInstance().read(ModelWithJaxBDefaultValues.class);\n        final Map<String, Schema> properties = schemas.get(\"ModelWithJaxBDefaultValues\").getProperties();\n        assertEquals(properties.size(), 2);\n        assertEquals(((StringSchema) properties.get(\"name\")).getDefault(), \"Tony\");\n        assertEquals((int) ((IntegerSchema) properties.get(\"age\")).getDefault(), 100);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/JodaDateTimeConverterTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.oas.models.media.DateTimeSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.joda.time.DateTime;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertTrue;\n\npublic class JodaDateTimeConverterTest {\n\n    @Test\n    public void testJodaDateTime() {\n        final Map<String, Schema> models = ModelConverters.getInstance().read(ModelWithJodaDateTime.class);\n        assertEquals(models.size(), 1); // don't create a Joda DateTime object\n\n        final Schema model = models.get(\"ModelWithJodaDateTime\");\n\n        final Schema dateTimeProperty = (Schema) model.getProperties().get(\"createdAt\");\n        assertTrue(dateTimeProperty instanceof DateTimeSchema);\n        assertTrue(model.getRequired().contains(\"createdAt\"));\n        assertEquals(dateTimeProperty.getDescription(), \"creation timestamp\");\n\n        final Schema nameProperty = (Schema) model.getProperties().get(\"name\");\n        assertTrue(nameProperty instanceof StringSchema);\n        assertEquals(nameProperty.getDescription(), \"name of the model\");\n    }\n\n    class ModelWithJodaDateTime {\n\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"name of the model\")\n        public String name;\n\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"creation timestamp\", required = true)\n        public DateTime createdAt;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/JodaLocalDateConverterTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.oas.models.media.DateSchema;\nimport io.swagger.v3.oas.models.media.DateTimeSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.joda.time.LocalDate;\nimport org.testng.annotations.Test;\n\nimport java.time.Instant;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertTrue;\n\npublic class JodaLocalDateConverterTest {\n\n    @Test\n    public void testJodaLocalDate() {\n        final Map<String, Schema> models = ModelConverters.getInstance().read(ModelWithJodaLocalDate.class);\n        assertEquals(models.size(), 1);\n\n        final Schema model = models.get(\"ModelWithJodaLocalDate\");\n\n        final Schema dateTimeProperty = (Schema) model.getProperties().get(\"createdAt\");\n        assertTrue(dateTimeProperty instanceof DateSchema);\n        assertTrue(model.getRequired().contains(\"createdAt\"));\n        assertEquals(dateTimeProperty.getDescription(), \"creation localDate\");\n\n        final Schema nameProperty = (Schema) model.getProperties().get(\"name\");\n        assertTrue(nameProperty instanceof StringSchema);\n        assertEquals(nameProperty.getDescription(), \"name of the model\");\n    }\n\n    class ModelWithJodaLocalDate {\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"name of the model\")\n        public String name;\n\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"creation localDate\", required = true)\n        public LocalDate createdAt;\n    }\n\n    @Test\n    public void testJavaTimeInstant() {\n        final Map<String, Schema> models = ModelConverters.getInstance().read(ModelWithJavaTimeInstant.class);\n        assertEquals(models.size(), 1);\n        final Schema model = models.get(\"ModelWithJavaTimeInstant\");\n\n        final Schema dateTimeProperty = (Schema) model.getProperties().get(\"createdAt\");\n        assertTrue(dateTimeProperty instanceof DateTimeSchema);\n    }\n\n    class ModelWithJavaTimeInstant {\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"name of the model\")\n        public String name;\n        public Instant createdAt;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/JodaTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.joda.time.DateTime;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.FileAssert.fail;\n\npublic class JodaTest extends SwaggerTestBase {\n\n    @Test\n    public void testSimple() throws Exception {\n        final ModelConverter mr = modelResolver();\n        final Schema model = mr.resolve(new AnnotatedType(ModelWithJodaDateTime.class), new ModelConverterContextImpl(mr), null);\n        assertNotNull(model);\n\n        final Map<String, Schema> props = model.getProperties();\n        assertEquals(props.size(), 2);\n\n        for (Map.Entry<String, Schema> entry : props.entrySet()) {\n            final String name = entry.getKey();\n            final Schema prop = entry.getValue();\n\n            if (\"name\".equals(name)) {\n                assertEquals(prop.getType(), \"string\");\n            } else if (\"createdAt\".equals(name)) {\n                assertEquals(prop.getType(), \"string\");\n                assertEquals(prop.getFormat(), \"date-time\");\n            } else {\n                fail(String.format(\"Unknown property '%s'\", name));\n            }\n        }\n    }\n\n    static class ModelWithJodaDateTime {\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Name!\")\n        public String name;\n\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"creation timestamp\", required = true)\n        public DateTime createdAt;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/JsonPropertyTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.resources.User2169;\nimport org.testng.annotations.Test;\n\npublic class JsonPropertyTest {\n\n    @Test(description = \"test ticket 2169\")\n    public void testTicket2169() {\n\n        SerializationMatchers.assertEqualsToYaml(ModelConverters.getInstance().read(User2169.class), \"User2169:\\n\" +\n                \"  required:\\n\" +\n                \"  - Age\\n\" +\n                \"  - GetterJsonPropertyOnField\\n\" +\n                \"  - GetterJsonPropertyOnFieldReadOnly\\n\" +\n                \"  - GetterJsonPropertyOnFieldReadWrite\\n\" +\n                \"  - GetterJsonPropertyOnFieldReadWriteCreatorSchemaReadOnlyFalse\\n\" +\n                \"  - GetterJsonPropertyOnFieldReadWriteSchemaReadOnlyFalse\\n\" +\n                \"  - GetterJsonPropertyOnFieldSchemaReadOnlyTrue\\n\" +\n                \"  - Name\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    Name:\\n\" +\n                \"      type: string\\n\" +\n                \"    Age:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int32\\n\" +\n                \"    GetterJsonPropertyOnFieldReadWriteCreatorSchemaReadOnlyFalse:\\n\" +\n                \"      type: string\\n\" +\n                \"    publi:\\n\" +\n                \"      type: string\\n\" +\n                \"    getter:\\n\" +\n                \"      type: string\\n\" +\n                \"    setter:\\n\" +\n                \"      type: string\\n\" +\n                \"      writeOnly: true\\n\" +\n                \"    getterSetter:\\n\" +\n                \"      type: string\\n\" +\n                \"    jsonProp:\\n\" +\n                \"      type: string\\n\" +\n                \"    jsonPropReadOnly:\\n\" +\n                \"      type: string\\n\" +\n                \"      readOnly: true\\n\" +\n                \"    jsonPropWriteOnly:\\n\" +\n                \"      type: string\\n\" +\n                \"      writeOnly: true\\n\" +\n                \"    jsonPropReadWrite:\\n\" +\n                \"      type: string\\n\" +\n                \"    getter_jsonProp:\\n\" +\n                \"      type: string\\n\" +\n                \"    getter_jsonPropReadOnly:\\n\" +\n                \"      type: string\\n\" +\n                \"      readOnly: true\\n\" +\n                \"    getter_jsonPropWriteOnly:\\n\" +\n                \"      type: string\\n\" +\n                \"    getter_jsonPropReadWrite:\\n\" +\n                \"      type: string\\n\" +\n                \"    setter_jsonProp:\\n\" +\n                \"      type: string\\n\" +\n                \"      writeOnly: true\\n\" +\n                \"    setter_jsonPropReadOnly:\\n\" +\n                \"      type: string\\n\" +\n                \"    setter_jsonPropWriteOnly:\\n\" +\n                \"      type: string\\n\" +\n                \"      writeOnly: true\\n\" +\n                \"    setter_jsonPropReadWrite:\\n\" +\n                \"      type: string\\n\" +\n                \"    gettersetter_jsonPropGet:\\n\" +\n                \"      type: string\\n\" +\n                \"    gettersetter_jsonPropReadOnlyGet:\\n\" +\n                \"      type: string\\n\" +\n                \"      readOnly: true\\n\" +\n                \"    gettersetter_jsonPropWriteOnlyGet:\\n\" +\n                \"      type: string\\n\" +\n                \"    gettersetter_jsonPropReadWriteGet:\\n\" +\n                \"      type: string\\n\" +\n                \"    gettersetter_jsonPropSet:\\n\" +\n                \"      type: string\\n\" +\n                \"    gettersetter_jsonPropReadOnlySet:\\n\" +\n                \"      type: string\\n\" +\n                \"    gettersetter_jsonPropWriteOnlySet:\\n\" +\n                \"      type: string\\n\" +\n                \"      writeOnly: true\\n\" +\n                \"    gettersetter_jsonPropReadWriteSet:\\n\" +\n                \"      type: string\\n\" +\n                \"    getterIgnore_jsonPropSet:\\n\" +\n                \"      type: string\\n\" +\n                \"      writeOnly: true\\n\" +\n                \"    getterIgnore_jsonPropReadOnlySet:\\n\" +\n                \"      type: string\\n\" +\n                \"    getterIgnore_jsonPropWriteOnlySet:\\n\" +\n                \"      type: string\\n\" +\n                \"      writeOnly: true\\n\" +\n                \"    getterIgnore_jsonPropReadWriteSet:\\n\" +\n                \"      type: string\\n\" +\n                \"    setterIgnore_jsonPropGet:\\n\" +\n                \"      type: string\\n\" +\n                \"    setterIgnore_jsonPropReadOnlyGet:\\n\" +\n                \"      type: string\\n\" +\n                \"      readOnly: true\\n\" +\n                \"    setterIgnore_jsonPropWriteOnlyGet:\\n\" +\n                \"      type: string\\n\" +\n                \"    setterIgnore_jsonPropReadWriteGet:\\n\" +\n                \"      type: string\\n\" +\n                \"    getterSchemaReadOnlyTrue:\\n\" +\n                \"      type: string\\n\" +\n                \"      readOnly: true\\n\" +\n                \"    data:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Data\\\"\\n\" +\n                \"    GetterJsonPropertyOnField:\\n\" +\n                \"      type: string\\n\" +\n                \"    GetterJsonPropertyOnFieldReadWrite:\\n\" +\n                \"      type: string\\n\" +\n                \"    GetterJsonPropertyOnFieldReadWriteSchemaReadOnlyFalse:\\n\" +\n                \"      type: string\\n\" +\n                \"    GetterJsonPropertyOnFieldReadOnly:\\n\" +\n                \"      type: string\\n\" +\n                \"      readOnly: true\\n\" +\n                \"    GetterJsonPropertyOnFieldSchemaReadOnlyTrue:\\n\" +\n                \"      type: string\\n\" +\n                \"      readOnly: true\\n\" +\n                \"    approvePairing:\\n\" +\n                \"      type: boolean\\n\" +\n                \"      writeOnly: true\\n\");\n    }\n\n    @Test(description = \"test ticket 2845\")\n    public void testTicket2845() {\n\n        SerializationMatchers.assertEqualsToYaml(ModelConverters.getInstance().readAll(Ticket2845Holder.class), \"Ticket2845Child:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    bar:\\n\" +\n                \"      type: string\\n\" +\n                \"    meow:\\n\" +\n                \"      type: string\\n\" +\n                \"Ticket2845Holder:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    child:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Ticket2845Child\\\"\");\n\n        /*\n            TODO: Test demonstrating annotation not being resolved when class is used/refernces elsewhere with different annotations\n            in this case the annotation isn't resolved or not consistently resolved as the same object is also present\n            and referenced  (in the same or different class) with no or different @JsonIgnoreProperties annotations.\n            The possible solutions are either resolve into different unrelated schemas or resolve inline\n            (see https://github.com/swagger-api/swagger-core/issues/3366 and other related tickets)\n         */\n        SerializationMatchers.assertEqualsToYaml(\n                ModelConverters.getInstance().readAll(Ticket2845HolderNoAnnotationNotWorking.class),\n                \"Ticket2845Child:\\n\" +\n                        \"  type: object\\n\" +\n                        \"  properties:\\n\" +\n                        \"    foo:\\n\" +\n                        \"      type: string\\n\" +\n                        \"    bar:\\n\" +\n                        \"      type: string\\n\" +\n                        \"    meow:\\n\" +\n                        \"      type: string\\n\" +\n                        \"Ticket2845HolderNoAnnotationNotWorking:\\n\" +\n                        \"  type: object\\n\" +\n                        \"  properties:\\n\" +\n                        \"    child:\\n\" +\n                        \"      $ref: \\\"#/components/schemas/Ticket2845Child\\\"\\n\" +\n                        \"    childNoAnnotation:\\n\" +\n                        \"      $ref: \\\"#/components/schemas/Ticket2845Child\\\"\");\n    }\n\n    static class Ticket2845Parent {\n        public String foo;\n        public String bar;\n        public String bob;\n    }\n\n    @JsonIgnoreProperties({\"bob\"})\n    static class Ticket2845Child extends Ticket2845Parent {\n        public String meow;\n    }\n\n    static class Ticket2845Holder {\n        @JsonIgnoreProperties({\"foo\"})\n        public Ticket2845Child child;\n\n    }\n\n    static class Ticket2845HolderNoAnnotationNotWorking {\n        @JsonIgnoreProperties({\"foo\"})\n        public Ticket2845Child child;\n\n        public Ticket2845Child childNoAnnotation;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/JsonSubTypesAndSchemaOneOfTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.oas.annotations.media.DiscriminatorMapping;\nimport io.swagger.v3.oas.models.media.ComposedSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.AfterTest;\nimport org.testng.annotations.BeforeMethod;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\nimport static org.testng.Assert.*;\n\npublic class JsonSubTypesAndSchemaOneOfTest extends SwaggerTestBase {\n\n    private static final String BASE_PROPERTY = \"a\";\n    private static final String BASE_PROPERTY_2 = \"b\";\n    private static final String SUB_BEAN_1_NAME = \"SubBean1\";\n    private static final String SUB_BEAN_2_NAME = \"SubBean2\";\n    private static final String SUB_BEAN_INTERFACE_1_NAME = \"SubBean1InterfaceImplementor\";\n    private static final String SUB_BEAN_INTERFACE_2_NAME = \"SubBean2InterfaceImplementor\";\n    private static final String CHILD_1_PROPERTY = \"c\";\n    private static final String CHILD_2_PROPERTY = \"d\";\n    private static final String DISCRIMINATOR_PROPERTY_NAME = \"type\";\n\n    private ModelConverterContextImpl context;\n\n    @BeforeMethod\n    public void setup() {\n        ModelResolver.composedModelPropertiesAsSibling = false;\n        ModelResolver modelResolver = new ModelResolver(new ObjectMapper());\n        context = new ModelConverterContextImpl(modelResolver);\n    }\n\n    @AfterTest\n    public void afterTest() {\n        ModelResolver.composedModelPropertiesAsSibling = false;\n    }\n\n    @Test\n    public void beanWithJsonSubTypesAndSchemaOneOfHasAllOfAndOneOfInModelSchemaObject() {\n        final Schema<?> baseModel = context.resolve(new AnnotatedType(BaseBean.class));\n        assertNotNull(baseModel);\n        assertBasePropertiesValid(baseModel.getProperties());\n\n        // The base class contains a oneOf-definition which will make the child classes have a recursive reference.\n        // Child's allOf -> Parent -> Parent's oneOf -> Child -> Child's allOf -> ...\n        assertNotNull(baseModel.getOneOf());\n        assertEquals(baseModel.getOneOf().size(), 2);\n\n        assertEquals(baseModel.getDiscriminator().getPropertyName(), DISCRIMINATOR_PROPERTY_NAME);\n        assertEquals(baseModel.getDiscriminator().getMapping().get(SUB_BEAN_1_NAME), \"#/components/schemas/SubBean1\");\n        assertEquals(baseModel.getDiscriminator().getMapping().get(SUB_BEAN_2_NAME), \"#/components/schemas/SubBean2\");\n\n        final Schema<?> subModel1 = context.getDefinedModels().get(SUB_BEAN_1_NAME);\n        assertNotNull(subModel1);\n        // make sure child points at parent\n        assertTrue(subModel1 instanceof ComposedSchema);\n        ComposedSchema cm1 = (ComposedSchema) subModel1;\n        assertEquals(cm1.getAllOf().get(0).get$ref(), \"#/components/schemas/BaseBean\");\n\n        // make sure parent properties are filtered out of subclass\n        assertSubPropertiesValid(cm1.getAllOf().get(1).getProperties(), CHILD_1_PROPERTY);\n\n        final Schema<?> subModel2 = context.getDefinedModels().get(SUB_BEAN_2_NAME);\n        assertNotNull(subModel2);\n        // make sure child points at parent\n        assertTrue(subModel2 instanceof ComposedSchema);\n        ComposedSchema cm2 = (ComposedSchema) subModel2;\n        assertEquals(cm2.getAllOf().get(0).get$ref(), \"#/components/schemas/BaseBean\");\n\n        // make sure parent properties are filtered out of subclass\n        assertSubPropertiesValid(cm1.getAllOf().get(1).getProperties(), CHILD_2_PROPERTY);\n    }\n\n    private void assertBasePropertiesValid(Map<String, Schema> baseProperties) {\n        assertEquals(baseProperties.size(), 3);\n        for (Map.Entry<String, Schema> entry : baseProperties.entrySet()) {\n            final String name = entry.getKey();\n            final Schema<?> prop = entry.getValue();\n            if (\"type\".equals(name)) {\n                assertEquals(prop.getType(), \"string\");\n            } else if (BASE_PROPERTY.equals(name)) {\n                assertEquals(prop.getType(), \"integer\");\n                assertEquals(prop.getFormat(), \"int32\");\n            } else if (BASE_PROPERTY_2.equals(name)) {\n                assertEquals(prop.getType(), \"string\");\n            }\n        }\n    }\n\n    @JsonTypeInfo(include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.NAME, property = \"type\", visible = true)\n    @JsonSubTypes({\n            @JsonSubTypes.Type(value = SubBean1.class, name = \"SubBean1\"),\n            @JsonSubTypes.Type(value = SubBean2.class, name = \"SubBean2\")\n    })\n    @io.swagger.v3.oas.annotations.media.Schema(\n            description = \"BaseBean\",\n            discriminatorProperty = \"type\",\n            discriminatorMapping = {\n                    @DiscriminatorMapping(value = \"SubBean1\", schema = SubBean1.class),\n                    @DiscriminatorMapping(value = \"SubBean2\", schema = SubBean2.class)\n            },\n            oneOf = {SubBean1.class, SubBean2.class}\n    )\n    static class BaseBean {\n        public String type;\n        public int a;\n        public String b;\n    }\n\n    static class SubBean1 extends BaseBean {\n        public int a;\n        public int c;\n    }\n\n    static class SubBean2 extends BaseBean {\n        public int a;\n        public int d;\n    }\n\n    @Test\n    public void beanWithJsonSubTypesImplementsBeanWithSchemaOneOfHasOnlyOneOfInModelSchemaObject() {\n        final Schema<?> baseModel = context.resolve(new AnnotatedType(BaseBeanInterfaceImplementor.class));\n        assertNotNull(baseModel);\n        assertNull(baseModel.getProperties());\n\n        assertEquals(baseModel.getDiscriminator().getPropertyName(), DISCRIMINATOR_PROPERTY_NAME);\n        assertEquals(baseModel.getDiscriminator().getMapping().get(SUB_BEAN_INTERFACE_1_NAME), \"#/components/schemas/SubBean1InterfaceImplementor\");\n        assertEquals(baseModel.getDiscriminator().getMapping().get(SUB_BEAN_INTERFACE_2_NAME), \"#/components/schemas/SubBean2InterfaceImplementor\");\n\n        final Schema<?> subModel1 = context.getDefinedModels().get(SUB_BEAN_INTERFACE_1_NAME);\n        assertNotNull(subModel1);\n        //We should not have a parent in the schema\n        assertNull(subModel1.getAllOf());\n\n        //The child should have the parent's properties and its own\n        assertEquals(subModel1.getProperties().size(), 4);\n        assertNotNull(subModel1.getProperties().get(CHILD_1_PROPERTY));\n\n        final Schema<?> subModel2 = context.getDefinedModels().get(SUB_BEAN_INTERFACE_2_NAME);\n        assertNotNull(subModel2);\n        //We should not have a parent in the schema\n        assertNull(subModel2.getAllOf());\n\n        //The child should have the parent's properties and its own\n        assertEquals(subModel2.getProperties().size(), 4);\n        assertNotNull(subModel2.getProperties().get(CHILD_2_PROPERTY));\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(\n            description = \"InterfaceBean\",\n            discriminatorProperty = \"type\",\n            discriminatorMapping = {\n                    @DiscriminatorMapping(value = \"SubBean1InterfaceImplementor\", schema = SubBean1InterfaceImplementor.class),\n                    @DiscriminatorMapping(value = \"SubBean2InterfaceImplementor\", schema = SubBean2InterfaceImplementor.class)\n            },\n            oneOf = {SubBean1.class, SubBean2.class}\n    )\n    interface InterfaceBean {\n        String type();\n\n        int a();\n\n        String b();\n    }\n\n    @JsonTypeInfo(include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.NAME, property = \"type\", visible = true)\n    @JsonSubTypes({\n            @JsonSubTypes.Type(value = SubBean1InterfaceImplementor.class, name = \"SubBean1InterfaceImplementor\"),\n            @JsonSubTypes.Type(value = SubBean2InterfaceImplementor.class, name = \"SubBean2InterfaceImplementor\")\n    })\n    @io.swagger.v3.oas.annotations.media.Schema(implementation = InterfaceBean.class)\n    static class BaseBeanInterfaceImplementor {\n        public String type;\n        public int a;\n        public String b;\n    }\n\n    static class SubBean1InterfaceImplementor extends BaseBeanInterfaceImplementor {\n        public int c;\n    }\n\n    static class SubBean2InterfaceImplementor extends BaseBeanInterfaceImplementor {\n        public int d;\n    }\n\n    private void assertSubPropertiesValid(Map<String, Schema> subProperties, final String childPropertyName) {\n        assertEquals(subProperties.size(), 1);\n        for (Map.Entry<String, Schema> entry : subProperties.entrySet()) {\n            final String name = entry.getKey();\n            final Schema<?> prop = entry.getValue();\n            if (childPropertyName.equals(name)) {\n                assertEquals(prop.getType(), \"integer\");\n                assertEquals(prop.getFormat(), \"int32\");\n            }\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/JsonViewTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonView;\nimport com.fasterxml.jackson.databind.MapperFeature;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.resolving.resources.JsonViewObject;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.lang.annotation.Annotation;\nimport java.util.Map;\n\nimport static io.swagger.v3.core.resolving.SwaggerTestBase.mapper;\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\n\npublic class JsonViewTest {\n\n  @Test\n  @JsonView(JsonViewObject.View.Protected.class)\n  public void includePropertiesToWhichJsonviewIsNotAnnotated() throws NoSuchMethodException {\n    ObjectMapper mapper = mapper();\n    final ModelResolver modelResolver = new ModelResolver(mapper);\n    final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n    Schema model = context\n        .resolve(new AnnotatedType(JsonViewObject.Person.class)\n            .jsonViewAnnotation(new JsonView() {\n              public Class<? extends Annotation> annotationType() {\n                return JsonView.class;\n              }\n              public Class<?>[] value() {\n                return new Class[] {JsonViewObject.View.Protected.class};\n              }\n            })\n            .ctxAnnotations(\n                this.getClass()\n                    .getMethod(\"includePropertiesToWhichJsonviewIsNotAnnotated\")\n                    .getAnnotations()));\n\n    Map<String, Schema> properties = model.getProperties();\n    assertEquals(properties.size(), 4);\n    assertNotNull(properties.get(\"id\"));\n    assertNotNull(properties.get(\"firstName\"));\n    assertNotNull(properties.get(\"lastName\"));\n    assertNotNull(properties.get(\"email\"));\n  }\n\n  @Test\n  @JsonView(JsonViewObject.View.Protected.class)\n  public void notIncludePropertiesToWhichJsonviewIsNotAnnotated() throws NoSuchMethodException {\n    ObjectMapper mapper = mapper();\n    mapper.disable(MapperFeature.DEFAULT_VIEW_INCLUSION);\n\n    final ModelResolver modelResolver = new ModelResolver(mapper);\n    final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n    Schema model = context\n        .resolve(new AnnotatedType(JsonViewObject.Person.class)\n            .jsonViewAnnotation(new JsonView() {\n              public Class<? extends Annotation> annotationType() {\n                return JsonView.class;\n              }\n              public Class<?>[] value() {\n                return new Class[] {JsonViewObject.View.Protected.class};\n              }\n            })\n            .includePropertiesWithoutJSONView(false)\n            .ctxAnnotations(\n                this.getClass()\n                    .getMethod(\"includePropertiesToWhichJsonviewIsNotAnnotated\")\n                    .getAnnotations()));\n\n    Map<String, Schema> properties = model.getProperties();\n    assertEquals(properties.size(), 3);\n    assertNotNull(properties.get(\"id\"));\n    assertNotNull(properties.get(\"firstName\"));\n    assertNotNull(properties.get(\"lastName\"));\n  }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/ModelWithRangesTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.oas.models.ModelWithRanges;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.NumberSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Test;\n\nimport java.math.BigDecimal;\nimport java.util.Arrays;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNull;\n\npublic class ModelWithRangesTest {\n\n    @Test(description = \"test model with @ApiModelProperty.allowableValues\")\n    public void modelWithRangesTest() {\n        final Map<String, Schema> properties = ModelConverters.getInstance().read(ModelWithRanges.class).get(\"ModelWithRanges\").getProperties();\n\n        final IntegerSchema inclusiveRange = (IntegerSchema) properties.get(\"inclusiveRange\");\n        assertEquals(inclusiveRange.getMinimum(), new BigDecimal(1));\n        assertEquals(inclusiveRange.getMaximum(), new BigDecimal(5));\n        assertNull(inclusiveRange.getExclusiveMaximum());\n        assertNull(inclusiveRange.getExclusiveMinimum());\n\n        final IntegerSchema exclusiveRange = (IntegerSchema) properties.get(\"exclusiveRange\");\n        assertEquals(exclusiveRange.getMinimum(), new BigDecimal(1));\n        assertEquals(exclusiveRange.getMaximum(), new BigDecimal(5));\n        assertEquals(exclusiveRange.getExclusiveMinimum(), Boolean.TRUE);\n        assertEquals(exclusiveRange.getExclusiveMaximum(), Boolean.TRUE);\n\n        final IntegerSchema positiveInfinityRange = (IntegerSchema) properties.get(\"positiveInfinityRange\");\n        assertEquals(positiveInfinityRange.getMinimum(), new BigDecimal(1.0));\n        assertNull(positiveInfinityRange.getMaximum());\n        assertNull(positiveInfinityRange.getExclusiveMaximum());\n        assertNull(positiveInfinityRange.getExclusiveMinimum());\n\n        final IntegerSchema negativeInfinityRange = (IntegerSchema) properties.get(\"negativeInfinityRange\");\n        assertNull(negativeInfinityRange.getMinimum());\n        assertEquals(negativeInfinityRange.getMaximum(), new BigDecimal(5.0));\n        assertNull(negativeInfinityRange.getExclusiveMaximum());\n        assertNull(negativeInfinityRange.getExclusiveMinimum());\n\n        final StringSchema stringValues = (StringSchema) properties.get(\"stringValues\");\n        assertEquals(stringValues.getEnum(), Arrays.asList(\"str1\", \"str2\"));\n\n        final NumberSchema doubleValues = (NumberSchema) properties.get(\"doubleValues\");\n        assertEquals(doubleValues.getMinimum(), new BigDecimal(\"1.0\"));\n        assertEquals(doubleValues.getMaximum(), new BigDecimal(\"8.0\"));\n        assertEquals(doubleValues.getExclusiveMaximum(), Boolean.TRUE);\n        assertNull(doubleValues.getExclusiveMinimum());\n\n        final IntegerSchema intAllowableValues = (IntegerSchema) properties.get(\"intAllowableValues\");\n        assertEquals(intAllowableValues.getEnum(), Arrays.asList(1, 2));\n\n        final IntegerSchema intAllowableValuesWithNull = (IntegerSchema) properties.get(\"intAllowableValuesWithNull\");\n        assertEquals(intAllowableValuesWithNull.getEnum(), Arrays.asList(1, 2, null));\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/RequiredFieldModelTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.oas.models.ApiFirstRequiredFieldModel;\nimport io.swagger.v3.core.oas.models.RequiredRefFieldModel;\nimport io.swagger.v3.core.oas.models.XmlFirstRequiredFieldModel;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class RequiredFieldModelTest {\n    @Test(description = \"it should apply required flag when ApiProperty annotation first\")\n    public void testApiModelPropertyFirstPosition() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(ApiFirstRequiredFieldModel.class);\n        final Schema model = models.get(\"aaa\");\n        final Schema prop = (Schema) model.getProperties().get(\"bla\");\n        assertNotNull(prop);\n        assertTrue(model.getRequired().contains(\"bla\"));\n    }\n\n    @Test(description = \"it should apply required flag when XmlElement annotation first\")\n    public void testApiModelPropertySecondPosition() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(XmlFirstRequiredFieldModel.class);\n        final Schema model = models.get(\"aaa\");\n        final Schema prop = (Schema) model.getProperties().get(\"a\");\n        assertNotNull(prop);\n        assertTrue(model.getRequired().contains(\"a\"));\n    }\n\n\n    @Test(description = \"it should apply required flag also to ref fields\")\n    public void testApiModelRefProperty() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(RequiredRefFieldModel.class);\n        final Schema model = models.get(\"RequiredRefFieldModel\");\n        final Schema prop = (Schema) model.getProperties().get(\"a\");\n        assertNotNull(prop);\n        final Schema prop2 = (Schema) model.getProperties().get(\"b\");\n        assertNotNull(prop2);\n        assertTrue(model.getRequired().contains(\"a\"));\n        assertTrue(model.getRequired().contains(\"b\"));\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/SimpleGenerationTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonCreator;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonPropertyOrder;\nimport com.fasterxml.jackson.annotation.JsonValue;\nimport com.fasterxml.jackson.databind.BeanDescription;\nimport com.fasterxml.jackson.databind.DeserializationFeature;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.lang.reflect.Method;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Date;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\nimport static org.testng.Assert.fail;\n\npublic class SimpleGenerationTest extends SwaggerTestBase {\n    private final ModelResolver modelResolver = new ModelResolver(new ObjectMapper());\n    private final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n    @Test\n    public void testSimple() throws Exception {\n        final Schema model = context.resolve(new AnnotatedType(SimpleBean.class));\n        assertNotNull(model);\n        assertEquals(model.getDescription(), \"DESC\");\n\n        final Map<String, Schema> props = model.getProperties();\n        assertEquals(props.size(), 6);\n\n        for (Map.Entry<String, Schema> entry : props.entrySet()) {\n            final String name = entry.getKey();\n            final Schema prop = entry.getValue();\n\n            if (\"a\".equals(name)) {\n                assertEquals(prop.getType(), \"string\");\n            } else if (\"b\".equals(name)) {\n                assertEquals(prop.getType(), \"integer\");\n                assertEquals(prop.getFormat(), \"int32\");\n            } else if (\"c\".equals(name)) {\n                assertEquals(prop.getType(), \"integer\");\n                assertEquals(prop.getFormat(), \"int64\");\n            } else if (\"d\".equals(name)) {\n                assertEquals(prop.getType(), \"number\");\n                assertEquals(prop.getFormat(), \"float\");\n            } else if (\"e\".equals(name)) {\n                assertEquals(prop.getType(), \"number\");\n                assertEquals(prop.getFormat(), \"double\");\n            } else if (\"f\".equals(name)) {\n                assertEquals(prop.getType(), \"string\");\n                assertEquals(prop.getFormat(), \"date-time\");\n            } else {\n                fail(String.format(\"Unknown property '%s'\", name));\n            }\n        }\n    }\n\n    @Test\n    public void testOrdering() throws Exception {\n        final Schema jsonOrderBean = context.resolve(new AnnotatedType(JsonOrderBean.class));\n        final Map<String, Schema> props = jsonOrderBean.getProperties();\n        assertEquals(new ArrayList<String>(props.keySet()), Arrays.asList(\"a\", \"b\", \"c\", \"d\"));\n    }\n\n    @Test\n    public void testTheCountBean() throws Exception {\n        final Schema model = context.resolve(new AnnotatedType(TheCount.class));\n        final Map<String, Schema> props = model.getProperties();\n        assertEquals(props.size(), 1);\n\n        String key = props.keySet().iterator().next();\n\n        final Schema prop = props.get(key);\n        assertEquals(key, \"theCount\");\n    }\n\n    @Test\n    public void testStringDateMap() throws Exception {\n        final Schema model = context.resolve(new AnnotatedType(StringDateMapBean.class));\n        final Map<String, Schema> props = model.getProperties();\n        assertEquals(props.size(), 1);\n\n        String key = props.keySet().iterator().next();\n\n        final Schema prop = props.get(key);\n        assertEquals(key, \"stuff\");\n    }\n\n    @Test\n    public void testIntArray() throws Exception {\n        final Schema model = context.resolve(new AnnotatedType(IntArrayBean.class));\n        final Map<String, Schema> props = model.getProperties();\n        assertEquals(props.size(), 1);\n\n        String key = props.keySet().iterator().next();\n        final Schema prop = props.get(key);\n        assertEquals(key, \"b\");\n        assertEquals(prop.getType(), \"array\");\n    }\n\n\n\n    protected boolean isJacksonAtLeast2_9() throws NoSuchMethodException {\n\n        try {\n            Method m = BeanDescription.class.getMethod(\"findJsonValueAccessor\", null);\n        } catch (NoSuchMethodException e) {\n            return false;\n        }\n        return true;\n    }\n\n\n\n    @Test\n    public void testJsonValue_Ticket3409() throws Exception {\n\n        DeserializationFeature aa = DeserializationFeature.valueOf(\"FAIL_ON_UNKNOWN_PROPERTIES\");\n\n        Map<String, Schema> models = ModelConverters.getInstance().readAll(PlanetName.Planet.class);\n        assertNotNull(models.get(\"Planet\"));\n        if (isJacksonAtLeast2_9()) {\n            assertNull(models.get(\"PlanetName\"));\n            assertEquals(((Schema) models.get(\"Planet\").getProperties().get(\"name\")).getType(), \"string\");\n        }\n    }\n\n    @Test\n    public void testComplex() throws Exception {\n\n        final Schema model = context.resolve(new AnnotatedType(ComplexBean.class));\n        assertNotNull(model);\n        final Map<String, Schema> props = model.getProperties();\n        assertEquals(props.size(), 6);\n    }\n\n  /*\n  /**********************************************************\n  /* Test methods\n  /**********************************************************\n   */\n\n    @JsonPropertyOrder({\"a\", \"b\"})\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"DESC\")\n    static class SimpleBean {\n        public int b;\n        public long c;\n        public float d;\n        public double e;\n        public java.util.Date f;\n\n        public String getA() {\n            return null;\n        }\n    }\n\n    @JsonPropertyOrder({\"a\", \"b\", \"c\", \"d\"})\n    static class JsonOrderBean {\n        public int d;\n        public int a;\n        public int c;\n        public int b;\n    }\n\n    static class TheCount {\n        @JsonProperty(\"theCount\")\n        private Integer count;\n\n        public Integer getCount() {\n            return count;\n        }\n\n        public void setCount(Integer count) {\n            this.count = count;\n        }\n    }\n\n    static class StringDateMapBean {\n        public Map<String, Date> stuff;\n    }\n\n    @JsonPropertyOrder({\"a\", \"b\"})\n    static class IntArrayBean {\n        public int[] b;\n    }\n\n    static class ComplexBean {\n        public String j;\n        @JsonIgnore\n        public SimpleBean simpleBean;\n\n        @JsonCreator\n        public ComplexBean(@JsonProperty(\"b\") int b,\n                           @JsonProperty(\"c\") long c, @JsonProperty(\"d\") float d, @JsonProperty(\"e\") double e,\n                           @JsonProperty(\"j\") String j) {\n            simpleBean = new SimpleBean();\n            simpleBean.b = b;\n            simpleBean.c = c;\n            simpleBean.d = d;\n            simpleBean.e = e;\n            this.j = j;\n        }\n\n        public SimpleBean getSimpleBean() {\n            return simpleBean;\n        }\n\n        public String getA() {\n            return simpleBean.getA();\n        }\n\n        public int getB() {\n            return simpleBean.b;\n        }\n\n        public long getC() {\n            return simpleBean.c;\n        }\n\n        public float getD() {\n            return simpleBean.d;\n        }\n\n        public double getE() {\n            return simpleBean.e;\n        }\n\n        public String getJ() {\n            return j;\n        }\n    }\n\n\n    static class PlanetName {\n\n        @JsonValue\n        private final String value;\n\n        @JsonCreator\n        private PlanetName(String value) {\n            this.value = value;\n        }\n\n        public static PlanetName valueOf(String value) {\n            return new PlanetName(value);\n        }\n\n        public String getValue() {\n            return value;\n        }\n\n        @Override\n        public String toString() {\n            return value;\n        }\n\n\n        static class Planet {\n\n            private PlanetName name;\n\n            public PlanetName getName() {\n                return name;\n            }\n\n            public void setName(PlanetName name) {\n                this.name = name;\n            }\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/SwaggerTestBase.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport com.fasterxml.jackson.core.util.DefaultPrettyPrinter;\nimport com.fasterxml.jackson.databind.DeserializationFeature;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.SerializationFeature;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic abstract class SwaggerTestBase {\n    static ObjectMapper mapper;\n    private static final Logger LOGGER = LoggerFactory.getLogger(SwaggerTestBase.class);\n\n    public static ObjectMapper mapper() {\n        if (mapper == null) {\n            mapper = new ObjectMapper();\n            mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);\n            mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);\n            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n        }\n        return mapper;\n    }\n\n    protected ModelResolver modelResolver() {\n        return new ModelResolver(new ObjectMapper());\n    }\n\n    protected void prettyPrint(Object o) {\n        try {\n            LOGGER.debug(mapper().writer(new DefaultPrettyPrinter()).writeValueAsString(o));\n        } catch (Exception e) {\n            LOGGER.error(\"Failed to pretty print object\", e);\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket2189Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport com.fasterxml.jackson.databind.ObjectMapper;\n\nimport org.testng.annotations.BeforeTest;\nimport org.testng.annotations.Test;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport static org.testng.Assert.assertNotNull;\n\npublic class Ticket2189Test extends SwaggerTestBase {\n\n    private ModelResolver modelResolver;\n    private ModelConverterContextImpl context;\n\n    @BeforeTest\n    public void setup() {\n        modelResolver = new ModelResolver(new ObjectMapper());\n        context = new ModelConverterContextImpl(modelResolver);\n    }\n\n    @Test\n    public void testTicket2189() {\n        final Schema model = context.resolve(new AnnotatedType(BaseClass.class));\n        assertNotNull(model);\n        String yaml = \"BaseClass:\\n\" +\n                      \"  type: object\\n\" +\n                      \"  properties:\\n\" +\n                      \"    property:\\n\" +\n                      \"      type: string\\n\" +\n                      \"    type:\\n\" +\n                      \"      type: string\\n\" +\n                      \"SubClass:\\n\" +\n                      \"  type: object\\n\" +\n                      \"  allOf:\\n\" +\n                      \"  - $ref: \\\"#/components/schemas/BaseClass\\\"\\n\" +\n                      \"  - type: object\\n\" +\n                      \"    properties:\\n\" +\n                      \"      subClassProperty:\\n\" +\n                      \"        type: string\";\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), yaml);\n    }\n\n    static class SubClass extends BaseClass {\n        public String subClassProperty;\n    }\n\n    @JsonTypeInfo(use = JsonTypeInfo.Id.NAME)\n    @JsonSubTypes({\n        @JsonSubTypes.Type(value = SubClass.class, name = \"SubClass\"),\n        @JsonSubTypes.Type(value = BaseClass.class, name = \"BaseClass\"),\n    })\n    static class BaseClass {\n        public String property;\n        public String type;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket2740CyclicTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.resources.MyThing;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class Ticket2740CyclicTest extends SwaggerTestBase {\n    @Test\n    public void testCyclicBean() throws Exception {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context\n                .resolve(new AnnotatedType(MyThing.class));\n\n        SerializationMatchers.assertEqualsToYaml(model, \"type: object\\n\" +\n                \"properties:\\n\" +\n                \"  otherThings:\\n\" +\n                \"    uniqueItems: true\\n\" +\n                \"    type: array\\n\" +\n                \"    description: Other related things\\n\" +\n                \"    items:\\n\" +\n                \"      $ref: \\\"#/components/schemas/MyThing\\\"\\n\" +\n                \"description: Thing\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket2862SubtypeTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.resources.Ticket2862Model;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class Ticket2862SubtypeTest extends SwaggerTestBase {\n    @Test\n    public void testSubType() throws Exception {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context\n                .resolve(new AnnotatedType(Ticket2862Model.class));\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"Ticket2862Model:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    Ticket2862Model:\\n\" +\n                \"      type: object\\n\" +\n                \"Ticket2862ModelImpl:\\n\" +\n                \"  type: string\\n\" +\n                \"  allOf:\\n\" +\n                \"  - $ref: \\\"#/components/schemas/Ticket2862Model\\\"\\n\" +\n                \"  enum:\\n\" +\n                \"  - VALUE1\\n\" +\n                \"  - VALUE2\\n\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket2884Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.converter.ResolvedSchema;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.resources.Ticket2884Model;\nimport io.swagger.v3.core.resolving.resources.Ticket2884ModelClass;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class Ticket2884Test extends SwaggerTestBase {\n\n    @Test\n    public void test2884() {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        Ticket2884ModelClass a = new Ticket2884ModelClass();\n\n        Schema model = context\n                .resolve(new AnnotatedType(Ticket2884Model.class));\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"Ticket2884Model:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    Ticket2884Model:\\n\" +\n                \"      type: object\");\n\n        context = new ModelConverterContextImpl(modelResolver);\n        model = context\n                .resolve(new AnnotatedType(Ticket2884ModelClass.class));\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"Ticket2884ModelClass:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    Ticket2884ModelClass:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: string\\n\" +\n                \"        foo:\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: string\\n\");\n    }\n\n    @Test\n    public void test2884_null() {\n        ResolvedSchema schema = ModelConverters.getInstance().readAllAsResolvedSchema(new AnnotatedType(Ticket2884ModelClass.class).resolveAsRef(true));\n        Schema o = (Schema)schema.schema.getProperties().get(Ticket2884ModelClass.class.getSimpleName());\n        assertNotNull(o);\n        assertTrue(o.get$ref().contains(Ticket2884ModelClass.class.getSimpleName()));\n        SerializationMatchers.assertEqualsToYaml(schema.schema.getProperties(), \"Ticket2884ModelClass:\\n\" +\n                \"  $ref: \\\"#/components/schemas/Ticket2884ModelClass\\\"\");\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket2915Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.resources.TestObject2915;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class Ticket2915Test extends SwaggerTestBase {\n    @Test\n    public void testPropertyName() throws Exception {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context\n                .resolve(new AnnotatedType(TestObject2915.class));\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"QuantitativeValue:\\n\" +\n                \"  required:\\n\" +\n                \"  - value\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    value:\\n\" +\n                \"      type: number\\n\" +\n                \"      format: double\\n\" +\n                \"    unitText:\\n\" +\n                \"      type: string\\n\" +\n                \"    unitCode:\\n\" +\n                \"      type: string\\n\" +\n                \"  description: A combination of a value and associated unit\\n\" +\n                \"TestObject2616:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    name:\\n\" +\n                \"      type: string\\n\" +\n                \"    perServing:\\n\" +\n                \"      $ref: \\\"#/components/schemas/QuantitativeValue\\\"\\n\" +\n                \"    per100Gram:\\n\" +\n                \"      $ref: \\\"#/components/schemas/QuantitativeValue\\\"\\n\" +\n                \"  description: Nutritional value specification\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket2926Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.testng.annotations.Test;\n\npublic class Ticket2926Test extends SwaggerTestBase {\n\n    @Test\n    public void testExtensionsInMapDeserializeAndSerialize() throws Exception {\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  title: My title\\n\" +\n                \"  description: API under test\\n\" +\n                \"  version: 1.0.7\\n\" +\n                \"  x-info: test\\n\" +\n                \"servers:\\n\" +\n                \"- url: http://localhost:9999/api\\n\" +\n                \"  x-server: test\\n\" +\n                \"  description: desc\\n\" +\n                \"  variables: \\n\" +\n                \"    serVar: \\n\" +\n                \"      description: desc\\n\" +\n                \"      x-serverVariable: test\\n\" +\n                \"paths:\\n\" +\n                \"  /foo/bar:\\n\" +\n                \"    get:\\n\" +\n                \"      callbacks:\\n\" +\n                \"        /foo/bar:\\n\" +\n                \"          get:\\n\" +\n                \"            description: getoperation\\n\" +\n                \"          x-callback: test\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: it works!\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                title: inline_response_200\\n\" +\n                \"                type: object\\n\" +\n                \"                properties:\\n\" +\n                \"                  name:\\n\" +\n                \"                    type: string\\n\" +\n                \"              x-mediatype: test\\n\" +\n                \"          x-response: test\\n\" +\n                \"        x-responses: test\\n\" +\n                \"        x-responses-object: \\n\" +\n                \"          aaa: bbb\\n\" +\n                \"        x-responses-array: \\n\" +\n                \"          - aaa\\n\" +\n                \"          - bbb\\n\" +\n                \"      x-operation: test\\n\" +\n                \"    x-pathitem: test\\n\" +\n                \"  x-paths: test\\n\" +\n                \"x-openapi-object: \\n\" +\n                \"  aaa: bbb\\n\" +\n                \"x-openapi-array: \\n\" +\n                \"  - aaa\\n\" +\n                \"  - bbb\\n\" +\n                \"x-openapi: test\";\n\n        OpenAPI aa = Yaml.mapper().readValue(yaml, OpenAPI.class);\n        SerializationMatchers.assertEqualsToYaml(aa, yaml);\n\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket2972Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.resources.TestObject2972;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class Ticket2972Test extends SwaggerTestBase {\n\n    @Test\n    public void testLocalTime() throws Exception {\n\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        Schema model = context\n                .resolve(new AnnotatedType(TestObject2972.class));\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"TestObject2972:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    myField1:\\n\" +\n                \"      type: object\\n\" +\n                \"      additionalProperties:\\n\" +\n                \"        type: string\\n\" +\n                \"    myField2:\\n\" +\n                \"      type: object\\n\" +\n                \"      additionalProperties:\\n\" +\n                \"        type: string\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket2992Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.resources.TestObject2992;\nimport io.swagger.v3.core.util.PrimitiveType;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class Ticket2992Test extends SwaggerTestBase {\n\n    @Test\n    public void testLocalTime() throws Exception {\n\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        Schema model = context\n                .resolve(new AnnotatedType(TestObject2992.class));\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"LocalTime:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    hour:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int32\\n\" +\n                \"    minute:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int32\\n\" +\n                \"    second:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int32\\n\" +\n                \"    nano:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int32\\n\" +\n                \"TestObject2992:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    name:\\n\" +\n                \"      type: string\\n\" +\n                \"    a:\\n\" +\n                \"      $ref: \\\"#/components/schemas/LocalTime\\\"\\n\" +\n                \"    b:\\n\" +\n                \"      $ref: \\\"#/components/schemas/LocalTime\\\"\\n\" +\n                \"    c:\\n\" +\n                \"      $ref: \\\"#/components/schemas/LocalTime\\\"\\n\" +\n                \"    d:\\n\" +\n                \"      type: string\\n\" +\n                \"      format: date-time\\n\" +\n                \"    e:\\n\" +\n                \"      type: string\\n\" +\n                \"      format: date-time\\n\" +\n                \"    f:\\n\" +\n                \"      type: string\\n\" +\n                \"      format: date-time\");\n\n        PrimitiveType.enablePartialTime();\n        context = new ModelConverterContextImpl(modelResolver);\n\n        context\n                .resolve(new AnnotatedType(TestObject2992.class));\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"TestObject2992:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    name:\\n\" +\n                \"      type: string\\n\" +\n                \"    a:\\n\" +\n                \"      type: string\\n\" +\n                \"      format: partial-time\\n\" +\n                \"    b:\\n\" +\n                \"      type: string\\n\" +\n                \"      format: partial-time\\n\" +\n                \"    c:\\n\" +\n                \"      type: string\\n\" +\n                \"      format: partial-time\\n\" +\n                \"    d:\\n\" +\n                \"      type: string\\n\" +\n                \"      format: date-time\\n\" +\n                \"    e:\\n\" +\n                \"      type: string\\n\" +\n                \"      format: date-time\\n\" +\n                \"    f:\\n\" +\n                \"      type: string\\n\" +\n                \"      format: date-time\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket3030Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.BeforeTest;\nimport org.testng.annotations.Test;\n\nimport static org.testng.Assert.assertNotNull;\n\npublic class Ticket3030Test extends SwaggerTestBase {\n\n    private ModelResolver modelResolver;\n    private ModelConverterContextImpl context;\n\n    @BeforeTest\n    public void setup() {\n        modelResolver = new ModelResolver(new ObjectMapper());\n        context = new ModelConverterContextImpl(modelResolver);\n    }\n\n\n\n    @Test\n    public void testTicket3030() throws Exception {\n        final Schema model = context.resolve(new AnnotatedType(Child.class));\n        assertNotNull(model);\n        String yaml = \"Child:\\n\" +\n                \"  type: object\\n\" +\n                \"  allOf:\\n\" +\n                \"  - $ref: \\\"#/components/schemas/Parent\\\"\\n\" +\n                \"  - type: object\\n\" +\n                \"    properties:\\n\" +\n                \"      property:\\n\" +\n                \"        type: string\\n\" +\n                \"Parent:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    sharedProperty:\\n\" +\n                \"      type: string\";\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), yaml);\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(subTypes = {Child.class})\n    static class Parent {\n        public String sharedProperty;\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(allOf = Parent.class)\n    static class Child extends Parent {\n        public String property;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket3063Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.BeforeTest;\nimport org.testng.annotations.Test;\n\nimport static org.testng.Assert.assertNotNull;\n\npublic class Ticket3063Test extends SwaggerTestBase {\n\n    private ModelResolver modelResolver;\n    private ModelConverterContextImpl context;\n\n    @BeforeTest\n    public void setup() {\n        modelResolver = new ModelResolver(new ObjectMapper());\n        context = new ModelConverterContextImpl(modelResolver);\n    }\n\n\n\n    @Test\n    public void testTicket3063() throws Exception {\n        final Schema model = context.resolve(new AnnotatedType(BaseClass.class));\n        assertNotNull(model);\n        String yaml = \"BaseClass:\\n\" +\n                \"  required:\\n\" +\n                \"  - type\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    type:\\n\" +\n                \"      type: string\\n\" +\n                \"      description: Type\\n\" +\n                \"      example: AndroidDeviceRequirements\\n\" +\n                \"  description: test\\n\" +\n                \"  discriminator:\\n\" +\n                \"    propertyName: type\\n\" +\n                \"SubClass:\\n\" +\n                \"  required:\\n\" +\n                \"  - type\\n\" +\n                \"  type: object\\n\" +\n                \"  description: SubClass\\n\" +\n                \"  allOf:\\n\" +\n                \"  - $ref: \\\"#/components/schemas/BaseClass\\\"\\n\" +\n                \"  - type: object\\n\" +\n                \"    properties:\\n\" +\n                \"      additionalPropertyWhichShouldBeThere:\\n\" +\n                \"        type: integer\\n\" +\n                \"        description: Test\\n\" +\n                \"        format: int32\";\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), yaml);\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"SubClass\")\n    public class SubClass extends BaseClass {\n        @io.swagger.v3.oas.annotations.media.Schema(required = false, description = \"Test\")\n        public int additionalPropertyWhichShouldBeThere = -1;\n\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"test\", discriminatorProperty=\"type\")\n    @JsonTypeInfo(\n            use = JsonTypeInfo.Id.NAME,\n            include = JsonTypeInfo.As.PROPERTY,\n            property = \"type\")\n    @JsonSubTypes({\n            @JsonSubTypes.Type(value = SubClass.class, name = \"SubClass\")\n    })\n    public class BaseClass {\n\n        @io.swagger.v3.oas.annotations.media.Schema(required = true, description = \"Type\", example=\"AndroidDeviceRequirements\")\n        public String type;\n\n        public BaseClass(String type) {\n            this.type = type;\n        }\n\n        public BaseClass() {\n        }\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket3197Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.annotations.media.DiscriminatorMapping;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.AfterTest;\nimport org.testng.annotations.BeforeMethod;\nimport org.testng.annotations.Test;\n\nimport static org.testng.Assert.assertNotNull;\n\npublic class Ticket3197Test extends SwaggerTestBase {\n\n    private ModelResolver modelResolver;\n    private ModelConverterContextImpl context;\n\n\n    @BeforeMethod\n    public void beforeMethod() {\n        ModelResolver.composedModelPropertiesAsSibling = false;\n        modelResolver = new ModelResolver(new ObjectMapper());\n        context = new ModelConverterContextImpl(modelResolver);\n    }\n\n    @AfterTest\n    public void afterTest() {\n        ModelResolver.composedModelPropertiesAsSibling = false;\n    }\n\n    @Test\n    public void testTicket3197() throws Exception {\n        final Schema model = context.resolve(new AnnotatedType(Car.class));\n        assertNotNull(model);\n        String yaml = \"Car:\\n\" +\n                \"  required:\\n\" +\n                \"  - type\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    carMetaData:\\n\" +\n                \"      type: string\\n\" +\n                \"    type:\\n\" +\n                \"      type: string\\n\" +\n                \"  discriminator:\\n\" +\n                \"    propertyName: type\\n\" +\n                \"    mapping:\\n\" +\n                \"      RaceCar: \\\"#/components/schemas/RaceCar\\\"\\n\" +\n                \"      SportCar: \\\"#/components/schemas/SportCar\\\"\\n\" +\n                \"  oneOf:\\n\" +\n                \"  - $ref: \\\"#/components/schemas/RaceCar\\\"\\n\" +\n                \"  - $ref: \\\"#/components/schemas/SportCar\\\"\\n\" +\n                \"RaceCar:\\n\" +\n                \"  required:\\n\" +\n                \"  - carMetaData\\n\" +\n                \"  - id\\n\" +\n                \"  type: object\\n\" +\n                \"  allOf:\\n\" +\n                \"  - $ref: \\\"#/components/schemas/Car\\\"\\n\" +\n                \"  - type: object\\n\" +\n                \"    properties:\\n\" +\n                \"      id:\\n\" +\n                \"        type: integer\\n\" +\n                \"        format: int64\\n\" +\n                \"      model:\\n\" +\n                \"        type: string\\n\" +\n                \"SportCar:\\n\" +\n                \"  required:\\n\" +\n                \"  - id\\n\" +\n                \"  type: object\\n\" +\n                \"  allOf:\\n\" +\n                \"  - $ref: \\\"#/components/schemas/Car\\\"\\n\" +\n                \"  - type: object\\n\" +\n                \"    properties:\\n\" +\n                \"      id:\\n\" +\n                \"        type: integer\\n\" +\n                \"        format: int64\\n\" +\n                \"      model:\\n\" +\n                \"        type: string\\n\";\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), yaml);\n    }\n\n    @Test\n    public void testTicket3197AsSibling() throws Exception {\n\n        ModelResolver.composedModelPropertiesAsSibling = true;\n        ModelResolver myModelResolver = new ModelResolver(new ObjectMapper());\n        ModelResolver.composedModelPropertiesAsSibling = true;\n        ModelConverterContextImpl myContext = new ModelConverterContextImpl(myModelResolver);\n\n        final Schema model = myContext.resolve(new AnnotatedType(Car.class));\n        assertNotNull(model);\n        String yaml = \"Car:\\n\" +\n                \"  required:\\n\" +\n                \"  - type\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    carMetaData:\\n\" +\n                \"      type: string\\n\" +\n                \"    type:\\n\" +\n                \"      type: string\\n\" +\n                \"  discriminator:\\n\" +\n                \"    propertyName: type\\n\" +\n                \"    mapping:\\n\" +\n                \"      RaceCar: \\\"#/components/schemas/RaceCar\\\"\\n\" +\n                \"      SportCar: \\\"#/components/schemas/SportCar\\\"\\n\" +\n                \"  oneOf:\\n\" +\n                \"  - $ref: \\\"#/components/schemas/RaceCar\\\"\\n\" +\n                \"  - $ref: \\\"#/components/schemas/SportCar\\\"\\n\" +\n                \"RaceCar:\\n\" +\n                \"  required:\\n\" +\n                \"  - carMetaData\\n\" +\n                \"  - id\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int64\\n\" +\n                \"    model:\\n\" +\n                \"      type: string\\n\" +\n                \"  allOf:\\n\" +\n                \"  - $ref: \\\"#/components/schemas/Car\\\"\\n\" +\n                \"SportCar:\\n\" +\n                \"  required:\\n\" +\n                \"  - id\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int64\\n\" +\n                \"    model:\\n\" +\n                \"      type: string\\n\" +\n                \"  allOf:\\n\" +\n                \"  - $ref: \\\"#/components/schemas/Car\\\"\\n\";\n\n        SerializationMatchers.assertEqualsToYaml(myContext.getDefinedModels(), yaml);\n        ModelResolver.composedModelPropertiesAsSibling = false;\n    }\n\n\n    @io.swagger.v3.oas.annotations.media.Schema(discriminatorProperty = \"type\", discriminatorMapping = {\n            @DiscriminatorMapping(value = \"RaceCar\", schema = RaceCar.class),\n            @DiscriminatorMapping(value = \"SportCar\", schema = SportCar.class)\n    },\n            oneOf = {\n                    RaceCar.class,\n                    SportCar.class\n            })\n    @JsonTypeInfo(use = JsonTypeInfo.Id.NAME,\n            property = \"type\")\n    @JsonSubTypes({\n            @JsonSubTypes.Type(value = RaceCar.class),\n            @JsonSubTypes.Type(value = SportCar.class)\n    })\n    static abstract class Car {\n\n        private String carMetaData;\n\n        public String getCarMetaData() { return carMetaData; }\n    }\n\n    static class RaceCar extends Car {\n\n        @JsonProperty(required = true)\n        public Long id;\n\n        public String model;\n\n        @io.swagger.v3.oas.annotations.media.Schema(required = true)\n        public String carMetaData;\n    }\n\n    static class SportCar extends Car {\n\n        @JsonProperty(required = true)\n        public Long id;\n\n        public String model;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket3348Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\n\nimport org.testng.annotations.BeforeMethod;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\n\npublic class Ticket3348Test extends SwaggerTestBase {\n\n    private ModelResolver modelResolver;\n    private ModelConverterContextImpl context;\n\n    @BeforeMethod\n    public void beforeMethod() {\n        modelResolver = new ModelResolver(new ObjectMapper());\n        context = new ModelConverterContextImpl(modelResolver);\n    }\n\n    @Test\n    public void testTicket3348() {\n        final Schema model = context.resolve(new AnnotatedType(WithObjects.class));\n        assertNotNull(model);\n        final Map<String, Schema> props = model.getProperties();\n        assertEquals(props.size(), 2);\n    }\n\n    static class WithObjects  {\n        public Object param1;\n        public Object param2;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket3365Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.BeforeMethod;\nimport org.testng.annotations.Test;\n\nimport static org.testng.Assert.assertNotNull;\n\npublic class Ticket3365Test extends SwaggerTestBase {\n\n    private ModelResolver modelResolver;\n    private ModelConverterContextImpl context;\n\n    @BeforeMethod\n    public void beforeMethod() {\n        modelResolver = new ModelResolver(new ObjectMapper());\n        context = new ModelConverterContextImpl(modelResolver);\n    }\n\n    @Test\n    public void testTicket3365() {\n        Schema model = context.resolve(new AnnotatedType(ExampleWithJson.class));\n        assertNotNull(model);\n        SerializationMatchers.assertEqualsToYaml(model, \"required:\\n\" +\n                \"- param1\\n\" +\n                \"type: object\\n\" +\n                \"properties:\\n\" +\n                \"  param1:\\n\" +\n                \"    title: Cron formatted invoice schedule\\n\" +\n                \"    type: object\\n\" +\n                \"    example:\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        type: string\\n\" +\n                \"        format: byte\");\n\n        model = context.resolve(new AnnotatedType(ExampleStartingWithInteger.class));\n        assertNotNull(model);\n        SerializationMatchers.assertEqualsToYaml(model, \"required:\\n\" +\n                \"- param1\\n\" +\n                \"type: object\\n\" +\n                \"properties:\\n\" +\n                \"  param1:\\n\" +\n                \"    title: Cron formatted invoice schedule\\n\" +\n                \"    type: string\\n\" +\n                \"    example: 0 0 5 * *\\n\");\n    }\n\n    static class ExampleStartingWithInteger  {\n        @io.swagger.v3.oas.annotations.media.Schema(\n                required = true,\n                title = \"Cron formatted invoice schedule\",\n                example = \"0 0 5 * *\"\n        )\n        public String param1;\n    }\n    static class ExampleWithJson  {\n        @io.swagger.v3.oas.annotations.media.Schema(\n                required = true,\n                title = \"Cron formatted invoice schedule\",\n                example = \"{\\\"type\\\": \\\"array\\\", \\\"items\\\": {\\\"type\\\" : \\\"string\\\", \\\"format\\\": \\\"byte\\\"}}\"\n        )\n        public Object param1;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket3624Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.util.Optional;\n\npublic class Ticket3624Test extends SwaggerTestBase {\n\n    @Test\n    public void testSelfReferencingOptional() throws Exception {\n\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        Schema model = context\n                .resolve(new AnnotatedType(ModelContainer.class));\n\n        Yaml.prettyPrint(context.getDefinedModels());\n\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"Model:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    model:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Model\\\"\\n\" +\n                \"ModelContainer:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    model:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Model\\\"\\n\");\n\n    }\n\n    static class ModelContainer {\n        public Optional<Model> model;\n    }\n\n    static class Model {\n        public Optional<Model> model;\n    }\n\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket3697Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.resources.TestObject3697;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class Ticket3697Test extends SwaggerTestBase {\n\n    @Test\n    public void testHiddenJsonCreator() throws Exception {\n\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        Schema model = context\n                .resolve(new AnnotatedType(TestObject3697.class));\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"TestObject3697:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int64\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket3699Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.resources.TestObject3699;\nimport org.testng.annotations.Test;\n\npublic class Ticket3699Test extends SwaggerTestBase {\n\n    @Test\n    public void test3699() {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n        context.resolve(new AnnotatedType(TestObject3699.class));\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"TestObject3699:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    CustomName:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: string\\n\" +\n                \"        foo:\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: string\\n\");\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket3703Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.util.Optional;\n\npublic class Ticket3703Test extends SwaggerTestBase {\n\n    @Test\n    public void testSelfReferencingOptional() throws Exception {\n\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        Schema model = context\n                .resolve(new AnnotatedType(ModelContainer.class));\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"Model:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    model:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Model\\\"\\n\" +\n                \"ModelContainer:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    model:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Model\\\"\\n\" +\n                \"    bytes:\\n\" +\n                \"      type: string\\n\" +\n                \"      format: byte\");\n\n    }\n\n    static class ModelContainer {\n        public Optional<Model> model;\n\n        @io.swagger.v3.oas.annotations.media.Schema(type = \"string\", format = \"byte\")\n        public Optional<Bytes> getBytes() {\n            return null;\n        }\n\n    }\n\n    static class Model {\n        public Optional<Model> model;\n    }\n\n    static class Bytes {\n        public String foo;\n        public String bar;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket3853Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport static org.testng.Assert.assertNotNull;\n\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.jackson.TypeNameResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.BeforeTest;\nimport org.testng.annotations.Test;\n\npublic class Ticket3853Test extends SwaggerTestBase {\n\n    private ModelResolver modelResolver;\n    private ModelConverterContextImpl context;\n\n    @BeforeTest\n    public void setup() {\n        modelResolver = new ModelResolver(new ObjectMapper(), new FqnTypeNameResolver());\n        context = new ModelConverterContextImpl(modelResolver);\n    }\n\n    @Test\n    public void testTicket3853() {\n        final Schema model = context.resolve(new AnnotatedType(BaseClass.class));\n\n        assertNotNull(model);\n        String yaml = \"io.swagger.v3.core.resolving.Ticket3853Test$BaseClass:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    property:\\n\" +\n                \"      type: string\\n\" +\n                \"    type:\\n\" +\n                \"      type: string\\n\" +\n                \"io.swagger.v3.core.resolving.Ticket3853Test$SubClass:\\n\" +\n                \"  type: object\\n\" +\n                \"  allOf:\\n\" +\n                \"  - $ref: \\\"#/components/schemas/io.swagger.v3.core.resolving.Ticket3853Test$BaseClass\\\"\\n\" +\n                \"  - type: object\\n\" +\n                \"    properties:\\n\" +\n                \"      subClassProperty:\\n\" +\n                \"        type: string\";\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), yaml);\n    }\n\n    static class SubClass extends BaseClass {\n        public String subClassProperty;\n    }\n\n    @JsonTypeInfo(use = JsonTypeInfo.Id.NAME)\n    @JsonSubTypes({\n            @JsonSubTypes.Type(value = SubClass.class, name = \"SubClass\"),\n            @JsonSubTypes.Type(value = BaseClass.class, name = \"BaseClass\"),\n    })\n    static class BaseClass {\n        public String property;\n        public String type;\n    }\n\n    static class FqnTypeNameResolver extends TypeNameResolver {\n\n        @Override\n        protected String getNameOfClass(Class<?> cls) {\n            return cls.getName();\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket3904Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonValue;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class Ticket3904Test extends SwaggerTestBase {\n\n    @Test\n    public void testJsonValueSchemaAnnotation() throws Exception {\n\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        Schema model = context\n                .resolve(new AnnotatedType(Request.class));\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"Request:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: string\\n\" +\n                \"      description: Description of ID.\");\n\n    }\n\n    static class Request {\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Description of ID.\")\n        private Id id;\n\n        public Id getId() {\n            return id;\n        }\n\n        public void setId(Id id) {\n            this.id = id;\n        }\n    }\n    static class Id {\n        private String value;\n\n        @JsonValue\n        public String getValue() {\n            return value;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket4239Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport com.fasterxml.jackson.annotation.JsonView;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport org.testng.annotations.Test;\n\nimport java.lang.annotation.Annotation;\n\nimport static com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME;\n\npublic class Ticket4239Test extends SwaggerTestBase {\n\n    public interface Input {}\n\n    public interface Output {}\n\n    @JsonTypeInfo(use = NAME)\n    @JsonSubTypes({\n        @JsonSubTypes.Type(value = A1.class),\n    })\n    public static abstract class A {\n        @JsonView(Input.class)\n        public String a_in;\n        @JsonView(Output.class)\n        public String a_out;\n    }\n\n    public static class A1 extends A {\n        @JsonView(Input.class)\n        public String a1_in;\n        @JsonView(Output.class)\n        public String a1_out;\n    }\n\n    private static final JsonView VIEW_OUTPUT = new JsonView() {\n        public Class<? extends Annotation> annotationType() {\n            return JsonView.class;\n        }\n        public Class<?>[] value() {\n            return new Class[] {Output.class};\n        }\n    };\n\n    @Test\n    public void testJsonValueSchemaAnnotation() {\n\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        AnnotatedType type = new AnnotatedType(Ticket4239Test.A.class).jsonViewAnnotation(VIEW_OUTPUT);\n\n        context.resolve(type);\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"A1_Output:\\n\" +\n            \"  type: object\\n\" +\n            \"  allOf:\\n\" +\n            \"  - $ref: \\\"#/components/schemas/A_Output\\\"\\n\" +\n            \"  - type: object\\n\" +\n            \"    properties:\\n\" +\n            \"      a1_out:\\n\" +\n            \"        type: string\\n\" +\n            \"A_Output:\\n\" +\n            \"  type: object\\n\" +\n            \"  properties:\\n\" +\n            \"    a_out:\\n\" +\n            \"      type: string\\n\");\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket4290Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.resources.Issue4290;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class Ticket4290Test extends SwaggerTestBase {\n    @Test\n    public void testAnyOf() throws Exception {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context\n                .resolve(new AnnotatedType(Issue4290.class));\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"Issue4290:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    value:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: \\\"A string, a number or a boolean\\\"\\n\" +\n                \"      anyOf:\\n\" +\n                \"      - type: string\\n\" +\n                \"      - type: number\\n\" +\n                \"      - type: boolean\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket4362Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.AfterMethod;\nimport org.testng.annotations.Test;\n\nimport java.time.DayOfWeek;\n\npublic class Ticket4362Test extends SwaggerTestBase {\n\n    @AfterMethod\n    public void afterTest() {\n        ModelResolver.enumsAsRef = false;\n    }\n\n    @Test\n    public void testAnyOf() throws Exception {\n        ModelResolver.enumsAsRef = true;\n\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context\n                .resolve(new AnnotatedType(DayOfWeek.class));\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"DayOfWeek:\\n\" +\n                \"  type: string\\n\" +\n                \"  enum:\\n\" +\n                \"  - MONDAY\\n\" +\n                \"  - TUESDAY\\n\" +\n                \"  - WEDNESDAY\\n\" +\n                \"  - THURSDAY\\n\" +\n                \"  - FRIDAY\\n\" +\n                \"  - SATURDAY\\n\" +\n                \"  - SUNDAY\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket4474Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.AfterMethod;\nimport org.testng.annotations.Test;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\npublic class Ticket4474Test extends SwaggerTestBase {\n\n    @AfterMethod\n    public void afterTest() {\n        ModelResolver.enumsAsRef = false;\n    }\n\n    @Test\n    public void testAnyOf() throws Exception {\n        ModelResolver.enumsAsRef = true;\n\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        final Schema model = context\n                .resolve(new AnnotatedType(Document.class));\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"Document:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    data:\\n\" +\n                \"      type: object\\n\" +\n                \"      additionalProperties:\\n\" +\n                \"        type: object\\n\" +\n                \"        anyOf:\\n\" +\n                \"        - type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: boolean\\n\" +\n                \"        - type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: integer\\n\" +\n                \"            format: int32\\n\" +\n                \"        - type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: integer\\n\" +\n                \"            format: int64\\n\" +\n                \"        - type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: number\\n\" +\n                \"            format: double\\n\" +\n                \"        - type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: string\\n\" +\n                \"        - type: boolean\\n\" +\n                \"        - type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        - type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"    listData:\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        type: object\\n\" +\n                \"        anyOf:\\n\" +\n                \"        - type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: boolean\\n\" +\n                \"        - type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: integer\\n\" +\n                \"            format: int32\\n\" +\n                \"        - type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: integer\\n\" +\n                \"            format: int64\\n\" +\n                \"        - type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: number\\n\" +\n                \"            format: double\\n\" +\n                \"        - type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: string\\n\" +\n                \"        - type: boolean\\n\" +\n                \"        - type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        - type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"    itemData:\\n\" +\n                \"      type: object\\n\" +\n                \"      anyOf:\\n\" +\n                \"      - type: array\\n\" +\n                \"        items:\\n\" +\n                \"          type: boolean\\n\" +\n                \"      - type: array\\n\" +\n                \"        items:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"      - type: array\\n\" +\n                \"        items:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"      - type: array\\n\" +\n                \"        items:\\n\" +\n                \"          type: number\\n\" +\n                \"          format: double\\n\" +\n                \"      - type: array\\n\" +\n                \"        items:\\n\" +\n                \"          type: string\\n\" +\n                \"      - type: boolean\\n\" +\n                \"      - type: integer\\n\" +\n                \"        format: int32\\n\" +\n                \"      - type: integer\\n\" +\n                \"        format: int64\");\n    }\n\n    static class Document {\n        @io.swagger.v3.oas.annotations.media.Schema(\n                anyOf = {\n                        Boolean[].class,\n                        Integer[].class,\n                        Long[].class,\n                        Double[].class,\n                        String[].class,\n                        Boolean.class,\n                        Integer.class,\n                        Long.class,\n                        Map.class,\n                })\n        public Map<String, Object> data = new HashMap<>();\n\n        @io.swagger.v3.oas.annotations.media.Schema(\n                anyOf = {\n                        Boolean[].class,\n                        Integer[].class,\n                        Long[].class,\n                        Double[].class,\n                        String[].class,\n                        Boolean.class,\n                        Integer.class,\n                        Long.class,\n                        Map.class,\n                })\n        public List<Object> listData = new ArrayList<>();\n\n        @io.swagger.v3.oas.annotations.media.Schema(\n                anyOf = {\n                        Boolean[].class,\n                        Integer[].class,\n                        Long[].class,\n                        Double[].class,\n                        String[].class,\n                        Boolean.class,\n                        Integer.class,\n                        Long.class,\n                        Map.class,\n                })\n        public Object itemData = new Object();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket4679Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.core.util.Yaml31;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\npublic class Ticket4679Test extends SwaggerTestBase{\n\n    @Test(description = \"Custom schema implementation in property overrides type value\")\n    public void testCustomSchemaImplementation() {\n\n        String expectedYaml = \"ModelWithCustomSchemaImplementationInProperty:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    exampleField:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int32\\n\" +\n                \"    secondExampleField:\\n\" +\n                \"      type: string\\n\";\n\n        Map<String, io.swagger.v3.oas.models.media.Schema> stringSchemaMap = ModelConverters.getInstance(true).readAll(ModelWithCustomSchemaImplementationInProperty.class);\n        SerializationMatchers.assertEqualsToYaml31(stringSchemaMap, expectedYaml);\n    }\n\n    static class ModelWithCustomSchemaImplementationInProperty {\n\n        @Schema(implementation = Integer.class)\n        private String exampleField;\n\n        @Schema(type = \"string\")\n        private Integer secondExampleField;\n\n        public String getExampleField() {\n            return exampleField;\n        }\n\n        public void setExampleField(String exampleField) {\n            this.exampleField = exampleField;\n        }\n\n        public Integer getSecondExampleField() {\n            return secondExampleField;\n        }\n\n        public void setSecondExampleField(Integer secondExampleField) {\n            this.secondExampleField = secondExampleField;\n        }\n\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket4760Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport javax.validation.constraints.Size;\nimport java.util.List;\nimport java.util.Map;\n\npublic class Ticket4760Test {\n\n    @Test\n    public void testArraySchemaItemsValidation(){\n        final Map<String, Schema> stringSchemaMap = ModelConverters.getInstance().readAll(ClassWithArraySchemaItemsValidation.class);\n        final String expectedJson = \"{\\n\" +\n                \"  \\\"ClassWithArraySchemaItemsValidation\\\" : {\\n\" +\n                \"    \\\"type\\\" : \\\"object\\\",\\n\" +\n                \"    \\\"properties\\\" : {\\n\" +\n                \"      \\\"setOfEnums\\\" : {\\n\" +\n                \"        \\\"maxItems\\\" : 3,\\n\" +\n                \"        \\\"minItems\\\" : 1,\\n\" +\n                \"        \\\"type\\\" : \\\"array\\\",\\n\" +\n                \"        \\\"items\\\" : {\\n\" +\n                \"          \\\"type\\\" : \\\"string\\\",\\n\" +\n                \"          \\\"enum\\\" : [ \\\"green\\\", \\\"blue\\\" ]\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(stringSchemaMap, expectedJson);\n    }\n\n    private static class ClassWithArraySchemaItemsValidation{\n\n        public enum MyEnum {\n            red,\n            green\n        }\n\n        public enum MyOtherEnum {\n            green,\n            blue\n        }\n\n        @io.swagger.v3.oas.annotations.media.ArraySchema(schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = MyOtherEnum.class))\n        @Size(min = 1, max = 3)\n        private List<MyEnum> setOfEnums;\n\n        public List<MyEnum> getSetOfEnums() {\n            return setOfEnums;\n        }\n\n        public void setSetOfEnums(List<MyEnum> setOfEnums) {\n            this.setOfEnums = setOfEnums;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket4771Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.converter.ResolvedSchema;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class Ticket4771Test {\n\n    @Test\n    public void testArraySchemaItemsValidation(){\n        ModelConverters.reset();\n        System.clearProperty(Schema.APPLY_SCHEMA_RESOLUTION_PROPERTY);\n        ResolvedSchema schema = ModelConverters.getInstance(false, Schema.SchemaResolution.INLINE).resolveAsResolvedSchema(new AnnotatedType().type(CustomClass[].class));\n        String expectedJson = \"{\\n\" +\n                \"  \\\"schema\\\" : {\\n\" +\n                \"    \\\"type\\\" : \\\"array\\\",\\n\" +\n                \"    \\\"items\\\" : {\\n\" +\n                \"      \\\"type\\\" : \\\"object\\\",\\n\" +\n                \"      \\\"properties\\\" : {\\n\" +\n                \"        \\\"foo\\\" : {\\n\" +\n                \"          \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  },\\n\" +\n                \"  \\\"referencedSchemas\\\" : {\\n\" +\n                \"    \\\"CustomClass\\\" : {\\n\" +\n                \"      \\\"type\\\" : \\\"object\\\",\\n\" +\n                \"      \\\"properties\\\" : {\\n\" +\n                \"        \\\"foo\\\" : {\\n\" +\n                \"          \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(schema, expectedJson);\n        ModelConverters.reset();\n        schema = ModelConverters.getInstance(true, Schema.SchemaResolution.INLINE).resolveAsResolvedSchema(new AnnotatedType().type(CustomClass[].class));\n        expectedJson = \"{\\n\" +\n                \"  \\\"schema\\\" : {\\n\" +\n                \"    \\\"type\\\" : \\\"array\\\",\\n\" +\n                \"    \\\"items\\\" : {\\n\" +\n                \"      \\\"$ref\\\" : \\\"#/components/schemas/CustomClass\\\"\\n\" +\n                \"    }\\n\" +\n                \"  },\\n\" +\n                \"  \\\"referencedSchemas\\\" : {\\n\" +\n                \"    \\\"CustomClass\\\" : {\\n\" +\n                \"      \\\"type\\\" : \\\"object\\\",\\n\" +\n                \"      \\\"properties\\\" : {\\n\" +\n                \"        \\\"foo\\\" : {\\n\" +\n                \"          \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson31(schema, expectedJson);\n        ModelConverters.reset();\n        System.setProperty(Schema.APPLY_SCHEMA_RESOLUTION_PROPERTY, \"true\");\n        schema = ModelConverters.getInstance(true, Schema.SchemaResolution.INLINE).resolveAsResolvedSchema(new AnnotatedType().type(CustomClass[].class));\n        expectedJson = \"{\\n\" +\n                \"  \\\"schema\\\" : {\\n\" +\n                \"    \\\"type\\\" : \\\"array\\\",\\n\" +\n                \"    \\\"items\\\" : {\\n\" +\n                \"      \\\"type\\\" : \\\"object\\\",\\n\" +\n                \"      \\\"properties\\\" : {\\n\" +\n                \"        \\\"foo\\\" : {\\n\" +\n                \"          \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  },\\n\" +\n                \"  \\\"referencedSchemas\\\" : {\\n\" +\n                \"    \\\"CustomClass\\\" : {\\n\" +\n                \"      \\\"type\\\" : \\\"object\\\",\\n\" +\n                \"      \\\"properties\\\" : {\\n\" +\n                \"        \\\"foo\\\" : {\\n\" +\n                \"          \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson31(schema, expectedJson);\n        System.clearProperty(Schema.APPLY_SCHEMA_RESOLUTION_PROPERTY);\n        ModelConverters.reset();\n\n\n    }\n\n    private static class CustomClass {\n        public String foo;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket4800Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.util.Map;\n\npublic class Ticket4800Test extends SwaggerTestBase{\n\n    @Test(description = \"Custom schema implementation in property and enum as ref type value\")\n    public void testCustomSchemaImplementation() {\n\n        String expectedYaml = \"ModelWithCustomSchemaImplementationInProperty:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    enumExampleFieldWithImplementationProp:\\n\" +\n                \"      $ref: \\\"#/components/schemas/MyEnum\\\"\\n\" +\n                \"      default: \\\"yes\\\"\\n\" +\n                \"      description: Prop description\\n\" +\n                \"    secondExampleFieldWithTypeProp:\\n\" +\n                \"      type: string\\n\" +\n                \"MyEnum:\\n\" +\n                \"  type: string\\n\" +\n                \"  enum:\\n\" +\n                \"  - \\\"yes\\\"\\n\" +\n                \"  - \\\"no\\\"\";\n\n        Map<String, Schema> stringSchemaMap = ModelConverters.getInstance(true).readAll(Ticket4800Test.ModelWithCustomSchemaImplementationInProperty.class);\n        SerializationMatchers.assertEqualsToYaml31(stringSchemaMap, expectedYaml);\n    }\n\n    static class ModelWithCustomSchemaImplementationInProperty {\n\n        @io.swagger.v3.oas.annotations.media.Schema(implementation = MyEnum.class, description = \"Prop description\", defaultValue = \"yes\", enumAsRef = true)\n        private MyEnum enumExampleFieldWithImplementationProp;\n\n        @io.swagger.v3.oas.annotations.media.Schema(type = \"string\", enumAsRef = true)\n        private MyEnum2 secondExampleFieldWithTypeProp;\n\n        public MyEnum getEnumExampleFieldWithImplementationProp() {\n            return enumExampleFieldWithImplementationProp;\n        }\n\n        public void setEnumExampleFieldWithImplementationProp(MyEnum enumExampleFieldWithImplementationProp) {\n            this.enumExampleFieldWithImplementationProp = enumExampleFieldWithImplementationProp;\n        }\n\n        public MyEnum2 getSecondExampleFieldWithTypeProp() {\n            return secondExampleFieldWithTypeProp;\n        }\n\n        public void setSecondExampleFieldWithTypeProp(MyEnum2 secondExampleFieldWithTypeProp) {\n            this.secondExampleFieldWithTypeProp = secondExampleFieldWithTypeProp;\n        }\n\n        enum MyEnum {\n            yes, no\n        }\n\n        //Should not be included in the model definitions\n        enum MyEnum2 {\n            si, no\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/Ticket4904Test.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.oas.annotations.media.DiscriminatorMapping;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.models.media.ComposedSchema;\nimport io.swagger.v3.oas.models.media.JsonSchema;\nimport org.testng.annotations.Test;\n\nimport static io.swagger.v3.core.resolving.SwaggerTestBase.mapper;\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class Ticket4904Test {\n\n    @Test\n    public void testComposedSchemaWithDiscriminator() {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n        modelResolver.setOpenapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        io.swagger.v3.oas.models.media.Schema schema = context.resolve(new AnnotatedType(ParentClass.class));\n\n        assertNotNull(schema);\n        assertTrue(schema instanceof JsonSchema, \"Expected JsonSchema in OpenAPI 3.1 mode, but got: \" + schema.getClass());\n        JsonSchema jsonSchema = (JsonSchema) schema;\n        assertNotNull(jsonSchema.getOneOf());\n        assertEquals(jsonSchema.getOneOf().size(), 2);\n        assertEquals(( jsonSchema.getOneOf().get(0)).get$ref(), \"#/components/schemas/ChildClassA\");\n        assertEquals(( jsonSchema.getOneOf().get(1)).get$ref(), \"#/components/schemas/ChildClassB\");\n        assertNotNull(jsonSchema.getDiscriminator());\n        assertEquals(jsonSchema.getDiscriminator().getPropertyName(), \"objectType\");\n        assertNotNull(jsonSchema.getDiscriminator().getMapping());\n        assertEquals(jsonSchema.getDiscriminator().getMapping().size(), 2);\n        assertEquals(jsonSchema.getDiscriminator().getMapping().get(\"A\"), \"#/components/schemas/ChildClassA\");\n        assertEquals(jsonSchema.getDiscriminator().getMapping().get(\"B\"), \"#/components/schemas/ChildClassB\");\n    }\n\n    @Test\n    public void testMultiElementAllOf() {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n        modelResolver.setOpenapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        io.swagger.v3.oas.models.media.Schema schema = context.resolve(new AnnotatedType(MultiAllOfClass.class));\n\n        assertNotNull(schema);\n        assertTrue(schema instanceof JsonSchema, \"Expected JsonSchema in OpenAPI 3.1 mode, but got: \" + schema.getClass());\n        assertNotNull(schema.getAllOf());\n        assertEquals(schema.getAllOf().size(), 3);\n        assertEquals(((io.swagger.v3.oas.models.media.Schema) schema.getAllOf().get(0)).get$ref(), \"#/components/schemas/ClassA\");\n        assertEquals(((io.swagger.v3.oas.models.media.Schema) schema.getAllOf().get(1)).get$ref(), \"#/components/schemas/ClassB\");\n        assertEquals(((io.swagger.v3.oas.models.media.Schema) schema.getAllOf().get(2)).get$ref(), \"#/components/schemas/ClassC\");\n    }\n\n    @Test\n    public void testMultiElementAllOfOpenApi30() {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n        modelResolver.setOpenapi31(false);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        io.swagger.v3.oas.models.media.Schema schema = context.resolve(new AnnotatedType(MultiAllOfClass.class));\n\n        assertNotNull(schema);\n        assertTrue(schema instanceof ComposedSchema, \"Expected ComposedSchema in OpenAPI 3.0 mode, but got: \" + schema.getClass());\n        ComposedSchema composedSchema = (ComposedSchema) schema;\n        assertNotNull(composedSchema.getAllOf());\n        assertEquals(composedSchema.getAllOf().size(), 3);\n        assertEquals(composedSchema.getAllOf().get(0).get$ref(), \"#/components/schemas/ClassA\");\n        assertEquals(composedSchema.getAllOf().get(1).get$ref(), \"#/components/schemas/ClassB\");\n        assertEquals(composedSchema.getAllOf().get(2).get$ref(), \"#/components/schemas/ClassC\");\n    }\n\n    @Test\n    public void testMixedComposition() {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n        modelResolver.setOpenapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        io.swagger.v3.oas.models.media.Schema schema = context.resolve(new AnnotatedType(MixedCompositionClass.class));\n\n        assertNotNull(schema);\n        assertTrue(schema instanceof JsonSchema, \"Expected JsonSchema in OpenAPI 3.1 mode, but got: \" + schema.getClass());\n\n        JsonSchema jsonSchema = (JsonSchema) schema;\n        assertNotNull(jsonSchema.getAllOf());\n        assertEquals(jsonSchema.getAllOf().size(), 3);\n        assertEquals(jsonSchema.getAllOf().get(0).get$ref(), \"#/components/schemas/ClassA\");\n        assertEquals(jsonSchema.getAllOf().get(1).get$ref(), \"#/components/schemas/ClassB\");\n        io.swagger.v3.oas.models.media.Schema inlineSchema = jsonSchema.getAllOf().get(2);\n        assertNotNull(inlineSchema);\n        assertEquals(inlineSchema.get$ref(), null);\n        assertNotNull(inlineSchema.getProperties());\n        assertTrue(inlineSchema.getProperties().containsKey(\"additionalProperty\"));\n        io.swagger.v3.oas.models.media.Schema additionalPropertySchema =\n            (io.swagger.v3.oas.models.media.Schema) inlineSchema.getProperties().get(\"additionalProperty\");\n        assertNotNull(additionalPropertySchema);\n        assertEquals(additionalPropertySchema.getDescription(), \"Additional property\");\n    }\n\n    @Test\n    public void testAnyOfComposition() {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n        modelResolver.setOpenapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        io.swagger.v3.oas.models.media.Schema schema = context.resolve(new AnnotatedType(AnyOfClass.class));\n\n        assertNotNull(schema);\n        assertTrue(schema instanceof JsonSchema, \"Expected JsonSchema in OpenAPI 3.1 mode, but got: \" + schema.getClass());\n        JsonSchema jsonSchema = (JsonSchema) schema;\n        assertNotNull(jsonSchema.getAnyOf());\n        assertEquals(jsonSchema.getAnyOf().size(), 3);\n        assertEquals(((io.swagger.v3.oas.models.media.Schema) jsonSchema.getAnyOf().get(0)).get$ref(), \"#/components/schemas/ClassA\");\n        assertEquals(((io.swagger.v3.oas.models.media.Schema) jsonSchema.getAnyOf().get(1)).get$ref(), \"#/components/schemas/ClassB\");\n        assertEquals(((io.swagger.v3.oas.models.media.Schema) jsonSchema.getAnyOf().get(2)).get$ref(), \"#/components/schemas/ClassC\");\n    }\n\n    @Test\n    public void testOneOfWithReferences() {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n        modelResolver.setOpenapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        io.swagger.v3.oas.models.media.Schema schema = context.resolve(new AnnotatedType(OneOfWithRefsClass.class));\n\n        assertNotNull(schema);\n        assertTrue(schema instanceof JsonSchema, \"Expected JsonSchema in OpenAPI 3.1 mode, but got: \" + schema.getClass());\n        JsonSchema jsonSchema = (JsonSchema) schema;\n        assertNotNull(jsonSchema.getOneOf());\n        assertEquals(jsonSchema.getOneOf().size(), 2);\n        assertEquals((jsonSchema.getOneOf().get(0)).get$ref(), \"#/components/schemas/RefSubtypeA\");\n        assertEquals((jsonSchema.getOneOf().get(1)).get$ref(), \"#/components/schemas/RefSubtypeB\");\n    }\n\n    @Test\n    public void testJacksonPolymorphismWithTypeInfo() {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n        modelResolver.setOpenapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        io.swagger.v3.oas.models.media.Schema schema = context.resolve(new AnnotatedType(JacksonPolymorphicParent.class));\n\n        assertNotNull(schema);\n        assertTrue(schema instanceof JsonSchema, \"Expected JsonSchema in OpenAPI 3.1 mode, but got: \" + schema.getClass());\n        JsonSchema jsonSchema = (JsonSchema) schema;\n        if (jsonSchema.getOneOf() != null) {\n            assertEquals(jsonSchema.getOneOf().size(), 2);\n            assertEquals((jsonSchema.getOneOf().get(0)).get$ref(), \"#/components/schemas/JacksonChildA\");\n            assertEquals((jsonSchema.getOneOf().get(1)).get$ref(), \"#/components/schemas/JacksonChildB\");\n            assertNotNull(jsonSchema.getDiscriminator());\n            assertEquals(jsonSchema.getDiscriminator().getPropertyName(), \"type\");\n        } else {\n            assertNotNull(jsonSchema.getProperties());\n            assertTrue(jsonSchema.getProperties().containsKey(\"commonProperty\") ||\n                      jsonSchema.getProperties().containsKey(\"type\"),\n                      \"Expected to find either commonProperty or type discriminator property\");\n        }\n    }\n\n    @Test\n    public void testComplexAllOfWithInlineProperties() {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n        modelResolver.setOpenapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        io.swagger.v3.oas.models.media.Schema schema = context.resolve(new AnnotatedType(ComplexAllOfClass.class));\n\n        assertNotNull(schema);\n        assertTrue(schema instanceof JsonSchema, \"Expected JsonSchema in OpenAPI 3.1 mode, but got: \" + schema.getClass());\n        JsonSchema jsonSchema = (JsonSchema) schema;\n        assertNotNull(jsonSchema.getAllOf());\n        assertEquals(jsonSchema.getAllOf().size(), 3);\n        assertEquals((jsonSchema.getAllOf().get(0)).get$ref(), \"#/components/schemas/ClassA\");\n        assertEquals((jsonSchema.getAllOf().get(1)).get$ref(), \"#/components/schemas/ClassB\");\n        io.swagger.v3.oas.models.media.Schema inlineSchema =  jsonSchema.getAllOf().get(2);\n        assertNotNull(inlineSchema);\n        assertEquals(inlineSchema.get$ref(), null);\n        assertNotNull(inlineSchema.getProperties());\n        assertTrue(inlineSchema.getProperties().containsKey(\"complexProperty\"));\n        assertTrue(inlineSchema.getProperties().containsKey(\"additionalField\"));\n    }\n\n    @Test\n    public void testNestedComposition() {\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n        modelResolver.setOpenapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        io.swagger.v3.oas.models.media.Schema schema = context.resolve(new AnnotatedType(NestedCompositionClass.class));\n\n        assertNotNull(schema);\n        assertTrue(schema instanceof JsonSchema, \"Expected JsonSchema in OpenAPI 3.1 mode, but got: \" + schema.getClass());\n        JsonSchema jsonSchema = (JsonSchema) schema;\n        assertNotNull(jsonSchema.getOneOf());\n        assertNotNull(jsonSchema.getAllOf());\n        assertEquals(jsonSchema.getOneOf().size(), 2);\n        assertEquals(jsonSchema.getAllOf().size(), 1);\n        assertEquals((jsonSchema.getOneOf().get(0)).get$ref(), \"#/components/schemas/ChildClassA\");\n        assertEquals((jsonSchema.getOneOf().get(1)).get$ref(), \"#/components/schemas/ChildClassB\");\n        assertEquals((jsonSchema.getAllOf().get(0)).get$ref(), \"#/components/schemas/ClassA\");\n    }\n\n    @Schema(\n            type = \"object\",\n            discriminatorMapping = {\n                    @DiscriminatorMapping(value = \"A\", schema = ChildClassA.class),\n                    @DiscriminatorMapping(value = \"B\", schema = ChildClassB.class)\n            },\n            oneOf = {ChildClassA.class, ChildClassB.class},\n            discriminatorProperty = \"objectType\"\n    )\n    public abstract static class ParentClass {\n    }\n\n    public static class ChildClassA extends ParentClass {\n    }\n\n    public static class ChildClassB extends ParentClass {\n    }\n\n    @Schema(allOf = {ClassA.class, ClassB.class, ClassC.class})\n    public static class MultiAllOfClass {\n    }\n\n    @Schema(\n            allOf = {ClassA.class, ClassB.class},\n            type = \"object\",\n            description = \"Mixed composition with allOf and additional properties\",\n            format = \"custom-format\"\n    )\n    public static class MixedCompositionClass {\n        @Schema(description = \"Additional property\")\n        public String additionalProperty;\n    }\n\n    public static class ClassA {\n        public String propertyA;\n    }\n\n    public static class ClassB {\n        public String propertyB;\n    }\n\n    public static class ClassC {\n        public String propertyC;\n    }\n\n    @Schema(anyOf = {ClassA.class, ClassB.class, ClassC.class})\n    public static class AnyOfClass {\n    }\n\n    @Schema(oneOf = {RefSubtypeA.class, RefSubtypeB.class})\n    public static class OneOfWithRefsClass {\n    }\n\n    @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = \"type\")\n    @JsonSubTypes({\n            @JsonSubTypes.Type(value = JacksonChildA.class, name = \"A\"),\n            @JsonSubTypes.Type(value = JacksonChildB.class, name = \"B\")\n    })\n    public static class JacksonPolymorphicParent {\n        public String commonProperty;\n    }\n\n    public static class JacksonChildA extends JacksonPolymorphicParent {\n        public String childAProperty;\n    }\n\n    public static class JacksonChildB extends JacksonPolymorphicParent {\n        public String childBProperty;\n    }\n\n    @Schema(allOf = {ClassA.class, ClassB.class})\n    public static class ComplexAllOfClass {\n        @Schema(description = \"Complex property with nested structure\")\n        public String complexProperty;\n\n        @Schema(description = \"Additional field for testing\")\n        public String additionalField;\n    }\n\n    @Schema(\n            oneOf = {ChildClassA.class, ChildClassB.class},\n            allOf = {ClassA.class}\n    )\n    public static class NestedCompositionClass {\n    }\n\n    // Additional classes for $ref subtypes testing\n    public static class RefSubtypeA {\n        public String refPropertyA;\n    }\n\n    public static class RefSubtypeB {\n        public String refPropertyB;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/XMLGregorianCalendarTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.oas.models.media.DateTimeSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Test;\n\nimport javax.xml.datatype.XMLGregorianCalendar;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertTrue;\n\npublic class XMLGregorianCalendarTest {\n    @Test(description = \"it should read a model with XMLGregorianCalendar\")\n    public void testXMLGregorianCalendar() {\n        final Map<String, Schema> models = ModelConverters.getInstance().readAll(ModelWithCalendar.class);\n        assertEquals(models.size(), 1); // don't create a Joda DateTime object\n\n        Schema model = models.get(\"ModelWithCalendar\");\n\n        final Map<String, Schema> properties = model.getProperties();\n\n        final Schema nameProperty = properties.get(\"name\");\n        assertTrue(nameProperty instanceof StringSchema);\n        assertEquals(nameProperty.getDescription(), \"name of the model\");\n\n        final Schema dateTimeSchema = properties.get(\"createdAt\");\n        assertTrue(dateTimeSchema instanceof DateTimeSchema);\n        assertTrue(model.getRequired().contains(\"createdAt\"));\n        assertEquals(dateTimeSchema.getDescription(), \"creation timestamp\");\n    }\n\n    class ModelWithCalendar {\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"name of the model\")\n        public String name;\n\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"creation timestamp\", required = true)\n        public XMLGregorianCalendar createdAt;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/XMLInfoTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.XML;\nimport org.testng.annotations.Test;\n\nimport javax.xml.bind.annotation.XmlAccessType;\nimport javax.xml.bind.annotation.XmlAccessorType;\nimport javax.xml.bind.annotation.XmlAttribute;\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlElementRef;\nimport javax.xml.bind.annotation.XmlElementRefs;\nimport javax.xml.bind.annotation.XmlElementWrapper;\nimport javax.xml.bind.annotation.XmlRootElement;\nimport java.util.List;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class XMLInfoTest extends SwaggerTestBase {\n\n    @Test\n    public void testSimple() throws Exception {\n        final ModelConverter mr = modelResolver();\n        ModelConverterContextImpl ctx = new ModelConverterContextImpl(mr);\n        final Schema model = mr.resolve(new AnnotatedType(XmlDecoratedBean.class), ctx, null);\n\n        final XML xml = model.getXml();\n        assertNotNull(xml);\n        assertEquals(xml.getName(), \"xmlDecoratedBean\");\n\n        // Cast it to an array property\n        final ArraySchema property = (ArraySchema) model.getProperties().get(\"elements\");\n        assertNotNull(property);\n        final XML propertyXml = property.getXml();\n        assertNotNull(propertyXml);\n        assertNull(propertyXml.getName());\n        assertTrue(propertyXml.getWrapped());\n        // Get the xml for items for the array property\n        final XML itemsXml = property.getItems().getXml();\n        assertNotNull(itemsXml);\n        // Check the name of item name\n        assertEquals(itemsXml.getName(), \"element\");\n        assertNotNull(model.getProperties().get(\"elementC\"));\n    }\n\n    @XmlRootElement(name = \"xmlDecoratedBean\")\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"DESC\")\n    static class XmlDecoratedBean {\n\n        @XmlElement(name = \"elementB\")\n        public int b;\n\n        @XmlElementWrapper(name = \"elements\")\n        @XmlElement(name = \"element\")\n        public List<String> elements;\n\n        @JsonProperty(\"elementC\")\n        public String c;\n    }\n\n    @Test\n    public void testReadingXmlAccessorTypeNone() throws Exception {\n        final ModelConverter mr = modelResolver();\n        final Schema model = mr.resolve(new AnnotatedType(XmlDecoratedBeanXmlAccessorNone.class), new ModelConverterContextImpl(mr), null);\n\n        final XML xml = model.getXml();\n        assertNotNull(xml);\n        assertEquals(xml.getName(), \"xmlDecoratedBean\");\n\n        final Schema property = (Schema) model.getProperties().get(\"a\");\n        assertNotNull(property);\n\n        assertNull(model.getProperties().get(\"b\"));\n\n        assertNotNull(model.getProperties().get(\"c\"));\n\n        assertNotNull(model.getProperties().get(\"d\"));\n\n        assertNotNull(model.getProperties().get(\"e\"));\n\n        assertNotNull(model.getProperties().get(\"f\"));\n    }\n\n    @Test\n    public void testReadingXmlAccessorTypePublic() throws Exception {\n        final ModelConverter mr = modelResolver();\n        final Schema model = mr.resolve(new AnnotatedType(XmlDecoratedBeanXmlAccessorPublic.class), new ModelConverterContextImpl(mr), null);\n\n        final XML xml = model.getXml();\n        assertNotNull(xml);\n        assertEquals(xml.getName(), \"xmlDecoratedBean\");\n\n        final Schema propertyA = (Schema) model.getProperties().get(\"a\");\n        assertNotNull(propertyA);\n\n        final Schema propertyB = (Schema) model.getProperties().get(\"b\");\n        assertNotNull(propertyB);\n\n        final Schema propertyC = (Schema) model.getProperties().get(\"c\");\n        assertNull(propertyC);\n    }\n\n    @XmlRootElement(name = \"xmlDecoratedBean\")\n    @XmlAccessorType(XmlAccessType.NONE)\n    @io.swagger.v3.oas.annotations.media.Schema\n    static class XmlDecoratedBeanXmlAccessorNone {\n\n        @XmlElement\n        public int a;\n\n        public String b;\n\n        @XmlAttribute\n        public String c;\n\n        @XmlElementRef\n        public XmlDecoratedBean d;\n\n        @XmlElementRefs(value = {@XmlElementRef})\n        public List<XmlDecoratedBean> e;\n\n        @JsonProperty\n        public int f;\n    }\n\n    @XmlRootElement(name = \"xmlDecoratedBean\")\n    @io.swagger.v3.oas.annotations.media.Schema\n    static class XmlDecoratedBeanXmlAccessorPublic {\n\n        @XmlElement\n        public int a;\n\n        public String b;\n        \n        @JsonIgnore\n        public String c;\n\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/XmlModelTest.java",
    "content": "package io.swagger.v3.core.resolving;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.oas.models.Address;\nimport io.swagger.v3.core.oas.models.Issue534;\nimport io.swagger.v3.core.oas.models.ModelWithJAXBAnnotations;\nimport io.swagger.v3.core.oas.models.xmltest.NestedModelWithJAXBAnnotations;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.XML;\nimport org.testng.annotations.Test;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlElementWrapper;\nimport javax.xml.bind.annotation.XmlRootElement;\nimport java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\nimport static org.testng.Assert.assertTrue;\nimport static org.testng.Assert.fail;\n\npublic class XmlModelTest {\n\n    @Test(description = \"it should process an XML model attribute\")\n    public void processXMLModelAttribute() {\n        final Map<String, Schema> schemas = ModelConverters.getInstance().readAll(Monster.class);\n        final Schema model = schemas.get(\"Monster\");\n\n        assertNotNull(model);\n        assertTrue(model instanceof Schema);\n        XML xml = model.getXml();\n\n        assertNotNull(xml);\n        assertEquals(xml.getName(), \"monster\");\n        final Schema property = (Schema) model.getProperties().get(\"children\");\n        assertNotNull(property);\n        xml = property.getXml();\n        assertTrue(xml.getWrapped());\n        assertNull(xml.getName());\n    }\n\n    @Test(description = \"it should not create an xml object\")\n    public void itShouldNotCreateXmlObject() {\n        final Map<String, Schema> schemas = ModelConverters.getInstance().readAll(Address.class);\n        final Schema model = schemas.get(\"Address\");\n\n        assertNotNull(model);\n        assertTrue(model instanceof Schema);\n\n        final Schema property = (Schema) model.getProperties().get(\"streetNumber\");\n        final XML xml = property.getXml();\n\n        assertNull(xml);\n    }\n\n    @Test(description = \"it should stay hidden per 534\")\n    public void stayHidden() {\n        final Map<String, Schema> schemas = ModelConverters.getInstance().readAll(Issue534.class);\n        assertEquals(schemas.get(\"Issue534\").getProperties().size(), 1);\n    }\n\n    @Test(description = \"it should process a model with JAXB annotations\")\n    public void processModelWithJAXBAnnotations() {\n        final Map<String, Schema> schemas = ModelConverters.getInstance().readAll(ModelWithJAXBAnnotations.class);\n        assertEquals(schemas.size(), 1);\n\n        final Schema model = schemas.get(\"ModelWithJAXBAnnotations\");\n        assertNotNull(model);\n        assertTrue(model instanceof Schema);\n\n        final XML rootXml = model.getXml();\n        assertNotNull(rootXml);\n        assertEquals(rootXml.getName(), \"rootName\");\n\n        Map<String, Schema> props = model.getProperties();\n        for (Map.Entry<String, Schema> entry : props.entrySet()) {\n            final String name = entry.getKey();\n            final Schema property = entry.getValue();\n            if (\"id\".equals(name)) {\n                final XML xml = property.getXml();\n                assertNotNull(xml);\n                assertNull(xml.getName());\n                assertTrue(xml.getAttribute());\n                assertNull(xml.getWrapped());\n            } else if (\"name\".equals(name)) {\n                final XML xml = property.getXml();\n                assertNotNull(xml);\n                assertEquals(xml.getName(), \"renamed\");\n                assertNull(xml.getAttribute());\n                assertNull(xml.getWrapped());\n            } else if (Arrays.asList(\"list\", \"forcedElement\").contains(name)) {\n                assertNull(property.getXml());\n            } else if (\"wrappedList\".equals(name)) {\n                final XML xml = property.getXml();\n                assertNotNull(xml);\n                assertEquals(xml.getName(), \"wrappedListItems\");\n                assertNull(xml.getAttribute());\n                assertTrue(xml.getWrapped());\n            } else {\n                fail(String.format(\"Unexpected property: %s\", name));\n            }\n        }\n    }\n\n    @Test(description = \"it should process a nested model with JAXB annotations and a namespace\")\n    public void processModelWithJAXBAnnotationsAndNamespace() {\n        final Map<String, Schema> schemas = ModelConverters.getInstance().readAll(NestedModelWithJAXBAnnotations.class);\n        assertEquals(schemas.size(), 2);\n\n        final Schema model = schemas.get(\"NestedModelWithJAXBAnnotations\");\n        assertNotNull(model);\n        assertTrue(model instanceof Schema);\n\n        final XML rootXml = model.getXml();\n        assertNotNull(rootXml);\n        assertEquals(rootXml.getName(), \"RootName\");\n        assertEquals(rootXml.getNamespace(), \"https://www.openapis.org/test/nested\");\n\n        Map<String, Schema> props = model.getProperties();\n        for (Map.Entry<String, Schema> entry : props.entrySet()) {\n            final String name = entry.getKey();\n            final Schema property = entry.getValue();\n            if (\"id\".equals(name)) {\n                final XML xml = property.getXml();\n                assertNotNull(xml);\n                assertNull(xml.getName());\n                assertTrue(xml.getAttribute());\n                assertNull(xml.getWrapped());\n            } else if (\"name\".equals(name)) {\n                final XML xml = property.getXml();\n                assertNotNull(xml);\n                assertEquals(xml.getName(), \"named\");\n                assertNull(xml.getAttribute());\n                assertNull(xml.getWrapped());\n            } else if (\"subName\".equals(name)) {\n                final XML xml = property.getXml();\n                assertNotNull(xml);\n                assertEquals(xml.getName(), \"SubName\");\n                assertNull(xml.getAttribute());\n                assertNull(xml.getWrapped());\n            } else {\n                fail(String.format(\"Unexpected property: %s\", name));\n            }\n        }\n    }\n\n    @Test(description = \"it should deserialize a model\")\n    public void deserializeModel() throws IOException {\n        final String yaml = \"---\\n\" +\n                \"type: \\\"object\\\"\\n\" +\n                \"properties:\\n\" +\n                \"  id:\\n\" +\n                \"    type: \\\"string\\\"\\n\" +\n                \"    xml:\\n\" +\n                \"      attribute: true\\n\" +\n                \"  name:\\n\" +\n                \"    type: \\\"string\\\"\\n\" +\n                \"    xml:\\n\" +\n                \"      name: \\\"renamed\\\"\\n\" +\n                \"  list:\\n\" +\n                \"    type: \\\"array\\\"\\n\" +\n                \"    items:\\n\" +\n                \"      type: \\\"string\\\"\\n\" +\n                \"  wrappedList:\\n\" +\n                \"    type: \\\"array\\\"\\n\" +\n                \"    xml:\\n\" +\n                \"      name: \\\"wrappedListItems\\\"\\n\" +\n                \"      wrapped: true\\n\" +\n                \"    items:\\n\" +\n                \"      type: \\\"string\\\"\\n\" +\n                \"  forcedElement:\\n\" +\n                \"    type: \\\"array\\\"\\n\" +\n                \"    items:\\n\" +\n                \"      type: \\\"string\\\"\\n\" +\n                \"xml:\\n\" +\n                \"  name: \\\"rootName\\\"\";\n        final Schema model = Yaml.mapper().readValue(yaml, Schema.class);\n\n        final Schema wrappedList = (Schema) model.getProperties().get(\"wrappedList\");\n        assertNotNull(wrappedList);\n        assertNotNull(wrappedList.getXml());\n        assertEquals(wrappedList.getXml().getName(), \"wrappedListItems\");\n    }\n\n    @XmlRootElement(name = \"monster\")\n    class Monster {\n        public String name = \"\";\n\n        @XmlElementWrapper()\n        @XmlElement(name = \"children\")\n        public java.util.List<String> children = new ArrayList<String>();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/BidimensionalArray.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\n\nimport javax.validation.constraints.Size;\nimport java.lang.annotation.Inherited;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.util.List;\n\npublic class BidimensionalArray {\n    @ArraySchema(maxItems = 3)\n    @MySizeAnnotation(maxItems = 2)\n    public List<List<String>> withCustomAnnotation;\n\n    @ArraySchema(maxItems = 3)\n    public List<Foo<String>> withHelperClass;\n\n\n    @ArraySchema(maxItems = 2)\n    @JsonIgnoreProperties({\"empty\", \"first\", \"last\"})\n    public static interface Foo<T> extends List<T> {\n\n    }\n\n    @Size(max = 2)\n    public List<String> sized;\n\n    @Retention(RetentionPolicy.RUNTIME)\n    @Inherited\n    public static @interface MySizeAnnotation {\n        int maxItems() default Integer.MIN_VALUE;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/InnerType.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\npublic class InnerType {\n    public int foo;\n    public String name;\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/InnerTypeRequired.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class InnerTypeRequired {\n    public int foo;\n    @Schema(required = true)\n    public String name;\n\n    public String getName() {\n      return name;\n    }\n\n    public void setName(String name) {\n      this.name = name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/Issue4290.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class Issue4290 {\n    @Schema(description = \"A string, a number or a boolean\", anyOf = { String.class, Number.class, Boolean.class })\n    public Object value;\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/JacksonUnwrappedRequiredProperty.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport com.fasterxml.jackson.annotation.JsonUnwrapped;\n\npublic class JacksonUnwrappedRequiredProperty {\n    @JsonUnwrapped private final InnerTypeRequired innerType;\n\n    public JacksonUnwrappedRequiredProperty(InnerTypeRequired innerType) {\n      this.innerType = innerType;\n    }\n\n    public InnerTypeRequired getInnerType() {\n      return innerType;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/JsonViewObject.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport com.fasterxml.jackson.annotation.JsonView;\n\npublic class JsonViewObject {\n  public static class View {\n\n    public interface Public {\n    }\n\n    public interface Protected {\n    }\n\n    public interface Private {\n    }\n  }\n\n  public static class Person {\n\n    @JsonView({View.Public.class, View.Protected.class, View.Private.class})\n    public String id;\n\n    @JsonView({View.Protected.class, View.Private.class})\n    public String firstName;\n\n    @JsonView({View.Protected.class, View.Private.class})\n    public String lastName;\n\n    @JsonView(View.Private.class)\n    public String address;\n\n    public String email;\n  }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/MyThing.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport java.util.HashSet;\nimport java.util.Set;\n\n@Schema(description = \"Thing\")\npublic class MyThing {\n    private final Set<MyThing> otherThings;\n\n    public MyThing() {\n        otherThings = new HashSet<>();\n    }\n\n    @Schema(description = \"Other related things\")\n    public Set<MyThing> getOtherThings() {\n        return otherThings;\n    }\n}\n\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestArrayType.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class TestArrayType {\n\n    private Integer id;\n\n    @ArraySchema(maxItems = 10)\n    private List<String> names;\n\n    public Integer getId() {\n        return id;\n    }\n\n    public void setId(Integer id) {\n        this.id = id;\n    }\n\n    public List<String> getNames() {\n        return names;\n    }\n\n    public void setNames(List<String> names) {\n        this.names = names;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObject2616.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport java.util.List;\n\n@Schema(name = \"testObject\")\npublic class TestObject2616 {\n\n    private List<AbstractObject> objects;\n\n    @ArraySchema(schema = @Schema(\n            name = \"objects\",\n            oneOf = {\n                    AObject.class,\n                    BObject.class\n            }\n    ))\n    public List<AbstractObject> getObjects() {return objects;}\n\n    public void setObjects(List<AbstractObject> objects) {this.objects = objects;}\n\n    public static class TestObject2616_Schema {\n\n        private AbstractObject object;\n\n        @Schema(\n                name = \"object\",\n                oneOf = {\n                        AObject.class,\n                        BObject.class\n                }\n        )\n        public AbstractObject getObjects() {return object;}\n\n        public void setObject(AbstractObject object) {this.object = object;}\n    }\n\n}\n\n\nabstract class AbstractObject {}\n\n@Schema(name = \"AObject\")\nclass AObject extends AbstractObject{\n    private String name;\n\n    public String getName() {return name;}\n\n    public void setName(String name) {this.name = name;}\n}\n\n@Schema(name = \"BObject\")\nclass BObject extends AbstractObject{\n    private Integer number;\n\n    public Integer getNumber() {return number;}\n\n    public void setNumber(Integer number) {this.number = number;}\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObject2915.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.validation.constraints.NotNull;\nimport java.io.Serializable;\n\n@Schema(name = \"TestObject2616\", description = \"Nutritional value specification\")\npublic class TestObject2915 implements Serializable {\n    private final static long serialVersionUID = 1L;\n    private String name;\n\n    private QuantitativeValueDTO perServing;\n    private QuantitativeValueDTO per100Gram;\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public QuantitativeValueDTO getPerServing() {\n        return perServing;\n    }\n\n    public void setPerServing(QuantitativeValueDTO perServing) {\n        this.perServing = perServing;\n    }\n\n    public QuantitativeValueDTO getPer100Gram() {\n        return per100Gram;\n    }\n\n    public void setPer100Gram(QuantitativeValueDTO per100Gram) {\n        this.per100Gram = per100Gram;\n    }\n\n    @Schema(name = \"QuantitativeValue\", description = \"A combination of a value and associated unit\")\n    public class QuantitativeValueDTO implements Serializable {\n\n        private final static long serialVersionUID = 1L;\n\n        @NotNull\n        private double value;\n\n        private String unitText;\n        private String unitCode;\n\n        public double getValue() {\n            return value;\n        }\n\n        public void setValue(double value) {\n            this.value = value;\n        }\n\n        public String getUnitText() {\n            return unitText;\n        }\n\n        public void setUnitText(String unitText) {\n            this.unitText = unitText;\n        }\n\n        public String getUnitCode() {\n            return unitCode;\n        }\n\n        public void setUnitCode(String unitCode) {\n            this.unitCode = unitCode;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObject2972.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport java.util.Map;\n\npublic class TestObject2972 {\n\n    public Map<String, String> myField1;\n    public Map<String, String> myField2;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObject2992.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport java.time.LocalDateTime;\nimport java.time.LocalTime;\n\npublic class TestObject2992 {\n\n    private String name;\n    private LocalTime a;\n    private LocalTime b;\n    private LocalTime c;\n\n    private LocalDateTime d;\n    private LocalDateTime e;\n    private LocalDateTime f;\n\n\n    public LocalTime getA() {\n        return a;\n    }\n\n    public void setA(LocalTime a) {\n        this.a = a;\n    }\n\n    public LocalTime getB() {\n        return b;\n    }\n\n    public void setB(LocalTime b) {\n        this.b = b;\n    }\n\n    public LocalTime getC() {\n        return c;\n    }\n\n    public void setC(LocalTime c) {\n        this.c = c;\n    }\n\n    public LocalDateTime getD() {\n        return d;\n    }\n\n    public void setD(LocalDateTime d) {\n        this.d = d;\n    }\n\n    public LocalDateTime getE() {\n        return e;\n    }\n\n    public void setE(LocalDateTime e) {\n        this.e = e;\n    }\n\n    public LocalDateTime getF() {\n        return f;\n    }\n\n    public void setF(LocalDateTime f) {\n        this.f = f;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObject3697.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport com.fasterxml.jackson.annotation.JsonCreator;\nimport com.fasterxml.jackson.annotation.JsonProperty;\n\npublic class TestObject3697 {\n    @JsonProperty(\"id\")\n    private final Long id;\n\n    @io.swagger.v3.oas.annotations.media.Schema(hidden = true)\n    @JsonProperty(\"hidden\")\n    private final String hidden;\n\n\n    @JsonCreator\n    public TestObject3697(@JsonProperty(\"id\") Long id,\n                          @io.swagger.v3.oas.annotations.media.Schema(hidden = true)\n                                              @JsonProperty(\"hidden\") String hidden) {\n        this.id = id;\n        this.hidden = hidden;\n    }\n\n    public Long getId() {\n        return id;\n    }\n\n    public String getHidden() {\n        return hidden;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObject3699.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport java.util.List;\n\n@com.fasterxml.jackson.annotation.JsonTypeInfo(\n        use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME,\n        include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.WRAPPER_OBJECT)\n@com.fasterxml.jackson.annotation.JsonTypeName(\"CustomName\")\npublic class TestObject3699 {\n    public String bar;\n    public List<String> foo;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObject4715.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\npublic class TestObject4715 {\n\n    private String foo;\n\n    private String bar;\n\n    private Integer id;\n\n    public String getFoo() {\n        return foo;\n    }\n\n    public void setFoo(String foo) {\n        this.foo = foo;\n    }\n\n    public String getBar() {\n        return bar;\n    }\n\n    public void setBar(String bar) {\n        this.bar = bar;\n    }\n\n    public Integer getId() {\n        return id;\n    }\n\n    public void setId(Integer id) {\n        this.id = id;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObjectTicket2620.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(name = \"TestObjectTicket2620\", description = \"TestObject description\", oneOf = {\n        TestObjectTicket2620.ChildTestObject.class,\n        TestObjectTicket2620.Child2TestObject.class\n})\npublic class TestObjectTicket2620 {\n\n    private String name;\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    class ChildTestObject extends TestObjectTicket2620{\n        private String childName;\n\n        public String getChildName() {\n            return childName;\n        }\n\n        public void setChildName(String childName) {\n            this.childName = childName;\n        }\n    }\n\n    class Child2TestObject extends TestObjectTicket2620{\n        private String childName;\n\n        public String getChildName() {\n            return childName;\n        }\n\n        public void setChildName(String childName) {\n            this.childName = childName;\n        }\n    }\n}\n\n\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObjectTicket2620Subtypes.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(name = \"TestObjectTicket2620Subtypes\", description = \"TestObject description\", oneOf = {\n        TestObjectTicket2620Subtypes.ChildTestObject.class,\n        TestObjectTicket2620Subtypes.Child2TestObject.class\n})\n@JsonSubTypes({ @JsonSubTypes.Type(value = TestObjectTicket2620Subtypes.ChildTestObject.class),\n                @JsonSubTypes.Type(value = TestObjectTicket2620Subtypes.Child2TestObject.class)})\npublic class TestObjectTicket2620Subtypes {\n\n    private String name;\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    class ChildTestObject extends TestObjectTicket2620Subtypes{\n        private String childName;\n\n        public String getChildName() {\n            return childName;\n        }\n\n        public void setChildName(String childName) {\n            this.childName = childName;\n        }\n    }\n\n    class Child2TestObject extends TestObjectTicket2620Subtypes{\n        private String childName;\n\n        public String getChildName() {\n            return childName;\n        }\n\n        public void setChildName(String childName) {\n            this.childName = childName;\n        }\n    }\n}\n\n\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObjectTicket2900.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n    @Schema(name = \"SomeDTO\")\n    public class TestObjectTicket2900 {\n\n        @Schema(implementation = MyJsonPrimitive.class)\n        public GsonJsonPrimitive value;\n\n        @Schema(\n                description = \"Description of value\",\n                oneOf = { String.class, Number.class }\n        )\n        public GsonJsonPrimitive valueWithMixIn;\n\n\n        public class GsonJsonPrimitive {\n            private String foo;\n            public String getFoo(){return foo;}\n        }\n\n        @Schema(\n                description = \"Description of value\",\n                oneOf = { String.class, Number.class }\n        )\n        public class MyJsonPrimitive {\n        }\n\n        public abstract class GsonJsonPrimitiveMixIn {\n            @JsonIgnore\n            public abstract String getFoo();\n        }\n\n    }"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObjectTicket4247.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class TestObjectTicket4247 {\n\n    @Schema(\n            oneOf = { String.class, Number.class }\n    )\n    public Object value;\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/Ticket2862Model.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\n@com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.WRAPPER_OBJECT)\n@com.fasterxml.jackson.annotation.JsonSubTypes({\n        @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = Ticket2862ModelImpl.class)})\npublic interface Ticket2862Model {}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/Ticket2862ModelImpl.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\npublic enum Ticket2862ModelImpl implements Ticket2862Model {\n    VALUE1,\n    VALUE2\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/Ticket2884Model.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\n@com.fasterxml.jackson.annotation.JsonTypeInfo(\n        use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME,\n        include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.WRAPPER_OBJECT)\npublic interface Ticket2884Model {}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/Ticket2884ModelClass.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport java.util.List;\n\n@com.fasterxml.jackson.annotation.JsonTypeInfo(\n        use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME,\n        include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.WRAPPER_OBJECT)\npublic class Ticket2884ModelClass {\n\n    public String bar;\n    public List<String> foo;\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/User2169.java",
    "content": "package io.swagger.v3.core.resolving.resources;\n\nimport com.fasterxml.jackson.annotation.JsonCreator;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class User2169 {\n    private String name;\n    private int age;\n    private String privat;\n    public String publi;\n    private String getter;\n\n    public String getGetter() {\n        return getter;\n    }\n\n    private String setter;\n\n    public void setSetter(String setter) {\n        this.setter = setter;\n    }\n\n    private String getterSetter;\n\n    public String getGetterSetter() {\n        return getterSetter;\n    }\n\n    public void setGetterSetter(String getterSetter) {\n        this.getterSetter = getterSetter;\n    }\n\n    @JsonProperty\n    private String jsonProp;\n    @JsonProperty(access = JsonProperty.Access.READ_ONLY)\n    private String jsonPropReadOnly;\n    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)\n    private String jsonPropWriteOnly;\n    @JsonProperty(access = JsonProperty.Access.READ_WRITE)\n    private String jsonPropReadWrite;\n\n    private String getter_jsonProp;\n\n    @JsonProperty\n    public String getGetter_jsonProp() {\n        return getter_jsonProp;\n    }\n\n    private String getter_jsonPropReadOnly;\n\n    @JsonProperty(access = JsonProperty.Access.READ_ONLY)\n    public String getGetter_jsonPropReadOnly() {\n        return getter_jsonPropReadOnly;\n    }\n\n    // Doesn't expect writeOnly as it's semantically wrong?\n    private String getter_jsonPropWriteOnly;\n\n    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)\n    public String getGetter_jsonPropWriteOnly() {\n        return getter_jsonPropWriteOnly;\n    }\n\n    private String getter_jsonPropReadWrite;\n\n    @JsonProperty(access = JsonProperty.Access.READ_WRITE)\n    public String getGetter_jsonPropReadWrite() {\n        return getter_jsonPropReadWrite;\n    }\n\n    private String setter_jsonProp;\n    private String setter_jsonPropReadOnly;\n    private String setter_jsonPropWriteOnly;\n    private String setter_jsonPropReadWrite;\n\n    @JsonProperty\n    public void setSetter_jsonProp(String setter_jsonProp) {\n        this.setter_jsonProp = setter_jsonProp;\n    }\n\n    // Doesn't expect readOnly as it's semantically wrong?\n    @JsonProperty(access = JsonProperty.Access.READ_ONLY)\n    public void setSetter_jsonPropReadOnly(String setter_jsonPropReadOnly) {\n        this.setter_jsonPropReadOnly = setter_jsonPropReadOnly;\n    }\n\n    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)\n    public void setSetter_jsonPropWriteOnly(String setter_jsonPropWriteOnly) {\n        this.setter_jsonPropWriteOnly = setter_jsonPropWriteOnly;\n    }\n\n    @JsonProperty(access = JsonProperty.Access.READ_WRITE)\n    public void setSetter_jsonPropReadWrite(String setter_jsonPropReadWrite) {\n        this.setter_jsonPropReadWrite = setter_jsonPropReadWrite;\n    }\n\n    private String gettersetter_jsonPropGet;\n    private String gettersetter_jsonPropReadOnlyGet;\n    private String gettersetter_jsonPropWriteOnlyGet;\n    private String gettersetter_jsonPropReadWriteGet;\n    private String gettersetter_jsonPropSet;\n    private String gettersetter_jsonPropReadOnlySet;\n    private String gettersetter_jsonPropWriteOnlySet;\n    private String gettersetter_jsonPropReadWriteSet;\n\n    @JsonProperty\n    public String getGettersetter_jsonPropGet() {\n        return gettersetter_jsonPropGet;\n    }\n\n    public void setGettersetter_jsonPropGet(String gettersetter_jsonPropGet) {\n        this.gettersetter_jsonPropGet = gettersetter_jsonPropGet;\n    }\n\n    @JsonProperty(access = JsonProperty.Access.READ_ONLY)\n    public String getGettersetter_jsonPropReadOnlyGet() {\n        return gettersetter_jsonPropReadOnlyGet;\n    }\n\n    public void setGettersetter_jsonPropReadOnlyGet(String gettersetter_jsonPropReadOnlyGet) {\n        this.gettersetter_jsonPropReadOnlyGet = gettersetter_jsonPropReadOnlyGet;\n    }\n\n    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)\n    public String getGettersetter_jsonPropWriteOnlyGet() {\n        return gettersetter_jsonPropWriteOnlyGet;\n    }\n\n    public void setGettersetter_jsonPropWriteOnlyGet(String gettersetter_jsonPropWriteOnlyGet) {\n        this.gettersetter_jsonPropWriteOnlyGet = gettersetter_jsonPropWriteOnlyGet;\n    }\n\n    @JsonProperty(access = JsonProperty.Access.READ_WRITE)\n    public String getGettersetter_jsonPropReadWriteGet() {\n        return gettersetter_jsonPropReadWriteGet;\n    }\n\n    public void setGettersetter_jsonPropReadWriteGet(String gettersetter_jsonPropReadWriteGet) {\n        this.gettersetter_jsonPropReadWriteGet = gettersetter_jsonPropReadWriteGet;\n    }\n\n    public String getGettersetter_jsonPropSet() {\n        return gettersetter_jsonPropSet;\n    }\n\n    @JsonProperty\n    public void setGettersetter_jsonPropSet(String gettersetter_jsonPropSet) {\n        this.gettersetter_jsonPropSet = gettersetter_jsonPropSet;\n    }\n\n    public String getGettersetter_jsonPropReadOnlySet() {\n        return gettersetter_jsonPropReadOnlySet;\n    }\n\n    @JsonProperty(access = JsonProperty.Access.READ_ONLY)\n    public void setGettersetter_jsonPropReadOnlySet(String gettersetter_jsonPropReadOnlySet) {\n        this.gettersetter_jsonPropReadOnlySet = gettersetter_jsonPropReadOnlySet;\n    }\n\n    public String getGettersetter_jsonPropWriteOnlySet() {\n        return gettersetter_jsonPropWriteOnlySet;\n    }\n\n    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)\n    public void setGettersetter_jsonPropWriteOnlySet(String gettersetter_jsonPropWriteOnlySet) {\n        this.gettersetter_jsonPropWriteOnlySet = gettersetter_jsonPropWriteOnlySet;\n    }\n\n    public String getGettersetter_jsonPropReadWriteSet() {\n        return gettersetter_jsonPropReadWriteSet;\n    }\n\n    @JsonProperty(access = JsonProperty.Access.READ_WRITE)\n    public void setGettersetter_jsonPropReadWriteSet(String gettersetter_jsonPropReadWriteSet) {\n        this.gettersetter_jsonPropReadWriteSet = gettersetter_jsonPropReadWriteSet;\n    }\n\n    private String getterIgnore_setter;\n    private String getterIgnore_jsonPropSet;\n    private String getterIgnore_jsonPropReadOnlySet;\n    private String getterIgnore_jsonPropWriteOnlySet;\n    private String getterIgnore_jsonPropReadWriteSet;\n\n    @JsonIgnore\n    public String getGetterIgnore_setter() {\n        return getterIgnore_setter;\n    }\n\n    public void setGetterIgnore_setter(String getterIgnore_setter) {\n        this.getterIgnore_setter = getterIgnore_setter;\n    }\n\n    @JsonIgnore\n    public String getGetterIgnore_jsonPropSet() {\n        return getterIgnore_jsonPropSet;\n    }\n\n    @JsonProperty\n    public void setGetterIgnore_jsonPropSet(String getterIgnore_jsonPropSet) {\n        this.getterIgnore_jsonPropSet = getterIgnore_jsonPropSet;\n    }\n\n    @JsonIgnore\n    public String getGetterIgnore_jsonPropReadOnlySet() {\n        return getterIgnore_jsonPropReadOnlySet;\n    }\n\n    @JsonProperty(access = JsonProperty.Access.READ_ONLY)\n    public void setGetterIgnore_jsonPropReadOnlySet(String getterIgnore_jsonPropReadOnlySet) {\n        this.getterIgnore_jsonPropReadOnlySet = getterIgnore_jsonPropReadOnlySet;\n    }\n\n    @JsonIgnore\n    public String getGetterIgnore_jsonPropWriteOnlySet() {\n        return getterIgnore_jsonPropWriteOnlySet;\n    }\n\n    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)\n    public void setGetterIgnore_jsonPropWriteOnlySet(String getterIgnore_jsonPropWriteOnlySet) {\n        this.getterIgnore_jsonPropWriteOnlySet = getterIgnore_jsonPropWriteOnlySet;\n    }\n\n    @JsonIgnore\n    public String getGetterIgnore_jsonPropReadWriteSet() {\n        return getterIgnore_jsonPropReadWriteSet;\n    }\n\n    @JsonProperty(access = JsonProperty.Access.READ_WRITE)\n    public void setGetterIgnore_jsonPropReadWriteSet(String getterIgnore_jsonPropReadWriteSet) {\n        this.getterIgnore_jsonPropReadWriteSet = getterIgnore_jsonPropReadWriteSet;\n    }\n\n    private String setterIgnore_getter;\n    private String setterIgnore_jsonPropGet;\n    private String setterIgnore_jsonPropReadOnlyGet;\n    private String setterIgnore_jsonPropWriteOnlyGet;\n    private String setterIgnore_jsonPropReadWriteGet;\n\n    public String getSetterIgnore_getter() {\n        return setterIgnore_getter;\n    }\n\n    @JsonIgnore\n    public void setSetterIgnore_getter(String setterIgnore_getter) {\n        this.setterIgnore_getter = setterIgnore_getter;\n    }\n\n    @JsonProperty\n    public String getSetterIgnore_jsonPropGet() {\n        return setterIgnore_jsonPropGet;\n    }\n\n    @JsonIgnore\n    public void setSetterIgnore_jsonPropGet(String setterIgnore_jsonPropGet) {\n        this.setterIgnore_jsonPropGet = setterIgnore_jsonPropGet;\n    }\n\n    @JsonProperty(access = JsonProperty.Access.READ_ONLY)\n    public String getSetterIgnore_jsonPropReadOnlyGet() {\n        return setterIgnore_jsonPropReadOnlyGet;\n    }\n\n    @JsonIgnore\n    public void setSetterIgnore_jsonPropReadOnlyGet(String setterIgnore_jsonPropReadOnlyGet) {\n        this.setterIgnore_jsonPropReadOnlyGet = setterIgnore_jsonPropReadOnlyGet;\n    }\n\n    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)\n    public String getSetterIgnore_jsonPropWriteOnlyGet() {\n        return setterIgnore_jsonPropWriteOnlyGet;\n    }\n\n    @JsonIgnore\n    public void setSetterIgnore_jsonPropWriteOnlyGet(String setterIgnore_jsonPropWriteOnlyGet) {\n        this.setterIgnore_jsonPropWriteOnlyGet = setterIgnore_jsonPropWriteOnlyGet;\n    }\n\n    @JsonProperty(access = JsonProperty.Access.READ_WRITE)\n    public String getSetterIgnore_jsonPropReadWriteGet() {\n        return setterIgnore_jsonPropReadWriteGet;\n    }\n\n    @JsonIgnore\n    public void setSetterIgnore_jsonPropReadWriteGet(String setterIgnore_jsonPropReadWriteGet) {\n        this.setterIgnore_jsonPropReadWriteGet = setterIgnore_jsonPropReadWriteGet;\n    }\n\n    @JsonProperty(value = \"GetterJsonPropertyOnField\", required = true)\n    private String getterJsonPropertyOnField;\n    @JsonProperty(value = \"GetterJsonPropertyOnFieldReadWrite\", required = true, access = JsonProperty.Access.READ_WRITE)\n    private String getterJsonPropertyOnFieldReadWrite;\n    @Schema(accessMode = Schema.AccessMode.READ_WRITE)\n    @JsonProperty(value = \"GetterJsonPropertyOnFieldReadWriteSchemaReadOnlyFalse\", required = true, access = JsonProperty.Access.READ_WRITE)\n    private String getterJsonPropertyOnFieldReadWriteSchemaReadOnlyFalse;\n    @JsonProperty(value = \"GetterJsonPropertyOnFieldReadWriteCreatorSchemaReadOnlyFalse\", required = true, access = JsonProperty.Access.READ_WRITE)\n    @Schema(accessMode = Schema.AccessMode.READ_WRITE)\n    private String getterJsonPropertyOnFieldReadWriteCreatorSchemaReadOnlyFalse;\n\n    @JsonProperty(value = \"GetterJsonPropertyOnFieldReadOnly\", required = true, access = JsonProperty.Access.READ_ONLY)\n    private String getterJsonPropertyOnFieldReadOnly;\n\n    @Schema(accessMode = Schema.AccessMode.READ_ONLY)\n    @JsonProperty(value = \"GetterJsonPropertyOnFieldSchemaReadOnlyTrue\", required = true)\n    private String getterJsonPropertyOnFieldSchemaReadOnlyTrue;\n\n    @Schema(accessMode = Schema.AccessMode.READ_ONLY)\n    private String getterSchemaReadOnlyTrue;\n\n    @JsonCreator\n    public User2169(@JsonProperty(value = \"Name\", required = true) String name,\n                    @JsonProperty(value = \"Age\", required = true) int age,\n                    @JsonProperty(value = \"GetterJsonPropertyOnFieldReadWriteCreatorSchemaReadOnlyFalse\", required = true, access = JsonProperty.Access.READ_WRITE) String getterJsonPropertyOnFieldReadWriteCreatorSchemaReadOnlyFalse) {\n        this.name = name;\n        this.age = age;\n        this.getterJsonPropertyOnFieldReadWriteCreatorSchemaReadOnlyFalse = getterJsonPropertyOnFieldReadWriteCreatorSchemaReadOnlyFalse;\n    }\n\n    @JsonProperty(value = \"Name\", required = true)\n    public String getName() {\n        return name;\n    }\n\n    @JsonProperty(value = \"Age\", required = true)\n    public int getAge() {\n        return age;\n    }\n\n    public String getGetterJsonPropertyOnField() {\n        return getterJsonPropertyOnField;\n    }\n\n    public String getGetterJsonPropertyOnFieldReadWrite() {\n        return getterJsonPropertyOnFieldReadWrite;\n    }\n\n    public String getGetterJsonPropertyOnFieldReadWriteSchemaReadOnlyFalse() {\n        return getterJsonPropertyOnFieldReadWriteSchemaReadOnlyFalse;\n    }\n\n    public String getGetterJsonPropertyOnFieldReadWriteCreatorSchemaReadOnlyFalse() {\n        return getterJsonPropertyOnFieldReadWriteCreatorSchemaReadOnlyFalse;\n    }\n\n    public String getGetterJsonPropertyOnFieldReadOnly() {\n        return getterJsonPropertyOnFieldReadOnly;\n    }\n\n    public String getGetterJsonPropertyOnFieldSchemaReadOnlyTrue() {\n        return getterJsonPropertyOnFieldSchemaReadOnlyTrue;\n    }\n\n    public String getGetterSchemaReadOnlyTrue() {\n        return getterSchemaReadOnlyTrue;\n    }\n\n    Boolean isApprovePairing;\n\n    @JsonIgnore\n    public Boolean isApprovePairing() {\n        return isApprovePairing;\n    }\n\n    @JsonProperty(value = \"approvePairing\", access = JsonProperty.Access.WRITE_ONLY)\n    public void setApprovePairing(boolean isApprovePairing) {\n        this.isApprovePairing = isApprovePairing;\n    }\n\n    // not supported as not supported in json-ref; see discussion in https://github.com/OAI/OpenAPI-Specification/issues/556\n    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)\n    private Data data;\n\n}\n\nclass Data {\n    public String foo;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/ModelResolverOAS31Test.java",
    "content": "package io.swagger.v3.core.resolving.v31;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.SwaggerTestBase;\nimport io.swagger.v3.core.resolving.resources.TestArrayType;\nimport io.swagger.v3.core.resolving.resources.TestObject4715;\nimport io.swagger.v3.core.resolving.v31.model.AnnotatedArray;\nimport io.swagger.v3.core.resolving.v31.model.AnnotatedArrayProperty;\nimport io.swagger.v3.core.resolving.v31.model.AnnotatedArrayPropertyWriteOnly;\nimport io.swagger.v3.core.resolving.v31.model.AnnotatedArrayPropertyReadWrite;\nimport io.swagger.v3.core.resolving.v31.model.ModelWithDependentSchema;\nimport io.swagger.v3.core.resolving.v31.model.ModelWithOAS31Stuff;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\nimport javax.validation.constraints.DecimalMax;\nimport javax.validation.constraints.DecimalMin;\nimport javax.validation.constraints.Pattern;\nimport javax.validation.constraints.Size;\nimport java.util.List;\nimport java.util.Map;\n\npublic class ModelResolverOAS31Test extends SwaggerTestBase {\n\n    @Test\n    public void testAnnotatedArray() {\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n        io.swagger.v3.oas.models.media.Schema model = context.resolve(new AnnotatedType(AnnotatedArray.class));\n        SerializationMatchers.assertEqualsToYaml31(model, \"type: array\\n\" +\n                \"contains:\\n\" +\n                \"  type: string\\n\" +\n                \"description: arraydescription\\n\" +\n                \"items:\\n\" +\n                \"  type: string\\n\" +\n                \"  description: itemdescription\\n\"+\n                \"maxContains: 10\\n\" +\n                \"minContains: 1\\n\" +\n                \"prefixItems:\\n\" +\n                \"- type: string\\n\" +\n                \"unevaluatedItems:\\n\" +\n                \"  type: number\\n\");\n    }\n\n    @Test\n    public void testAnnotatedArrayProperty() {\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n        io.swagger.v3.oas.models.media.Schema model = context.resolve(new AnnotatedType(AnnotatedArrayProperty.class));\n        SerializationMatchers.assertEqualsToYaml31(model,\n                \"type: object\\n\" +\n                \"properties:\\n\" +\n                \"  randomList:\\n\" +\n                \"    type: array\\n\" +\n                \"    contains:\\n\" +\n                \"      type: string\\n\" +\n                \"    deprecated: true\\n\" +\n                \"    description: arraydescription\\n\" +\n                \"    examples:\\n\" +\n                \"    - John\\n\" +\n                \"    items:\\n\" +\n                \"      type: string\\n\" +\n                \"      description: itemdescription\\n\" +\n                \"      title: itemtitle\\n\" +\n                \"    maxContains: 10\\n\" +\n                \"    minContains: 1\\n\" +\n                \"    prefixItems:\\n\" +\n                \"    - type: string\\n\" +\n                \"      description: prefixdescription\\n\" +\n                \"    readOnly: true\\n\" +\n                \"    title: arraytitle\\n\" +\n                \"    unevaluatedItems:\\n\" +\n                \"      type: number\");\n    }\n\n    @Test\n    public void testAnnotatedArrayPropertyWriteOnly() {\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n        io.swagger.v3.oas.models.media.Schema model = context.resolve(new AnnotatedType(AnnotatedArrayPropertyWriteOnly.class));\n        SerializationMatchers.assertEqualsToYaml31(model,\n                \"type: object\\n\" +\n                \"properties:\\n\" +\n                \"  randomList:\\n\" +\n                \"    type: array\\n\" +\n                \"    description: arraydescription\\n\" +\n                \"    examples:\\n\" +\n                \"    - Jane\\n\" +\n                \"    items:\\n\" +\n                \"      type: string\\n\" +\n                \"      description: itemdescription\\n\" +\n                \"      title: itemtitle\\n\" +\n                \"    maxContains: 5\\n\" +\n                \"    minContains: 1\\n\" +\n                \"    title: arraytitle\\n\" +\n                \"    writeOnly: true\");\n    }\n\n    @Test\n    public void testAnnotatedArrayPropertyReadWrite() {\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n        io.swagger.v3.oas.models.media.Schema model = context.resolve(new AnnotatedType(AnnotatedArrayPropertyReadWrite.class));\n        SerializationMatchers.assertEqualsToYaml31(model,\n                \"type: object\\n\" +\n                \"properties:\\n\" +\n                \"  randomList:\\n\" +\n                \"    type: array\\n\" +\n                \"    description: arraydescription\\n\" +\n                \"    examples:\\n\" +\n                \"    - Bob\\n\" +\n                \"    items:\\n\" +\n                \"      type: string\\n\" +\n                \"      description: itemdescription\\n\" +\n                \"      title: itemtitle\\n\" +\n                \"    maxContains: 8\\n\" +\n                \"    minContains: 2\\n\" +\n                \"    title: arraytitle\");\n    }\n\n    @Test\n    public void testOAS31Fields() {\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n        Schema model = context.resolve(new AnnotatedType(ModelWithOAS31Stuff.class));\n        SerializationMatchers.assertEqualsToYaml31(context.getDefinedModels(), \"Address:\\n\" +\n                \"  type: object\\n\" +\n                \"  if:\\n\" +\n                \"    $ref: \\\"#/components/schemas/AnnotatedCountry\\\"\\n\" +\n                \"  then:\\n\" +\n                \"    $ref: \\\"#/components/schemas/PostalCodeNumberPattern\\\"\\n\" +\n                \"  else:\\n\" +\n                \"    $ref: \\\"#/components/schemas/PostalCodePattern\\\"\\n\" +\n                \"  dependentRequired:\\n\" +\n                \"    street:\\n\" +\n                \"    - country\\n\" +\n                \"  properties:\\n\" +\n                \"    street:\\n\" +\n                \"      type: string\\n\" +\n                \"    country:\\n\" +\n                \"      type: string\\n\" +\n                \"      enum:\\n\" +\n                \"      - UNITED_STATES_OF_AMERICA\\n\" +\n                \"      - CANADA\\n\" +\n                \"  propertyNames:\\n\" +\n                \"    pattern: \\\"^[A-Za-z_][A-Za-z0-9_]*$\\\"\\n\" +\n                \"AnnotatedCountry:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    country:\\n\" +\n                \"      type: string\\n\" +\n                \"      const: United States\\n\" +\n                \"Client:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    name:\\n\" +\n                \"      type: string\\n\" +\n                \"    creditCard:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int32\\n\" +\n                \"CreditCard:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    billingAddress:\\n\" +\n                \"      type: string\\n\" +\n                \"    acceptingCountries:\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        type: string\\n\" +\n                \"        description: accepting country\\n\" +\n                \"        enum:\\n\" +\n                \"        - UNITED_STATES_OF_AMERICA\\n\" +\n                \"        - CANADA\\n\" +\n                \"      uniqueItems: true\\n\" +\n                \"    availableCurrencies:\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        $ref: \\\"#/components/schemas/Currency\\\"\\n\" +\n                \"        description: available currencies\\n\" +\n                \"      uniqueItems: true\\n\" +\n                \"Currency:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    currencyCode:\\n\" +\n                \"      type: string\\n\" +\n                \"ModelWithOAS31Stuff:\\n\" +\n                \"  type: object\\n\" +\n                \"  $comment: Random comment at schema level\\n\" +\n                \"  $id: http://yourdomain.com/schemas/myschema.json\\n\" +\n                \"  description: this is model for testing OAS 3.1 resolving\\n\" +\n                \"  properties:\\n\" +\n                \"    randomList:\\n\" +\n                \"      type: array\\n\" +\n                \"      contains:\\n\" +\n                \"        type: string\\n\" +\n                \"      description: arraydescription\\n\" +\n                \"      items:\\n\" +\n                \"        type: string\\n\" +\n                \"        description: itemdescription\\n\" +\n                \"        title: itemtitle\\n\" +\n                \"      maxContains: 10\\n\" +\n                \"      minContains: 1\\n\" +\n                \"      prefixItems:\\n\" +\n                \"      - type: string\\n\" +\n                \"      title: arraytitle\\n\" +\n                \"      unevaluatedItems:\\n\" +\n                \"        type: number\\n\" +\n                \"    status:\\n\" +\n                \"      type:\\n\" +\n                \"      - string\\n\" +\n                \"      - number\\n\" +\n                \"    intValue:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int32\\n\" +\n                \"      $anchor: intValue\\n\" +\n                \"      $comment: comment at schema property level\\n\" +\n                \"      exclusiveMaximum: 100\\n\" +\n                \"      exclusiveMinimum: 1\\n\" +\n                \"    text:\\n\" +\n                \"      type: string\\n\" +\n                \"      contentEncoding: plan/text\\n\" +\n                \"      contentMediaType: base64\\n\" +\n                \"    encodedString:\\n\" +\n                \"      type: string\\n\" +\n                \"      contentMediaType: application/jwt\\n\" +\n                \"      contentSchema:\\n\" +\n                \"        $ref: \\\"#/components/schemas/MultipleBaseBean\\\"\\n\" +\n                \"    address:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Address\\\"\\n\" +\n                \"    client:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Client\\\"\\n\" +\n                \"      dependentSchemas:\\n\" +\n                \"        creditCard:\\n\" +\n                \"          $ref: \\\"#/components/schemas/CreditCard\\\"\\n\" +\n                \"      patternProperties:\\n\" +\n                \"        creditCard:\\n\" +\n                \"          $ref: \\\"#/components/schemas/CreditCard\\\"\\n\" +\n                \"      properties:\\n\" +\n                \"        extraObject:\\n\" +\n                \"          type: object\\n\" +\n                \"MultipleBaseBean:\\n\" +\n                \"  type: object\\n\" +\n                \"  description: MultipleBaseBean\\n\" +\n                \"  properties:\\n\" +\n                \"    beanType:\\n\" +\n                \"      type: string\\n\" +\n                \"    a:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int32\\n\" +\n                \"    b:\\n\" +\n                \"      type: string\\n\" +\n                \"MultipleSub1Bean:\\n\" +\n                \"  allOf:\\n\" +\n                \"  - $ref: \\\"#/components/schemas/MultipleBaseBean\\\"\\n\" +\n                \"  - type: object\\n\" +\n                \"    properties:\\n\" +\n                \"      c:\\n\" +\n                \"        type: integer\\n\" +\n                \"        format: int32\\n\" +\n                \"  description: MultipleSub1Bean\\n\" +\n                \"MultipleSub2Bean:\\n\" +\n                \"  allOf:\\n\" +\n                \"  - $ref: \\\"#/components/schemas/MultipleBaseBean\\\"\\n\" +\n                \"  - type: object\\n\" +\n                \"    properties:\\n\" +\n                \"      d:\\n\" +\n                \"        type: integer\\n\" +\n                \"        format: int32\\n\" +\n                \"  description: MultipleSub2Bean\\n\" +\n                \"PostalCodeNumberPattern:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    postalCode:\\n\" +\n                \"      type: string\\n\" +\n                \"      pattern: \\\"[0-9]{5}(-[0-9]{4})?\\\"\\n\" +\n                \"PostalCodePattern:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    postalCode:\\n\" +\n                \"      type: string\\n\" +\n                \"      pattern: \\\"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]\\\"\\n\" +\n                \"PropertyNamesPattern:\\n\" +\n                \"  pattern: \\\"^[A-Za-z_][A-Za-z0-9_]*$\\\"\\n\");\n    }\n\n\n    @Test\n    public void testDependentSchemasAnnotation() {\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n        io.swagger.v3.oas.models.media.Schema model = context.resolve(new AnnotatedType(ModelWithDependentSchema.class));\n\n        SerializationMatchers.assertEqualsToYaml31(context.getDefinedModels(), \"BooleanFakeClass:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    type:\\n\" +\n                \"      type: boolean\\n\" +\n                \"ModelWithDependentSchema:\\n\" +\n                \"  type: object\\n\" +\n                \"  dependentSchemas:\\n\" +\n                \"    value:\\n\" +\n                \"      properties:\\n\" +\n                \"        enable:\\n\" +\n                \"          $ref: \\\"#/components/schemas/BooleanFakeClass\\\"\\n\" +\n                \"  properties:\\n\" +\n                \"    name:\\n\" +\n                \"      type: string\\n\" +\n                \"    value:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int32\\n\");\n    }\n\n    @Test(description = \"Top level type:object should appear in OAS31\")\n    public void testObjectTypeSchemaOAS31(){\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n        io.swagger.v3.oas.models.media.Schema model = context.resolve(new AnnotatedType(TestObject4715.class));\n        SerializationMatchers.assertEqualsToYaml31(model, \"type: object\\n\" +\n                \"properties:\\n\" +\n                \"  foo:\\n\" +\n                \"    type: string\\n\" +\n                \"  bar:\\n\" +\n                \"    type: string\\n\" +\n                \"  id:\\n\" +\n                \"    type: integer\\n\" +\n                \"    format: int32\");\n    }\n\n    @Test\n    public void testFieldArraySchemaAnnotation() {\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n        io.swagger.v3.oas.models.media.Schema model = context.resolve(new AnnotatedType(TestArrayType.class));\n        SerializationMatchers.assertEqualsToYaml31(model, \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int32\\n\" +\n                \"    names:\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        type: string\\n\" +\n                \"      maxItems: 10\");\n    }\n\n    @Test(description = \"@Pattern correctly handled in type parameters of properties using collections when using oas 3.1.0\")\n    public void testModelUsingCollectionTypePropertyHandlesPatternAnnotationForOas31() {\n        String expectedYaml = \"ClassWithUsingPatternOnCollection:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    myField:\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        pattern: myPattern\\n\" +\n                \"        type: string\";\n\n        Map<String, Schema> stringSchemaMap = ModelConverters.getInstance(true).readAll(ClassWithUsingPatternOnCollection.class);\n        SerializationMatchers.assertEqualsToYaml31(stringSchemaMap, expectedYaml);\n    }\n\n    private static class ClassWithUsingPatternOnCollection {\n        private List<@Pattern(regexp = \"myPattern\") String> myField;\n\n        public List<String> getMyField() {\n            return myField;\n        }\n\n        public void setMyField(List<String> myField) {\n            this.myField = myField;\n        }\n    }\n\n    @Test(description = \"@Size correctly handled in properties using collections when using oas 3.1.0\")\n    public void testModelUsingCollectionTypePropertyHandleSizeAnnotationForOas31() {\n        String expectedYaml = \"ClassWithUsingSizeOnCollection:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    myField:\\n\" +\n                \"      maxItems: 100\\n\" +\n                \"      minItems: 1\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        type: string\";\n\n        Map<String, io.swagger.v3.oas.models.media.Schema> stringSchemaMap = ModelConverters.getInstance(true).readAll(ClassWithUsingSizeOnCollection.class);\n        SerializationMatchers.assertEqualsToYaml31(stringSchemaMap, expectedYaml);\n    }\n\n    private static class ClassWithUsingSizeOnCollection {\n        @Size(min = 1, max = 100)\n        private List<String> myField;\n\n        public List<String> getMyField() {\n            return myField;\n        }\n\n        public void setMyField(List<String> myField) {\n            this.myField = myField;\n        }\n    }\n\n    @Test(description = \"@Size correctly handled for field type String using OAS 3.1.0\")\n    public void testSizeAnnotationOnFieldForOAS31() {\n        String expectedYaml = \"ClassWithUsingSizeOnField:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    myField:\\n\" +\n                \"      type: string\\n\" +\n                \"      maxLength: 100\\n\" +\n                \"      minLength: 1\";\n\n        Map<String, io.swagger.v3.oas.models.media.Schema> stringSchemaMap = ModelConverters.getInstance(true).readAll(ClassWithUsingSizeOnField.class);\n        SerializationMatchers.assertEqualsToYaml31(stringSchemaMap, expectedYaml);\n    }\n\n    private static class ClassWithUsingSizeOnField {\n        @Size(min = 1, max = 100)\n        private String myField;\n\n        public String getMyField() {\n            return myField;\n        }\n\n        public void setMyField(String myField) {\n            this.myField = myField;\n        }\n    }\n\n    @Test(description = \"@DecimalMax/Min annotations correctly handled for field type Number using OAS 3.1.0\")\n    public void testDecimalAnnotationsOnField() {\n        String expectedYaml = \"ClassWithUsingDecimalAnnotationsOnField:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    myField:\\n\" +\n                \"      type: number\\n\" +\n                \"      maximum: 100\\n\" +\n                \"      minimum: 1\";\n\n        Map<String, io.swagger.v3.oas.models.media.Schema> stringSchemaMap = ModelConverters.getInstance(true).readAll(ClassWithUsingDecimalAnnotationsOnField.class);\n        SerializationMatchers.assertEqualsToYaml31(stringSchemaMap, expectedYaml);\n    }\n\n    private static class ClassWithUsingDecimalAnnotationsOnField {\n        @DecimalMin(\"1\")\n        @DecimalMax(\"100\")\n        private Number myField;\n\n        public Number getMyField() {\n            return myField;\n        }\n\n        public void setMyField(Number myField) {\n            this.myField = myField;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/PatternAndSchemaPropertiesTest.java",
    "content": "package io.swagger.v3.core.resolving.v31;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.SwaggerTestBase;\nimport io.swagger.v3.core.resolving.v31.model.AnnotatedPet;\nimport io.swagger.v3.core.resolving.v31.model.AnnotatedPetSinglePatternProperty;\nimport io.swagger.v3.core.util.OpenAPISchema2JsonSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\n\nimport static org.testng.Assert.assertEquals;\n\npublic class PatternAndSchemaPropertiesTest extends SwaggerTestBase {\n\n    @Test\n    public void testPatternAndSchemaProperties() throws Exception {\n\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        Schema model = context\n                .resolve(new AnnotatedType(AnnotatedPet.class));\n\n        assertEquals(((Schema)model.getPatternProperties().get(\"what.*ever\")).getFormat(), \"int32\");\n        assertEquals(((Schema)model.getPatternProperties().get(\"it.*takes\")).get$ref(), \"#/components/schemas/Category\");\n\n        assertEquals(((Schema)model.getProperties().get(\"anotherCategory\")).get$ref(), \"#/components/schemas/Category\");\n        assertEquals(((Schema)model.getProperties().get(\"anotherInteger\")).getFormat(), \"int32\");\n\n        SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), \"AnnotatedPet:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int64\\n\" +\n                \"    category:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Category\\\"\\n\" +\n                \"    name:\\n\" +\n                \"      type: string\\n\" +\n                \"    photoUrls:\\n\" +\n                \"      type: array\\n\" +\n                \"      xml:\\n\" +\n                \"        wrapped: true\\n\" +\n                \"      items:\\n\" +\n                \"        type: string\\n\" +\n                \"        xml:\\n\" +\n                \"          name: photoUrl\\n\" +\n                \"    tags:\\n\" +\n                \"      type: array\\n\" +\n                \"      xml:\\n\" +\n                \"        wrapped: true\\n\" +\n                \"      items:\\n\" +\n                \"        $ref: \\\"#/components/schemas/Tag\\\"\\n\" +\n                \"    status:\\n\" +\n                \"      type: string\\n\" +\n                \"      description: pet status in the store\\n\" +\n                \"      enum:\\n\" +\n                \"      - available\\n\" +\n                \"      - pending\\n\" +\n                \"      - sold\\n\" +\n                \"    anotherCategory:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Category\\\"\\n\" +\n                \"    anotherInteger:\\n\" +\n                \"      maximum: 10\\n\" +\n                \"      type: integer\\n\" +\n                \"      description: prop schema 1\\n\" +\n                \"      format: int32\\n\" +\n                \"  description: Annotated Pet\\n\" +\n                \"  nullable: true\\n\" +\n                \"Category:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int64\\n\" +\n                \"    name:\\n\" +\n                \"      type: string\\n\" +\n                \"  description: prop schema 2\\n\" +\n                \"  xml:\\n\" +\n                \"    name: Category\\n\" +\n                \"Tag:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int64\\n\" +\n                \"    name:\\n\" +\n                \"      type: string\\n\" +\n                \"  xml:\\n\" +\n                \"    name: Tag\");\n        context.getDefinedModels().values().forEach(s -> new OpenAPISchema2JsonSchema().process(s));\n\n        SerializationMatchers.assertEqualsToYaml31(context.getDefinedModels(), \"AnnotatedPet:\\n\" +\n                \"  type:\\n\" +\n                \"  - object\\n\" +\n                \"  - \\\"null\\\"\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int64\\n\" +\n                \"    category:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Category\\\"\\n\" +\n                \"    name:\\n\" +\n                \"      type: string\\n\" +\n                \"    photoUrls:\\n\" +\n                \"      type: array\\n\" +\n                \"      xml:\\n\" +\n                \"        wrapped: true\\n\" +\n                \"      items:\\n\" +\n                \"        type: string\\n\" +\n                \"        xml:\\n\" +\n                \"          name: photoUrl\\n\" +\n                \"    tags:\\n\" +\n                \"      type: array\\n\" +\n                \"      xml:\\n\" +\n                \"        wrapped: true\\n\" +\n                \"      items:\\n\" +\n                \"        $ref: \\\"#/components/schemas/Tag\\\"\\n\" +\n                \"    status:\\n\" +\n                \"      type: string\\n\" +\n                \"      description: pet status in the store\\n\" +\n                \"      enum:\\n\" +\n                \"      - available\\n\" +\n                \"      - pending\\n\" +\n                \"      - sold\\n\" +\n                \"    anotherCategory:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Category\\\"\\n\" +\n                \"    anotherInteger:\\n\" +\n                \"      maximum: 10\\n\" +\n                \"      type: integer\\n\" +\n                \"      description: prop schema 1\\n\" +\n                \"      format: int32\\n\" +\n                \"  patternProperties:\\n\" +\n                \"    what.*ever:\\n\" +\n                \"      maximum: 10\\n\" +\n                \"      type: integer\\n\" +\n                \"      description: prop schema 1\\n\" +\n                \"      format: int32\\n\" +\n                \"    it.*takes:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Category\\\"\\n\" +\n                \"  description: Annotated Pet\\n\" +\n                \"Category:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int64\\n\" +\n                \"    name:\\n\" +\n                \"      type: string\\n\" +\n                \"  description: prop schema 2\\n\" +\n                \"  xml:\\n\" +\n                \"    name: Category\\n\" +\n                \"Tag:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    id:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int64\\n\" +\n                \"    name:\\n\" +\n                \"      type: string\\n\" +\n                \"  xml:\\n\" +\n                \"    name: Tag\\n\");\n    }\n\n    @Test\n    public void testSinglePatternAndSchemaProperties() throws Exception {\n\n        final ModelResolver modelResolver = new ModelResolver(mapper());\n\n        ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n\n        Schema model = context\n                .resolve(new AnnotatedType(AnnotatedPetSinglePatternProperty.class));\n\n        assertEquals(((Schema)model.getPatternProperties().get(\"what.*ever\")).getFormat(), \"int32\");\n        assertEquals(((Schema)model.getProperties().get(\"anotherCategory\")).get$ref(), \"#/components/schemas/Category\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/StreamWithArraySchemaTest.java",
    "content": "package io.swagger.v3.core.resolving.v31;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.resolving.SwaggerTestBase;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport org.testng.annotations.Test;\n\nimport java.util.stream.Stream;\n\nimport static org.testng.Assert.*;\n\n/**\n * Test for issue #5013: @ArraySchema applied on a stream property results in object type in OAS 3.1\n */\npublic class StreamWithArraySchemaTest extends SwaggerTestBase {\n\n    @Test\n    public void testStreamPropertyWithArraySchemaOAS31() {\n        ModelResolver resolver = new ModelResolver(mapper()).openapi31(true);\n        ModelConverterContextImpl context = new ModelConverterContextImpl(resolver);\n        \n        io.swagger.v3.oas.models.media.Schema model = resolver.resolve(\n            new AnnotatedType().type(ModelWithStream.class),\n            context,\n            null\n        );\n\n        assertNotNull(model);\n        io.swagger.v3.oas.models.media.Schema greetingsProperty = (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"greetings\");\n        \n        assertNotNull(greetingsProperty);\n        assertNotNull(greetingsProperty.getTypes());\n        assertTrue(greetingsProperty.getTypes().contains(\"array\"), \"Expected types to contain 'array' but got: \" + greetingsProperty.getTypes());\n        assertFalse(greetingsProperty.getTypes().contains(\"object\"));\n        \n        assertNotNull(greetingsProperty.getItems());\n        assertEquals(greetingsProperty.getItems().get$ref(), \"#/components/schemas/Greeting\");\n        \n        assertNull(greetingsProperty.getProperties());\n    }\n\n    @Test\n    public void testStreamPropertyWithoutArraySchemaOAS31() {\n        ModelResolver resolver = new ModelResolver(mapper()).openapi31(true);\n        ModelConverterContextImpl context = new ModelConverterContextImpl(resolver);\n        \n        io.swagger.v3.oas.models.media.Schema model = resolver.resolve(\n            new AnnotatedType().type(ModelWithStreamNoAnnotation.class),\n            context,\n            null\n        );\n        \n        assertNotNull(model);\n        io.swagger.v3.oas.models.media.Schema itemsProperty = (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"items\");\n        \n        assertNotNull(itemsProperty);\n        assertTrue(itemsProperty.getTypes().contains(\"object\"));\n        assertFalse(itemsProperty.getTypes() != null && itemsProperty.getTypes().contains(\"array\"));\n    }\n\n    @Test\n    public void testStreamPropertyWithoutArraySchemaOAS30() {\n        ModelResolver resolver = new ModelResolver(mapper()).openapi31(false);\n        ModelConverterContextImpl context = new ModelConverterContextImpl(resolver);\n        \n        io.swagger.v3.oas.models.media.Schema model = resolver.resolve(\n            new AnnotatedType().type(ModelWithStreamNoAnnotation.class),\n            context,\n            null\n        );\n        \n        assertNotNull(model);\n        io.swagger.v3.oas.models.media.Schema itemsProperty = (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"items\");\n        \n        assertNotNull(itemsProperty);\n        assertEquals(itemsProperty.getType(), \"object\");\n        assertNotEquals(itemsProperty.getType(), \"array\");\n    }\n\n    @Test\n    public void testStreamPropertyWithArraySchemaOAS30() {\n        ModelResolver resolver = new ModelResolver(mapper()).openapi31(false);\n        ModelConverterContextImpl context = new ModelConverterContextImpl(resolver);\n        \n        io.swagger.v3.oas.models.media.Schema model = resolver.resolve(\n            new AnnotatedType().type(ModelWithStream.class),\n            context,\n            null\n        );\n        \n        assertNotNull(model);\n        io.swagger.v3.oas.models.media.Schema greetingsProperty = (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"greetings\");\n        \n        assertNotNull(greetingsProperty);\n        assertEquals(greetingsProperty.getType(), \"array\");\n        assertNotNull(greetingsProperty.getItems());\n        assertEquals(greetingsProperty.getItems().get$ref(), \"#/components/schemas/Greeting\");\n        assertNull(greetingsProperty.getProperties());\n    }\n\n    @Test\n    public void testStreamPropertyWithDetailedAnnotations() {\n        ModelResolver resolver = new ModelResolver(mapper()).openapi31(true);\n        ModelConverterContextImpl context = new ModelConverterContextImpl(resolver);\n        \n        io.swagger.v3.oas.models.media.Schema model = resolver.resolve(\n            new AnnotatedType().type(ModelWithDetailedStreamAnnotations.class),\n            context,\n            null\n        );\n        \n        assertNotNull(model);\n        io.swagger.v3.oas.models.media.Schema greetingsProperty = (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"greetings\");\n\n        assertNotNull(greetingsProperty);\n        assertNotNull(greetingsProperty.getTypes());\n        assertTrue(greetingsProperty.getTypes().contains(\"array\"));\n        \n        assertNotNull(greetingsProperty.getItems());\n        assertEquals(greetingsProperty.getItems().get$ref(), \"#/components/schemas/Greeting\");\n        \n        assertEquals(greetingsProperty.getMinItems(), Integer.valueOf(1));\n        assertEquals(greetingsProperty.getMaxItems(), Integer.valueOf(10));\n        assertTrue(greetingsProperty.getUniqueItems());\n        \n        assertEquals(greetingsProperty.getDescription(), \"A collection of greetings\");\n    }\n\n    @Test\n    public void testListPropertyWithDetailedAnnotations() {\n        ModelResolver resolver = new ModelResolver(mapper()).openapi31(true);\n        ModelConverterContextImpl context = new ModelConverterContextImpl(resolver);\n        \n        io.swagger.v3.oas.models.media.Schema model = resolver.resolve(\n            new AnnotatedType().type(ModelWithDetailedListAnnotations.class),\n            context,\n            null\n        );\n\n        \n        assertNotNull(model);\n        io.swagger.v3.oas.models.media.Schema greetingsProperty = (io.swagger.v3.oas.models.media.Schema) model.getProperties().get(\"greetings\");\n\n        assertNotNull(greetingsProperty);\n    }\n\n    public static class ModelWithStream {\n        @ArraySchema(schema = @Schema(implementation = Greeting.class))\n        private Stream<Greeting> greetings;\n        \n        public Stream<Greeting> getGreetings() {\n            return greetings;\n        }\n        \n        public void setGreetings(Stream<Greeting> greetings) {\n            this.greetings = greetings;\n        }\n    }\n\n    public static class Greeting {\n        private String message;\n        \n        public String getMessage() {\n            return message;\n        }\n        \n        public void setMessage(String message) {\n            this.message = message;\n        }\n    }\n\n    public static class ModelWithStreamNoAnnotation {\n        private Stream<String> items;\n        \n        public Stream<String> getItems() {\n            return items;\n        }\n        \n        public void setItems(Stream<String> items) {\n            this.items = items;\n        }\n    }\n\n    public static class ModelWithDetailedStreamAnnotations {\n        @ArraySchema(\n            minItems = 1,\n            maxItems = 10,\n            uniqueItems = true,\n            arraySchema = @Schema(\n                description = \"A collection of greetings\",\n                example = \"[{\\\"message\\\": \\\"Hello\\\"}]\"\n            ),\n            schema = @Schema(implementation = Greeting.class)\n        )\n        private Stream<Greeting> greetings;\n        \n        public Stream<Greeting> getGreetings() {\n            return greetings;\n        }\n        \n        public void setGreetings(Stream<Greeting> greetings) {\n            this.greetings = greetings;\n        }\n    }\n\n    public static class ModelWithDetailedListAnnotations {\n        @ArraySchema(\n            minItems = 1,\n            maxItems = 10,\n            uniqueItems = true,\n            arraySchema = @Schema(\n                description = \"A collection of greetings\",\n                example = \"[{\\\"message\\\": \\\"Hello\\\"}]\"\n            ),\n            schema = @Schema(implementation = Greeting.class)\n        )\n        private java.util.List<Greeting> greetings;\n        \n        public java.util.List<Greeting> getGreetings() {\n            return greetings;\n        }\n        \n        public void setGreetings(java.util.List<Greeting> greetings) {\n            this.greetings = greetings;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/Ticket3900Test.java",
    "content": "package io.swagger.v3.core.resolving.v31;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.resolving.SwaggerTestBase;\nimport org.testng.annotations.Test;\n\npublic class Ticket3900Test extends SwaggerTestBase {\n\n    @Test\n    public void testArraySchemaItemsValidation() {\n        final ModelResolver modelResolver = new ModelResolver(mapper()).openapi31(true);\n        final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);\n        io.swagger.v3.oas.models.media.Schema model = context.resolve(new AnnotatedType(Route.class));\n        SerializationMatchers.assertEqualsToYaml31(model, \"type: object\\n\" +\n                \"properties:\\n\" +\n                \"  startPoint:\\n\" +\n                \"    $ref: '#/components/schemas/GeoPoint'\\n\" +\n                \"    description: Point where the route begins\\n\" +\n                \"  intermediatePoint:\\n\" +\n                \"    $ref: '#/components/schemas/GeoPoint'\\n\" +\n                \"    description: Intermediate point of the route\\n\" +\n                \"  endPoint:\\n\" +\n                \"    $ref: '#/components/schemas/GeoPoint'\\n\" +\n                \"    description: Point where the route ends\");\n    }\n\n    private static class GeoPoint {\n\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Longitude of geo point ( -180, 180 >\")\n        public double lon;\n\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Latitude of geo point < -90, 90 >\")\n        public double lat;\n    }\n\n    private static class Route {\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Point where the route begins\")\n        public GeoPoint startPoint;\n\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Intermediate point of the route\")\n        public GeoPoint intermediatePoint;\n\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Point where the route ends\")\n        public GeoPoint endPoint;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/Address.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.media.DependentRequired;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(\n        _if = Address.AnnotatedCountry.class,\n        then = PostalCodeNumberPattern.class,\n        _else = PostalCodePattern.class,\n        propertyNames = Address.PropertyNamesPattern.class,\n        dependentRequiredMap = {\n                @DependentRequired(\n                        name = \"street\",\n                        value = { \"country\" }\n                )\n        }\n)\npublic class Address {\n\n    private String street;\n    private CountryEnum country;\n\n    public enum CountryEnum {\n        UNITED_STATES_OF_AMERICA(\"United States of America\"),\n        CANADA(\"Canada\");\n\n        private String value;\n\n        CountryEnum(String value) {\n            this.value = value;\n        }\n\n        public String getValue() {\n            return value;\n        }\n\n        @Override\n        public String toString() {\n            return String.valueOf(value);\n        }\n\n        public static CountryEnum fromValue(String value) {\n            for (CountryEnum b : CountryEnum.values()) {\n                if (b.value.equals(value)) {\n                    return b;\n                }\n            }\n            return null;\n        }\n    }\n\n    public String getStreet() {\n        return street;\n    }\n\n    public void setStreet(String street) {\n        this.street = street;\n    }\n\n    public CountryEnum getCountry() {\n        return country;\n    }\n\n    public void setCountry(CountryEnum country) {\n        this.country = country;\n    }\n\n    class AnnotatedCountry {\n\n        private Object country;\n\n        @Schema(\n                _const = \"United States\",\n                type = \"string\"\n\n        )\n        public Object getCountry() {\n            return country;\n        }\n\n        public void setCountry(Object country) {\n            this.country = country;\n        }\n    }\n\n    @Schema(\n            pattern = \"^[A-Za-z_][A-Za-z0-9_]*$\"\n    )\n    class PropertyNamesPattern {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/AnnotatedArray.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@ArraySchema(\n        maxContains = 10,\n        minContains = 1,\n        contains = @Schema(\n                types = { \"string\" }\n        ),\n        unevaluatedItems = @Schema(\n                types = { \"number\" }\n        ),\n        schema = @Schema(\n                types = { \"string\" },\n                description = \"itemdescription\"\n        ),\n        arraySchema = @Schema(description = \"arraydescription\"),\n        prefixItems = {\n                @Schema(\n                        types = { \"string\" }\n                )\n        }\n)\npublic class AnnotatedArray {\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/AnnotatedArrayProperty.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport java.util.List;\n\npublic class AnnotatedArrayProperty {\n\n        private List<String> randomList;\n\n        @ArraySchema(\n                schema = @Schema(\n                        types = { \"string\" },\n                        description = \"itemdescription\",\n                        title = \"itemtitle\"\n\n                ),\n                arraySchema = @Schema(\n                        description = \"arraydescription\",\n                        title = \"arraytitle\",\n                        deprecated = true,\n                        accessMode = Schema.AccessMode.READ_ONLY,\n                        examples = \"John\"),\n                maxContains = 10,\n                minContains = 1,\n                contains = @Schema(\n                        types = \"string\"\n                ),\n                unevaluatedItems = @Schema(\n                        types = \"number\"\n                ),\n                prefixItems = {\n                        @Schema(\n                                description = \"prefixdescription\",\n                                types = \"string\"\n                        )\n                }\n        )\n        public List<String> getRandomList() {\n                return randomList;\n        }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/AnnotatedArrayPropertyReadWrite.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport java.util.List;\n\npublic class AnnotatedArrayPropertyReadWrite {\n\n    private List<String> randomList;\n\n    @ArraySchema(\n            schema = @Schema(\n                    types = { \"string\" },\n                    description = \"itemdescription\",\n                    title = \"itemtitle\"\n\n            ),\n            arraySchema = @Schema(\n                    description = \"arraydescription\",\n                    title = \"arraytitle\",\n                    accessMode = Schema.AccessMode.READ_WRITE,\n                    examples = \"Bob\"),\n            maxContains = 8,\n            minContains = 2\n    )\n    public List<String> getRandomList() {\n        return randomList;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/AnnotatedArrayPropertyWriteOnly.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport java.util.List;\n\npublic class AnnotatedArrayPropertyWriteOnly {\n\n    private List<String> randomList;\n\n    @ArraySchema(\n            schema = @Schema(\n                    types = { \"string\" },\n                    description = \"itemdescription\",\n                    title = \"itemtitle\"\n\n            ),\n            arraySchema = @Schema(\n                    description = \"arraydescription\",\n                    title = \"arraytitle\",\n                    accessMode = Schema.AccessMode.WRITE_ONLY,\n                    examples = \"Jane\"),\n            maxContains = 5,\n            minContains = 1\n    )\n    public List<String> getRandomList() {\n        return randomList;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/AnnotatedPet.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.media.PatternProperty;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.media.SchemaProperty;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlElementWrapper;\nimport java.util.ArrayList;\nimport java.util.List;\n\n@Schema(description = \"Annotated Pet\", nullable = true)\n@PatternProperty(\n        regex = \"what.*ever\",\n        schema = @Schema(\n                type = \"integer\",\n                description = \"prop schema 1\",\n                format = \"int32\",\n                maximum = \"10\"\n        )\n)\n@PatternProperty(\n        regex = \"it.*takes\",\n        schema = @Schema(\n                implementation = Category.class,\n                description = \"prop schema 2\"\n        )\n)\n@SchemaProperty(\n        name = \"anotherCategory\",\n        schema = @Schema(\n                implementation = Category.class,\n                description = \"prop schema 2\"\n        )\n)\n@SchemaProperty(\n        name = \"anotherInteger\",\n        schema = @Schema(\n                type = \"integer\",\n                description = \"prop schema 1\",\n                format = \"int32\",\n                maximum = \"10\"\n        )\n)\npublic class AnnotatedPet {\n    private long id;\n    private Category category;\n    private String name;\n    private List<String> photoUrls = new ArrayList<String>();\n    private List<Tag> tags = new ArrayList<Tag>();\n    private String status;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"category\")\n    public Category getCategory() {\n        return category;\n    }\n\n    public void setCategory(Category category) {\n        this.category = category;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    @XmlElementWrapper(name = \"photoUrls\")\n    @XmlElement(name = \"photoUrl\")\n    public List<String> getPhotoUrls() {\n        return photoUrls;\n    }\n\n    public void setPhotoUrls(List<String> photoUrls) {\n        this.photoUrls = photoUrls;\n    }\n\n    @XmlElementWrapper(name = \"tags\")\n    @XmlElement(name = \"tag\")\n    public List<Tag> getTags() {\n        return tags;\n    }\n\n    public void setTags(List<Tag> tags) {\n        this.tags = tags;\n    }\n\n    @XmlElement(name = \"status\")\n    @Schema(description = \"pet status in the store\", allowableValues = {\"available\", \"pending\", \"sold\"})\n    public String getStatus() {\n        return status;\n    }\n\n    public void setStatus(String status) {\n        this.status = status;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/AnnotatedPetSinglePatternProperty.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.media.PatternProperty;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.media.SchemaProperty;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlElementWrapper;\nimport java.util.ArrayList;\nimport java.util.List;\n\n@Schema(description = \"Annotated Pet\", nullable = true)\n@PatternProperty(\n        regex = \"what.*ever\",\n        schema = @Schema(\n                type = \"integer\",\n                description = \"prop schema 1\",\n                format = \"int32\",\n                maximum = \"10\"\n        )\n)\n@SchemaProperty(\n        name = \"anotherCategory\",\n        schema = @Schema(\n                implementation = Category.class,\n                description = \"prop schema 2\"\n        )\n)\npublic class AnnotatedPetSinglePatternProperty {\n    private long id;\n    private Category category;\n    private String name;\n    private List<String> photoUrls = new ArrayList<String>();\n    private List<Tag> tags = new ArrayList<Tag>();\n    private String status;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"category\")\n    public Category getCategory() {\n        return category;\n    }\n\n    public void setCategory(Category category) {\n        this.category = category;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    @XmlElementWrapper(name = \"photoUrls\")\n    @XmlElement(name = \"photoUrl\")\n    public List<String> getPhotoUrls() {\n        return photoUrls;\n    }\n\n    public void setPhotoUrls(List<String> photoUrls) {\n        this.photoUrls = photoUrls;\n    }\n\n    @XmlElementWrapper(name = \"tags\")\n    @XmlElement(name = \"tag\")\n    public List<Tag> getTags() {\n        return tags;\n    }\n\n    public void setTags(List<Tag> tags) {\n        this.tags = tags;\n    }\n\n    @XmlElement(name = \"status\")\n    @Schema(description = \"pet status in the store\", allowableValues = {\"available\", \"pending\", \"sold\"})\n    public String getStatus() {\n        return status;\n    }\n\n    public void setStatus(String status) {\n        this.status = status;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/Category.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Category\")\npublic class Category {\n    private long id;\n    private String name;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public Category() {\n    }\n\n    public Category(String name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/Client.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\npublic class Client {\n\n    private String name;\n    private int creditCard;\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public int getCreditCard() {\n        return creditCard;\n    }\n\n    public void setCreditCard(int creditCard) {\n        this.creditCard = creditCard;\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/CreditCard.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport java.util.Set;\n\npublic class CreditCard {\n\n    private String billingAddress;\n    private Set<Address.CountryEnum> acceptingCountries;\n    private Set<Currency> availableCurrencies;\n\n    public String getBillingAddress() {\n        return billingAddress;\n    }\n\n    public void setBillingAddress(String billingAddress) {\n        this.billingAddress = billingAddress;\n    }\n\n    @ArraySchema(schema = @Schema(description = \"accepting country\"))\n    public Set<Address.CountryEnum> getAcceptingCountries() {\n        return acceptingCountries;\n    }\n\n    public void setAcceptingCountries(Set<Address.CountryEnum> acceptingCountries) {\n        this.acceptingCountries = acceptingCountries;\n    }\n\n    @ArraySchema(schema = @Schema(description = \"available currencies\"))\n    public Set<Currency> getAvailableCurrencies() {\n        return availableCurrencies;\n    }\n\n    public void setAvailableCurrencies(Set<Currency> availableCurrencies) {\n        this.availableCurrencies = availableCurrencies;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/Currency.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\npublic class Currency {\n\n    private String currencyCode;\n\n    public String getCurrencyCode() {\n        return currencyCode;\n    }\n\n    public void setCurrencyCode(String currencyCode) {\n        this.currencyCode = currencyCode;\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/CustomGenerator.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport com.fasterxml.jackson.annotation.ObjectIdGenerator;\nimport com.fasterxml.jackson.annotation.ObjectIdGenerators;\n\npublic class CustomGenerator extends ObjectIdGenerators.PropertyGenerator {\n    private static final long serialVersionUID = 1L;\n\n    protected CustomGenerator(Class<?> scope) {\n        super(scope);\n    }\n\n    @Override\n    public ObjectIdGenerator<Object> forScope(Class<?> scope) {\n        return null;\n    }\n\n    @Override\n    public ObjectIdGenerator<Object> newForSerialization(Object context) {\n        return null;\n    }\n\n    @Override\n    public IdKey key(Object key) {\n        return null;\n    }\n\n    @Override\n    public Object generateId(Object forPojo) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/ExtensionUser.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.extensions.ExtensionProperty;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"User\")\n@Schema(\n        description = \"User\",\n        extensions = {\n                @Extension(name = \"x-user\", properties = {\n                        @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                @Extension(name = \"user-extensions\", properties = {\n                        @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                        @ExtensionProperty(name = \"address\", value = \"House\")})\n        }\n)\npublic class ExtensionUser {\n    private long id;\n    private String username;\n    private String firstName;\n    private String lastName;\n    private String email;\n    private String password;\n    private String phone;\n    private int userStatus;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"firstName\")\n    public String getFirstName() {\n        return firstName;\n    }\n\n    public void setFirstName(String firstName) {\n        this.firstName = firstName;\n    }\n\n    @XmlElement(name = \"username\")\n    public String getUsername() {\n        return username;\n    }\n\n    public void setUsername(String username) {\n        this.username = username;\n    }\n\n    @XmlElement(name = \"lastName\")\n    public String getLastName() {\n        return lastName;\n    }\n\n    public void setLastName(String lastName) {\n        this.lastName = lastName;\n    }\n\n    @XmlElement(name = \"email\")\n    public String getEmail() {\n        return email;\n    }\n\n    public void setEmail(String email) {\n        this.email = email;\n    }\n\n    @XmlElement(name = \"password\")\n    public String getPassword() {\n        return password;\n    }\n\n    public void setPassword(String password) {\n        this.password = password;\n    }\n\n    @XmlElement(name = \"phone\")\n    public String getPhone() {\n        return phone;\n    }\n\n    public void setPhone(String phone) {\n        this.phone = phone;\n    }\n\n    @XmlElement(name = \"userStatus\")\n    @Schema(\n            description = \"User Status\",\n            extensions = {\n                    @Extension(name = \"x-userStatus\", properties = {\n                            @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                    @Extension(name = \"userStatus-extensions\", properties = {\n                            @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                            @ExtensionProperty(name = \"address\", value = \"House\")})\n            }\n    )\n    public int getUserStatus() {\n        return userStatus;\n    }\n\n    public void setUserStatus(int userStatus) {\n        this.userStatus = userStatus;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/JacksonBean.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport com.fasterxml.jackson.annotation.JsonCreator;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonUnwrapped;\nimport com.fasterxml.jackson.annotation.JsonValue;\n\npublic class JacksonBean {\n\n    private String id;\n    private String ignored;\n    private StringValueBean bean;\n    private NotFoundModel model;\n    private NotFoundModel model2;\n\n    @JsonIgnore\n    public String getIgnored() {\n        return ignored;\n    }\n\n    public void setIgnored(String ignored) {\n        this.ignored = ignored;\n    }\n\n    public void setId(String id) {\n        this.id = id;\n    }\n\n    public void setModel(NotFoundModel model) {\n        this.model = model;\n    }\n\n    public StringValueBean getBean() {\n        return bean;\n    }\n\n    public void setBean(StringValueBean bean) {\n        this.bean = bean;\n    }\n\n    @JsonProperty(\"identity\")\n    public String getId() {\n        return id;\n    }\n\n    @JsonUnwrapped\n    public NotFoundModel getModel() {\n        return model;\n    }\n\n    @JsonUnwrapped(prefix = \"pre\", suffix = \"suf\")\n    public NotFoundModel getModel2() {\n        return model2;\n    }\n\n    public void setModel2(NotFoundModel model2) {\n        this.model2 = model2;\n    }\n\n    public static class StringValueBean {\n\n        private final String value;\n\n        @JsonCreator\n        public StringValueBean(String value) {\n            this.value = value;\n        }\n\n        @JsonValue\n        public String getValue() {\n            return value;\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/ListOfStringsBeanParam.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport javax.ws.rs.QueryParam;\nimport java.util.List;\n\npublic class ListOfStringsBeanParam {\n    @QueryParam(value = \"listOfStrings\")\n    private List<String> list;\n\n    public List<String> getList() {\n        return list;\n    }\n\n    public void setList(List<String> list) {\n        this.list = list;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/ModelWithDependentSchema.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.StringToClassMapItem;\nimport io.swagger.v3.oas.annotations.media.DependentSchema;\nimport io.swagger.v3.oas.annotations.media.DependentSchemas;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@DependentSchemas(\n        value = {\n                @DependentSchema(\n                        name = \"value\",\n                        schema = @Schema(\n                                properties = {\n                                        @StringToClassMapItem(\n                                                key = \"enable\",\n                                                value = ModelWithDependentSchema.BooleanFakeClass.class\n                                        )\n                                }\n                        )\n                )\n        }\n)\npublic class ModelWithDependentSchema {\n\n    private String name;\n    private int value;\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public int getValue() {\n        return value;\n    }\n\n    public void setValue(int value) {\n        this.value = value;\n    }\n\n    class BooleanFakeClass {\n        private boolean type;\n\n        public boolean isType() {\n            return type;\n        }\n\n        public void setType(boolean type) {\n            this.type = type;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/ModelWithJsonIdentity.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport com.fasterxml.jackson.annotation.JsonIdentityInfo;\nimport com.fasterxml.jackson.annotation.JsonIdentityReference;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.ObjectIdGenerators;\n\npublic class ModelWithJsonIdentity {\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"name\")\n    @JsonProperty(\"PropertyGeneratorAsId\")\n    public SourceDefinition1 testPropertyGeneratorAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"name\")\n    @JsonProperty(\"PropertyGeneratorAsProperty\")\n    public SourceDefinition1 testPropertyGeneratorAsProperty;\n\n    public class SourceDefinition1 {\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"driverId\")\n    @JsonProperty(\"ChangedPropertyName\")\n    public SourceDefinition2 testChangedPropertyName;\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"driverId\")\n    @JsonProperty(\"ChangedPropertyName2\")\n    public SourceDefinition2 testChangedPropertyName2;\n\n    static public class SourceDefinition2 {\n        @JsonProperty(\"driverId\")\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class)\n    @JsonProperty(\"SourceWithoutPropertyAsId\")\n    public SourceDefinition3 testWithoutPropertyAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class)\n    @JsonProperty(\"SourceWithoutPropertyAsProperty\")\n    public SourceDefinition3 testWithoutPropertyAsProperty;\n\n    public class SourceDefinition3 {\n        @JsonProperty(\"driverId\")\n        public String driver;\n        public String name;\n\n        @JsonProperty(\"@id\")\n        public String id;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = \"testName1\")\n    @JsonProperty(\"IntSequenceGeneratorAsId\")\n    public SourceDefinition4 testIntSequenceGeneratorAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = \"testName2\")\n    @JsonProperty(\"IntSequenceGeneratorAsProperty\")\n    public SourceDefinition4 testIntSequenceGeneratorAsProperty;\n\n    public class SourceDefinition4 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class)\n    @JsonProperty(\"IntSequenceWithoutPropertyAsId\")\n    public SourceDefinition5 testIntSequenceWithoutPropertyAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class)\n    @JsonProperty(\"IntSequenceWithoutPropertyAsProperty\")\n    public SourceDefinition5 testIntSequenceWithoutPropertyAsProperty;\n\n    public class SourceDefinition5 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = \"UUID1\")\n    @JsonProperty(\"UUIDGeneratorAsId\")\n    public SourceDefinition6 testUUIDGeneratorAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = \"UUID2\")\n    @JsonProperty(\"UUIDGeneratorAsProperty\")\n    public SourceDefinition6 testUUIDGeneratorAsProperty;\n\n    public class SourceDefinition6 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class)\n    @JsonProperty(\"UUIDGeneratorWithoutPropertyAsId\")\n    public SourceDefinition7 testUUIDGeneratorWithoutPropertyAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class)\n    @JsonProperty(\"UUIDGeneratorWithoutPropertyAsProperty\")\n    public SourceDefinition7 testUUIDGeneratorWithoutPropertyAsProperty;\n\n    public class SourceDefinition7 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.None.class, property = \"testGeneratorsNone\")\n    @JsonProperty(\"GeneratorsNone\")\n    public SourceDefinition8 testGeneratorsNone;\n\n    public class SourceDefinition8 {\n        @JsonProperty(\"driverId\")\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = CustomGenerator.class, property = \"name\")\n    @JsonProperty(\"CustomGenerator\")\n    public SourceDefinition9 testCustomGenerator;\n\n    public class SourceDefinition9 {\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityInfo(generator = CustomGenerator.class, property = \"name\")\n    @JsonProperty(\"WithoutJsonIdentityReference\")\n    public SourceDefinition10 testWithoutJsonIdentityReference;\n\n    public class SourceDefinition10 {\n        public String driver;\n        public String name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/ModelWithJsonIdentityCyclic.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport com.fasterxml.jackson.annotation.JsonIdentityInfo;\nimport com.fasterxml.jackson.annotation.JsonIdentityReference;\nimport com.fasterxml.jackson.annotation.ObjectIdGenerators;\n\nimport java.util.List;\n\npublic class ModelWithJsonIdentityCyclic {\n\n    public Long id;\n\n    public List<SourceDefinition> sourceDefinitions;\n\n    @JsonIdentityInfo(\n            generator = ObjectIdGenerators.PropertyGenerator.class,\n            property = \"name\")\n    public static class SourceDefinition {\n        public String driver;\n        public String name;\n\n        @JsonIdentityReference(alwaysAsId=true)\n        @JsonIdentityInfo(\n                generator = ObjectIdGenerators.PropertyGenerator.class,\n                property = \"id\")\n        public ModelWithJsonIdentityCyclic model;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/ModelWithOAS31Stuff.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.StringToClassMapItem;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport java.util.List;\n\n@Schema(\n        $id = \"http://yourdomain.com/schemas/myschema.json\",\n        description = \"this is model for testing OAS 3.1 resolving\",\n        $comment = \"Random comment at schema level\",\n        types = {\"object\"}\n)\npublic class ModelWithOAS31Stuff {\n\n    private List<String> randomList;\n    private Object status;\n    private int intValue;\n    private String text;\n    private String encodedString;\n    private Address address;\n    private Client client;\n\n    @ArraySchema(\n            schema = @Schema(\n                    types = { \"string\" },\n                    description = \"itemdescription\",\n                    title = \"itemtitle\"\n\n            ),\n            arraySchema = @Schema(description = \"arraydescription\", title = \"arraytitle\"),\n            maxContains = 10,\n            minContains = 1,\n            contains = @Schema(\n                    types = \"string\"\n            ),\n            unevaluatedItems = @Schema(\n                    types = \"number\"\n            ),\n            prefixItems = {\n                    @Schema(\n                            types = \"string\"\n                    )\n            }\n    )\n    public List<String> getRandomList() {\n        return randomList;\n    }\n\n    public void setRandomList(List<String> randomList) {\n        this.randomList = randomList;\n    }\n\n    @Schema(types = {\n            \"string\",\n            \"number\"\n    })\n    public Object getStatus() {\n        return status;\n    }\n\n    public void setStatus(Object status) {\n        this.status = status;\n    }\n\n    @Schema(\n            $anchor = \"intValue\",\n            $comment = \"comment at schema property level\",\n            exclusiveMaximumValue = 100,\n            exclusiveMinimumValue = 1\n    )\n    public int getIntValue() {\n        return intValue;\n    }\n\n    public void setIntValue(int intValue) {\n        this.intValue = intValue;\n    }\n\n    @Schema(\n            contentEncoding = \"plan/text\",\n            contentMediaType = \"base64\"\n    )\n    public String getText() {\n        return text;\n    }\n\n    public void setText(String text) {\n        this.text = text;\n    }\n\n    @Schema(\n            contentMediaType = \"application/jwt\",\n            contentSchema = MultipleBaseBean.class\n    )\n    public String getEncodedString() {\n        return encodedString;\n    }\n\n    public void setEncodedString(String encodedString) {\n        this.encodedString = encodedString;\n    }\n\n    public Address getAddress() {\n        return address;\n    }\n\n    public void setAddress(Address address) {\n        this.address = address;\n    }\n\n    @Schema(\n            dependentSchemas = {\n                    @StringToClassMapItem(\n                            key = \"creditCard\",\n                            value = CreditCard.class\n                    )\n            },\n            patternProperties = {\n                    @StringToClassMapItem(\n                            key = \"creditCard\",\n                            value = CreditCard.class\n                    )\n            },\n            properties = {\n                    @StringToClassMapItem(\n                            key = \"extraObject\",\n                            value = Object.class\n                    )\n            }\n    )\n    public Client getClient() {\n        return client;\n    }\n\n    public void setClient(Client client) {\n        this.client = client;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/ModelWithOAS31StuffMinimal.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.StringToClassMapItem;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport java.util.List;\n\n@Schema(\n        $id = \"http://yourdomain.com/schemas/myschema.json\",\n        description = \"this is model for testing OAS 3.1 resolving\",\n        $comment = \"Random comment at schema level\",\n        types = {\"object\"}\n)\npublic class ModelWithOAS31StuffMinimal {\n\n    private Addr address;\n\n    public Addr getAddress() {\n        return address;\n    }\n\n    public void setAddress(Addr address) {\n        this.address = address;\n    }\n    public static class Addr {\n        public String foo;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/MultipleBaseBean.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\n@io.swagger.v3.oas.annotations.media.Schema(\n        description = \"MultipleBaseBean\",\n        subTypes = { MultipleSub1Bean.class, MultipleSub2Bean.class }\n)\npublic class MultipleBaseBean {\n    public String beanType;\n    public int a;\n    public String b;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/MultipleSub1Bean.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\n@io.swagger.v3.oas.annotations.media.Schema(\n        description = \"MultipleSub1Bean\"\n)\npublic class MultipleSub1Bean extends MultipleBaseBean {\n    public int c;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/MultipleSub2Bean.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\n@io.swagger.v3.oas.annotations.media.Schema(\n        description = \"MultipleSub2Bean\"\n)\npublic class MultipleSub2Bean extends MultipleBaseBean {\n    public int d;\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/NotFoundModel.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\npublic class NotFoundModel {\n    int code;\n    String message;\n\n    public NotFoundModel() {\n    }\n\n    public NotFoundModel(int code, String message) {\n        this.code = code;\n        this.message = message;\n    }\n\n    public int getCode() {\n        return code;\n    }\n\n    public void setCode(int code) {\n        this.code = code;\n    }\n\n    public String getMessage() {\n        return message;\n    }\n\n    public void setMessage(String message) {\n        this.message = message;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/Pet.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlElementWrapper;\nimport javax.xml.bind.annotation.XmlRootElement;\nimport java.util.ArrayList;\nimport java.util.List;\n\n@XmlRootElement(name = \"Pet\")\npublic class Pet {\n    private long id;\n    private Category category;\n    private String name;\n    private List<String> photoUrls = new ArrayList<String>();\n    private List<Tag> tags = new ArrayList<Tag>();\n    private String status;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"category\")\n    public Category getCategory() {\n        return category;\n    }\n\n    public void setCategory(Category category) {\n        this.category = category;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    @XmlElementWrapper(name = \"photoUrls\")\n    @XmlElement(name = \"photoUrl\")\n    public List<String> getPhotoUrls() {\n        return photoUrls;\n    }\n\n    public void setPhotoUrls(List<String> photoUrls) {\n        this.photoUrls = photoUrls;\n    }\n\n    @XmlElementWrapper(name = \"tags\")\n    @XmlElement(name = \"tag\")\n    public List<Tag> getTags() {\n        return tags;\n    }\n\n    public void setTags(List<Tag> tags) {\n        this.tags = tags;\n    }\n\n    @XmlElement(name = \"status\")\n    @Schema(description = \"pet status in the store\", allowableValues = {\"available\", \"pending\", \"sold\"})\n    public String getStatus() {\n        return status;\n    }\n\n    public void setStatus(String status) {\n        this.status = status;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/PostalCodeNumberPattern.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n\npublic class PostalCodeNumberPattern {\n\n    private Object postalCode;\n\n    @Schema(\n            pattern = \"[0-9]{5}(-[0-9]{4})?\",\n            type = \"string\"\n    )\n    public Object getPostalCode() {\n        return postalCode;\n    }\n\n    public void setPostalCode(Object postalCode) {\n        this.postalCode = postalCode;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/PostalCodePattern.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class PostalCodePattern {\n\n    private Object postalCode;\n\n    @Schema(\n            pattern = \"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]\",\n            type = \"string\"\n    )\n    public Object getPostalCode() {\n        return postalCode;\n    }\n\n    public void setPostalCode(Object postalCode) {\n        this.postalCode = postalCode;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/Tag.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Tag\")\npublic class Tag {\n    private long id;\n    private String name;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/User.java",
    "content": "package io.swagger.v3.core.resolving.v31.model;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"User\")\npublic class User {\n    private long id;\n    private String username;\n    private String firstName;\n    private String lastName;\n    private String email;\n    private String password;\n    private String phone;\n    private int userStatus;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"firstName\")\n    public String getFirstName() {\n        return firstName;\n    }\n\n    public void setFirstName(String firstName) {\n        this.firstName = firstName;\n    }\n\n    @XmlElement(name = \"username\")\n    public String getUsername() {\n        return username;\n    }\n\n    public void setUsername(String username) {\n        this.username = username;\n    }\n\n    @XmlElement(name = \"lastName\")\n    public String getLastName() {\n        return lastName;\n    }\n\n    public void setLastName(String lastName) {\n        this.lastName = lastName;\n    }\n\n    @XmlElement(name = \"email\")\n    public String getEmail() {\n        return email;\n    }\n\n    public void setEmail(String email) {\n        this.email = email;\n    }\n\n    @XmlElement(name = \"password\")\n    public String getPassword() {\n        return password;\n    }\n\n    public void setPassword(String password) {\n        this.password = password;\n    }\n\n    @XmlElement(name = \"phone\")\n    public String getPhone() {\n        return phone;\n    }\n\n    public void setPhone(String phone) {\n        this.phone = phone;\n    }\n\n    @XmlElement(name = \"userStatus\")\n    @Schema(description = \"User Status\") //, allowableValues = {\"1\",\"2\",\"3\"})\n    public int getUserStatus() {\n        return userStatus;\n    }\n\n    public void setUserStatus(int userStatus) {\n        this.userStatus = userStatus;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/siblings/Category.java",
    "content": "package io.swagger.v3.core.resolving.v31.model.siblings;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(description = \"parent\")\npublic class Category {\n    private long id;\n\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/siblings/Pet.java",
    "content": "package io.swagger.v3.core.resolving.v31.model.siblings;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class Pet {\n    private Category category;\n\n    @Schema(description = \"child\")\n    public Category getCategory() {\n        return category;\n    }\n\n    public void setCategory(Category category) {\n        this.category = category;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/roundtrip/ComprehensiveRoundTripTest.java",
    "content": "package io.swagger.v3.core.roundtrip;\n\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.JsonAssert;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.core.util.ResourceUtils;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.core.util.Yaml31;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.Paths;\nimport io.swagger.v3.oas.models.examples.Example;\nimport io.swagger.v3.oas.models.info.Contact;\nimport io.swagger.v3.oas.models.info.Info;\nimport io.swagger.v3.oas.models.info.License;\nimport io.swagger.v3.oas.models.media.Discriminator;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertTrue;\n\n/**\n * Comprehensive tests for round-trip (serialization + deserialization) of OpenAPI 3.0 and 3.1 documents.\n * This test class covers various scenarios, edge cases, and combinations of OpenAPI elements.\n */\npublic class ComprehensiveRoundTripTest {\n\n    /**\n     * Test round-trip of OpenAPI 3.0 document with JSON\n     */\n    @Test\n    public void testRoundTrip30Json() throws IOException {\n        // Create a simple OpenAPI 3.0 document\n        OpenAPI originalOpenAPI = createBasicOpenAPI30();\n        \n        // Serialize to JSON\n        String json = Json.pretty(originalOpenAPI);\n        \n        // Deserialize back\n        OpenAPI deserializedOpenAPI = Json.mapper().readValue(json, OpenAPI.class);\n        \n        // Verify basic structure\n        assertNotNull(deserializedOpenAPI);\n        assertEquals(deserializedOpenAPI.getOpenapi(), \"3.0.1\");\n        assertEquals(deserializedOpenAPI.getInfo().getTitle(), \"Test API\");\n        assertEquals(deserializedOpenAPI.getInfo().getVersion(), \"1.0.0\");\n        \n        // Verify paths\n        assertNotNull(deserializedOpenAPI.getPaths());\n        assertTrue(deserializedOpenAPI.getPaths().containsKey(\"/test\"));\n        \n        // Verify components\n        assertNotNull(deserializedOpenAPI.getComponents());\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas());\n        assertTrue(deserializedOpenAPI.getComponents().getSchemas().containsKey(\"TestSchema\"));\n        \n        // Serialize again\n        String jsonAgain = Json.pretty(deserializedOpenAPI);\n        \n        // Compare JSON strings\n        JsonAssert.assertJsonEquals(Json.mapper(), json, jsonAgain, \"JSON round-trip failed\");\n    }\n    \n    /**\n     * Test round-trip of OpenAPI 3.0 document with YAML\n     */\n    @Test\n    public void testRoundTrip30Yaml() throws IOException {\n        // Create a simple OpenAPI 3.0 document\n        OpenAPI originalOpenAPI = createBasicOpenAPI30();\n        \n        // Serialize to YAML\n        String yaml = Yaml.pretty(originalOpenAPI);\n        \n        // Deserialize back\n        OpenAPI deserializedOpenAPI = Yaml.mapper().readValue(yaml, OpenAPI.class);\n        \n        // Verify basic structure\n        assertNotNull(deserializedOpenAPI);\n        assertEquals(deserializedOpenAPI.getOpenapi(), \"3.0.1\");\n        assertEquals(deserializedOpenAPI.getInfo().getTitle(), \"Test API\");\n        assertEquals(deserializedOpenAPI.getInfo().getVersion(), \"1.0.0\");\n        \n        // Verify paths\n        assertNotNull(deserializedOpenAPI.getPaths());\n        assertTrue(deserializedOpenAPI.getPaths().containsKey(\"/test\"));\n        \n        // Verify components\n        assertNotNull(deserializedOpenAPI.getComponents());\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas());\n        assertTrue(deserializedOpenAPI.getComponents().getSchemas().containsKey(\"TestSchema\"));\n        \n        // Serialize again\n        String yamlAgain = Yaml.pretty(deserializedOpenAPI);\n        \n        // Compare YAML strings\n        JsonAssert.assertJsonEquals(Yaml.mapper(), yaml, yamlAgain, \"YAML round-trip failed\");\n    }\n    \n    /**\n     * Test round-trip of OpenAPI 3.1 document with JSON\n     */\n    @Test\n    public void testRoundTrip31Json() throws IOException {\n        // Create a simple OpenAPI 3.1 document\n        OpenAPI originalOpenAPI = createBasicOpenAPI31();\n        \n        // Serialize to JSON\n        String json = Json31.pretty(originalOpenAPI);\n        \n        // Deserialize back\n        OpenAPI deserializedOpenAPI = Json31.mapper().readValue(json, OpenAPI.class);\n        \n        // Verify basic structure\n        assertNotNull(deserializedOpenAPI);\n        assertEquals(deserializedOpenAPI.getOpenapi(), \"3.1.0\");\n        assertEquals(deserializedOpenAPI.getInfo().getTitle(), \"Test API\");\n        assertEquals(deserializedOpenAPI.getInfo().getVersion(), \"1.0.0\");\n        assertEquals(deserializedOpenAPI.getInfo().getSummary(), \"Test API Summary\");\n        assertEquals(deserializedOpenAPI.getInfo().getLicense().getIdentifier(), \"MIT\");\n        \n        // Verify paths\n        assertNotNull(deserializedOpenAPI.getPaths());\n        assertTrue(deserializedOpenAPI.getPaths().containsKey(\"/test\"));\n        \n        // Verify components\n        assertNotNull(deserializedOpenAPI.getComponents());\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas());\n        assertTrue(deserializedOpenAPI.getComponents().getSchemas().containsKey(\"TestSchema\"));\n        \n        // Verify webhooks\n        assertNotNull(deserializedOpenAPI.getWebhooks());\n        assertTrue(deserializedOpenAPI.getWebhooks().containsKey(\"testWebhook\"));\n        \n        // Serialize again\n        String jsonAgain = Json31.pretty(deserializedOpenAPI);\n        \n        // Compare JSON strings\n        JsonAssert.assertJsonEquals(Json31.mapper(), json, jsonAgain, \"JSON round-trip failed\");\n    }\n    \n    /**\n     * Test round-trip of OpenAPI 3.1 document with YAML\n     */\n    @Test\n    public void testRoundTrip31Yaml() throws IOException {\n        // Create a simple OpenAPI 3.1 document\n        OpenAPI originalOpenAPI = createBasicOpenAPI31();\n        \n        // Serialize to YAML\n        String yaml = Yaml31.pretty(originalOpenAPI);\n        \n        // Deserialize back\n        OpenAPI deserializedOpenAPI = Yaml31.mapper().readValue(yaml, OpenAPI.class);\n        \n        // Verify basic structure\n        assertNotNull(deserializedOpenAPI);\n        assertEquals(deserializedOpenAPI.getOpenapi(), \"3.1.0\");\n        assertEquals(deserializedOpenAPI.getInfo().getTitle(), \"Test API\");\n        assertEquals(deserializedOpenAPI.getInfo().getVersion(), \"1.0.0\");\n        assertEquals(deserializedOpenAPI.getInfo().getSummary(), \"Test API Summary\");\n        assertEquals(deserializedOpenAPI.getInfo().getLicense().getIdentifier(), \"MIT\");\n        \n        // Verify paths\n        assertNotNull(deserializedOpenAPI.getPaths());\n        assertTrue(deserializedOpenAPI.getPaths().containsKey(\"/test\"));\n        \n        // Verify components\n        assertNotNull(deserializedOpenAPI.getComponents());\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas());\n        assertTrue(deserializedOpenAPI.getComponents().getSchemas().containsKey(\"TestSchema\"));\n        \n        // Verify webhooks\n        assertNotNull(deserializedOpenAPI.getWebhooks());\n        assertTrue(deserializedOpenAPI.getWebhooks().containsKey(\"testWebhook\"));\n        \n        // Serialize again\n        String yamlAgain = Yaml31.pretty(deserializedOpenAPI);\n        \n        // Compare YAML strings\n        JsonAssert.assertJsonEquals(Yaml31.mapper(), yaml, yamlAgain, \"YAML round-trip failed\");\n    }\n    \n    /**\n     * Test round-trip of OpenAPI 3.1 document with complex structures\n     */\n    @Test\n    public void testComplexRoundTrip31() throws IOException {\n        // Create an OpenAPI 3.1 document with complex structures\n        OpenAPI originalOpenAPI = createComplexOpenAPI31();\n        \n        // Serialize to JSON\n        String json = Json31.pretty(originalOpenAPI);\n        \n        // Deserialize back\n        OpenAPI deserializedOpenAPI = Json31.mapper().readValue(json, OpenAPI.class);\n        \n        // Verify complex structures\n        \n        // Verify discriminator extensions\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas().get(\"TestSchema\").getDiscriminator());\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas().get(\"TestSchema\").getDiscriminator().getExtensions());\n        assertEquals(deserializedOpenAPI.getComponents().getSchemas().get(\"TestSchema\").getDiscriminator().getExtensions().get(\"x-test-extension\"), \"test-value\");\n        \n        // Verify component path items\n        assertNotNull(deserializedOpenAPI.getComponents().getPathItems());\n        assertTrue(deserializedOpenAPI.getComponents().getPathItems().containsKey(\"/testPathItem\"));\n        assertEquals(deserializedOpenAPI.getComponents().getPathItems().get(\"/testPathItem\").getDescription(), \"Test path item\");\n        assertEquals(deserializedOpenAPI.getComponents().getPathItems().get(\"/testPathItem\").getSummary(), \"Test path item summary\");\n        assertNotNull(deserializedOpenAPI.getComponents().getPathItems().get(\"/testPathItem\").getGet());\n        assertEquals(deserializedOpenAPI.getComponents().getPathItems().get(\"/testPathItem\").getGet().getOperationId(), \"getTest\");\n        \n        // Verify path item refs and siblings\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/refTest\").get$ref(), \"#/components/pathItems/testPathItem\");\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/refTest\").getDescription(), \"Ref path item description\");\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/refTest\").getSummary(), \"Ref path item summary\");\n        \n        // Verify parameter refs and siblings\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/test\").getGet().getParameters().get(0).get$ref(), \"#/components/parameters/testParameter\");\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/test\").getGet().getParameters().get(0).getDescription(), \"Ref parameter description\");\n        \n        // Verify example refs and siblings\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/test\").getGet().getParameters().get(1).getName(), \"testParam\");\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/test\").getGet().getParameters().get(1).getIn(), \"query\");\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/test\").getGet().getParameters().get(1).getExamples().get(\"refExample\").get$ref(), \"#/components/examples/testExample\");\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/test\").getGet().getParameters().get(1).getExamples().get(\"refExample\").getSummary(), \"Ref example summary\");\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/test\").getGet().getParameters().get(1).getExamples().get(\"refExample\").getDescription(), \"Ref example description\");\n        \n        // Serialize again\n        String jsonAgain = Json31.pretty(deserializedOpenAPI);\n        \n        // Compare JSON strings\n        JsonAssert.assertJsonEquals(Json31.mapper(), json, jsonAgain, \"JSON round-trip failed\");\n    }\n    \n    /**\n     * Test round-trip of OpenAPI 3.1 document with boolean schema\n     */\n    @Test\n    public void testBooleanSchemaRoundTrip() throws IOException {\n        // Create an OpenAPI 3.1 document with boolean schema\n        OpenAPI originalOpenAPI = createBasicOpenAPI31();\n        \n        // Add boolean schema\n        Schema booleanSchema = new Schema().booleanSchemaValue(true);\n        originalOpenAPI.getComponents().getSchemas().put(\"BooleanSchema\", booleanSchema);\n        \n        // Serialize to JSON\n        String json = Json31.pretty(originalOpenAPI);\n        \n        // Deserialize back\n        OpenAPI deserializedOpenAPI = Json31.mapper().readValue(json, OpenAPI.class);\n        \n        // Verify boolean schema\n        assertTrue(Boolean.TRUE.equals(deserializedOpenAPI.getComponents().getSchemas().get(\"BooleanSchema\").getBooleanSchemaValue()));\n        \n        // Verify that the schema is serialized as a boolean value\n        ObjectMapper mapper = new ObjectMapper();\n        JsonNode jsonNode = mapper.readTree(json);\n        assertTrue(jsonNode.get(\"components\").get(\"schemas\").get(\"BooleanSchema\").isBoolean());\n        assertTrue(jsonNode.get(\"components\").get(\"schemas\").get(\"BooleanSchema\").asBoolean());\n        \n        // Serialize again\n        String jsonAgain = Json31.pretty(deserializedOpenAPI);\n        \n        // Compare JSON strings\n        JsonAssert.assertJsonEquals(Json.mapper(), json, jsonAgain, \"JSON round-trip failed\");\n    }\n    \n    /**\n     * Test round-trip of OpenAPI 3.1 document with null values\n     */\n    @Test\n    public void testNullValuesRoundTrip() throws IOException {\n        // Create an OpenAPI 3.1 document with null values\n        OpenAPI originalOpenAPI = createBasicOpenAPI31();\n        \n        // Add schema with null example\n        Schema schema = originalOpenAPI.getComponents().getSchemas().get(\"TestSchema\");\n        schema.setExample(null);\n        schema.setExampleSetFlag(true);\n        \n        // Serialize to JSON\n        String json = Json31.pretty(originalOpenAPI);\n        \n        // Deserialize back\n        OpenAPI deserializedOpenAPI = Json31.mapper().readValue(json, OpenAPI.class);\n        \n        // Verify null values\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas().get(\"TestSchema\"));\n        assertEquals(deserializedOpenAPI.getComponents().getSchemas().get(\"TestSchema\").getExample(), null);\n        assertTrue(deserializedOpenAPI.getComponents().getSchemas().get(\"TestSchema\").getExampleSetFlag());\n        \n        // Serialize again\n        String jsonAgain = Json31.pretty(deserializedOpenAPI);\n        \n        // Compare JSON strings\n        JsonAssert.assertJsonEquals(Json.mapper(), json, jsonAgain, \"JSON round-trip failed\");\n    }\n    \n    /**\n     * Test round-trip of real-world OpenAPI 3.1 document\n     */\n    @Test\n    public void testRealWorldRoundTrip31() throws IOException {\n        // Load a real-world OpenAPI 3.1 document\n        final String yaml = ResourceUtils.loadClassResource(getClass(), \"specFiles/3.1.0/petstore-3.1_sample.yaml\");\n        final OpenAPI originalOpenAPI = Yaml31.mapper().readValue(yaml, OpenAPI.class);\n        \n        // Serialize to YAML\n        String serializedYaml = Yaml31.pretty(originalOpenAPI);\n        \n        // Deserialize back\n        OpenAPI deserializedOpenAPI = Yaml31.mapper().readValue(serializedYaml, OpenAPI.class);\n        \n        // Verify basic structure\n        assertNotNull(deserializedOpenAPI);\n        assertEquals(deserializedOpenAPI.getOpenapi(), \"3.1.0\");\n        assertEquals(deserializedOpenAPI.getInfo().getTitle(), \"Swagger Petstore\");\n        assertEquals(deserializedOpenAPI.getInfo().getVersion(), \"1.0.0\");\n        assertEquals(deserializedOpenAPI.getInfo().getSummary(), \"petstore sample for OAS 3.1.0\");\n        assertEquals(deserializedOpenAPI.getInfo().getLicense().getName(), \"MIT\");\n        assertEquals(deserializedOpenAPI.getInfo().getLicense().getIdentifier(), \"test\");\n        \n        // Verify webhooks\n        assertNotNull(deserializedOpenAPI.getWebhooks());\n        assertNotNull(deserializedOpenAPI.getWebhooks().get(\"newPet\"));\n        assertNotNull(deserializedOpenAPI.getWebhooks().get(\"newPet\").getPost());\n        \n        // Verify component path items\n        assertNotNull(deserializedOpenAPI.getComponents().getPathItems());\n        assertNotNull(deserializedOpenAPI.getComponents().getPathItems().get(\"/pet\"));\n        assertEquals(deserializedOpenAPI.getComponents().getPathItems().get(\"/pet\").getDescription(), \"get a pet\");\n        assertNotNull(deserializedOpenAPI.getComponents().getPathItems().get(\"/pet\").getGet());\n        assertEquals(deserializedOpenAPI.getComponents().getPathItems().get(\"/pet\").getGet().getOperationId(), \"getPet\");\n        \n        // Serialize again\n        String yamlAgain = Yaml31.pretty(deserializedOpenAPI);\n        \n        // Compare YAML strings (normalize whitespace)\n        JsonAssert.assertJsonEquals(Yaml31.mapper(), serializedYaml, yamlAgain, \"YAML round-trip failed\");\n    }\n    \n    /**\n     * Helper method to create a basic OpenAPI 3.0 document\n     */\n    private OpenAPI createBasicOpenAPI30() {\n        OpenAPI openAPI = new OpenAPI();\n        openAPI.setOpenapi(\"3.0.1\");\n        \n        // Add info\n        Info info = new Info()\n                .title(\"Test API\")\n                .version(\"1.0.0\")\n                .description(\"Test API Description\")\n                .contact(new Contact().name(\"Test Contact\").email(\"test@example.com\"))\n                .license(new License().name(\"MIT\"));\n        openAPI.setInfo(info);\n        \n        // Add paths\n        Paths paths = new Paths();\n        PathItem pathItem = new PathItem();\n        \n        // Add GET operation\n        Operation getOperation = new Operation()\n                .operationId(\"getTest\")\n                .summary(\"Get Test\")\n                .description(\"Get Test Description\");\n        \n        // Add responses\n        ApiResponses responses = new ApiResponses();\n        ApiResponse response = new ApiResponse()\n                .description(\"Successful response\");\n        responses.addApiResponse(\"200\", response);\n        getOperation.setResponses(responses);\n        \n        pathItem.setGet(getOperation);\n        paths.addPathItem(\"/test\", pathItem);\n        openAPI.setPaths(paths);\n        \n        // Add components\n        Components components = new Components();\n        Schema schema = new Schema()\n                .type(\"object\")\n                .title(\"TestSchema\")\n                .description(\"Test Schema Description\");\n        components.addSchemas(\"TestSchema\", schema);\n        openAPI.setComponents(components);\n        \n        return openAPI;\n    }\n    \n    /**\n     * Helper method to create a basic OpenAPI 3.1 document\n     */\n    private OpenAPI createBasicOpenAPI31() {\n        OpenAPI openAPI = new OpenAPI();\n        openAPI.setOpenapi(\"3.1.0\");\n        \n        // Add info\n        Info info = new Info()\n                .title(\"Test API\")\n                .version(\"1.0.0\")\n                .description(\"Test API Description\")\n                .summary(\"Test API Summary\")\n                .contact(new Contact().name(\"Test Contact\").email(\"test@example.com\"))\n                .license(new License().name(\"MIT\").identifier(\"MIT\"));\n        openAPI.setInfo(info);\n        \n        // Add paths\n        Paths paths = new Paths();\n        PathItem pathItem = new PathItem();\n        \n        // Add GET operation\n        Operation getOperation = new Operation()\n                .operationId(\"getTest\")\n                .summary(\"Get Test\")\n                .description(\"Get Test Description\");\n        \n        // Add responses\n        ApiResponses responses = new ApiResponses();\n        ApiResponse response = new ApiResponse()\n                .description(\"Successful response\");\n        responses.addApiResponse(\"200\", response);\n        getOperation.setResponses(responses);\n        \n        pathItem.setGet(getOperation);\n        paths.addPathItem(\"/test\", pathItem);\n        openAPI.setPaths(paths);\n        \n        // Add components\n        Components components = new Components();\n        Schema schema = new Schema()\n                .type(\"object\")\n                .title(\"TestSchema\")\n                .description(\"Test Schema Description\");\n        components.addSchemas(\"TestSchema\", schema);\n        openAPI.setComponents(components);\n        \n        // Add webhooks\n        Map<String, PathItem> webhooks = new HashMap<>();\n        PathItem webhookPathItem = new PathItem();\n        Operation postOperation = new Operation()\n                .operationId(\"postWebhook\")\n                .summary(\"Post Webhook\")\n                .description(\"Post Webhook Description\");\n        webhookPathItem.setPost(postOperation);\n        webhooks.put(\"testWebhook\", webhookPathItem);\n        openAPI.setWebhooks(webhooks);\n        \n        return openAPI;\n    }\n    \n    /**\n     * Helper method to create a complex OpenAPI 3.1 document\n     */\n    private OpenAPI createComplexOpenAPI31() {\n        OpenAPI openAPI = createBasicOpenAPI31();\n        \n        // Add discriminator with extensions\n        Schema schema = openAPI.getComponents().getSchemas().get(\"TestSchema\");\n        Discriminator discriminator = new Discriminator().propertyName(\"type\");\n        Map<String, Object> extensions = new HashMap<>();\n        extensions.put(\"x-test-extension\", \"test-value\");\n        discriminator.setExtensions(extensions);\n        schema.setDiscriminator(discriminator);\n        \n        // Add component path items\n        PathItem pathItem = new PathItem()\n                .description(\"Test path item\")\n                .summary(\"Test path item summary\");\n        pathItem.setGet(new Operation().operationId(\"getTest\"));\n        \n        openAPI.getComponents().pathItems(new HashMap<>());\n        openAPI.getComponents().getPathItems().put(\"/testPathItem\", pathItem);\n        \n        // Add path with reference and siblings\n        PathItem refPathItem = new PathItem()\n                .$ref(\"#/components/pathItems/testPathItem\")\n                .description(\"Ref path item description\")\n                .summary(\"Ref path item summary\");\n        openAPI.getPaths().put(\"/refTest\", refPathItem);\n        \n        // Add component parameters\n        Parameter parameter = new Parameter()\n                .name(\"testParam\")\n                .in(\"query\")\n                .description(\"Test parameter\");\n        \n        openAPI.getComponents().parameters(new HashMap<>());\n        openAPI.getComponents().getParameters().put(\"testParameter\", parameter);\n        \n        // Add operation with parameter reference and siblings\n        Parameter refParameter = new Parameter()\n                .$ref(\"#/components/parameters/testParameter\")\n                .description(\"Ref parameter description\");\n        \n        openAPI.getPaths().get(\"/test\").getGet().addParametersItem(refParameter);\n        \n        // Add component examples\n        Example example = new Example()\n                .summary(\"Test example summary\")\n                .description(\"Test example description\")\n                .value(\"Test example value\");\n        \n        openAPI.getComponents().examples(new HashMap<>());\n        openAPI.getComponents().getExamples().put(\"testExample\", example);\n        \n        // Add parameter with example reference and siblings\n        Parameter paramWithExample = new Parameter()\n                .name(\"testParam\")\n                .in(\"query\")\n                .description(\"Test parameter\");\n        \n        Example refExample = new Example()\n                .$ref(\"#/components/examples/testExample\")\n                .summary(\"Ref example summary\")\n                .description(\"Ref example description\");\n        \n        paramWithExample.examples(new HashMap<>());\n        paramWithExample.getExamples().put(\"refExample\", refExample);\n        \n        openAPI.getPaths().get(\"/test\").getGet().addParametersItem(paramWithExample);\n        \n        return openAPI;\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/serialization/ComprehensiveSerializationTest.java",
    "content": "package io.swagger.v3.core.serialization;\n\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.core.util.Yaml31;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.Paths;\nimport io.swagger.v3.oas.models.info.Contact;\nimport io.swagger.v3.oas.models.info.Info;\nimport io.swagger.v3.oas.models.info.License;\nimport io.swagger.v3.oas.models.media.Discriminator;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.examples.Example;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertTrue;\n\n/**\n * Comprehensive tests for serialization of OpenAPI 3.0 and 3.1 documents.\n * This test class covers various scenarios, edge cases, and combinations of OpenAPI elements.\n */\npublic class ComprehensiveSerializationTest {\n\n    /**\n     * Test basic serialization of OpenAPI 3.0 document to JSON\n     */\n    @Test\n    public void testBasicSerialization30Json() throws IOException {\n        // Create a simple OpenAPI 3.0 document\n        OpenAPI openAPI = createBasicOpenAPI30();\n        \n        // Serialize to JSON\n        String json = Json.pretty(openAPI);\n        \n        // Deserialize back to verify\n        OpenAPI deserializedOpenAPI = Json.mapper().readValue(json, OpenAPI.class);\n        \n        // Verify basic structure\n        assertNotNull(deserializedOpenAPI);\n        assertEquals(deserializedOpenAPI.getOpenapi(), \"3.0.1\");\n        assertEquals(deserializedOpenAPI.getInfo().getTitle(), \"Test API\");\n        assertEquals(deserializedOpenAPI.getInfo().getVersion(), \"1.0.0\");\n        \n        // Verify paths\n        assertNotNull(deserializedOpenAPI.getPaths());\n        assertTrue(deserializedOpenAPI.getPaths().containsKey(\"/test\"));\n        \n        // Verify components\n        assertNotNull(deserializedOpenAPI.getComponents());\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas());\n        assertTrue(deserializedOpenAPI.getComponents().getSchemas().containsKey(\"TestSchema\"));\n    }\n    \n    /**\n     * Test basic serialization of OpenAPI 3.0 document to YAML\n     */\n    @Test\n    public void testBasicSerialization30Yaml() throws IOException {\n        // Create a simple OpenAPI 3.0 document\n        OpenAPI openAPI = createBasicOpenAPI30();\n        \n        // Serialize to YAML\n        String yaml = Yaml.pretty(openAPI);\n        \n        // Deserialize back to verify\n        OpenAPI deserializedOpenAPI = Yaml.mapper().readValue(yaml, OpenAPI.class);\n        \n        // Verify basic structure\n        assertNotNull(deserializedOpenAPI);\n        assertEquals(deserializedOpenAPI.getOpenapi(), \"3.0.1\");\n        assertEquals(deserializedOpenAPI.getInfo().getTitle(), \"Test API\");\n        assertEquals(deserializedOpenAPI.getInfo().getVersion(), \"1.0.0\");\n        \n        // Verify paths\n        assertNotNull(deserializedOpenAPI.getPaths());\n        assertTrue(deserializedOpenAPI.getPaths().containsKey(\"/test\"));\n        \n        // Verify components\n        assertNotNull(deserializedOpenAPI.getComponents());\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas());\n        assertTrue(deserializedOpenAPI.getComponents().getSchemas().containsKey(\"TestSchema\"));\n    }\n    \n    /**\n     * Test basic serialization of OpenAPI 3.1 document to JSON\n     */\n    @Test\n    public void testBasicSerialization31Json() throws IOException {\n        // Create a simple OpenAPI 3.1 document\n        OpenAPI openAPI = createBasicOpenAPI31();\n        \n        // Serialize to JSON\n        String json = Json31.pretty(openAPI);\n        \n        // Deserialize back to verify\n        OpenAPI deserializedOpenAPI = Json31.mapper().readValue(json, OpenAPI.class);\n        \n        // Verify basic structure\n        assertNotNull(deserializedOpenAPI);\n        assertEquals(deserializedOpenAPI.getOpenapi(), \"3.1.0\");\n        assertEquals(deserializedOpenAPI.getInfo().getTitle(), \"Test API\");\n        assertEquals(deserializedOpenAPI.getInfo().getVersion(), \"1.0.0\");\n        assertEquals(deserializedOpenAPI.getInfo().getSummary(), \"Test API Summary\");\n        assertEquals(deserializedOpenAPI.getInfo().getLicense().getIdentifier(), \"MIT\");\n        \n        // Verify paths\n        assertNotNull(deserializedOpenAPI.getPaths());\n        assertTrue(deserializedOpenAPI.getPaths().containsKey(\"/test\"));\n        \n        // Verify components\n        assertNotNull(deserializedOpenAPI.getComponents());\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas());\n        assertTrue(deserializedOpenAPI.getComponents().getSchemas().containsKey(\"TestSchema\"));\n        \n        // Verify webhooks\n        assertNotNull(deserializedOpenAPI.getWebhooks());\n        assertTrue(deserializedOpenAPI.getWebhooks().containsKey(\"testWebhook\"));\n    }\n    \n    /**\n     * Test basic serialization of OpenAPI 3.1 document to YAML\n     */\n    @Test\n    public void testBasicSerialization31Yaml() throws IOException {\n        // Create a simple OpenAPI 3.1 document\n        OpenAPI openAPI = createBasicOpenAPI31();\n        \n        // Serialize to YAML\n        String yaml = Yaml31.pretty(openAPI);\n        \n        // Deserialize back to verify\n        OpenAPI deserializedOpenAPI = Yaml31.mapper().readValue(yaml, OpenAPI.class);\n        \n        // Verify basic structure\n        assertNotNull(deserializedOpenAPI);\n        assertEquals(deserializedOpenAPI.getOpenapi(), \"3.1.0\");\n        assertEquals(deserializedOpenAPI.getInfo().getTitle(), \"Test API\");\n        assertEquals(deserializedOpenAPI.getInfo().getVersion(), \"1.0.0\");\n        assertEquals(deserializedOpenAPI.getInfo().getSummary(), \"Test API Summary\");\n        assertEquals(deserializedOpenAPI.getInfo().getLicense().getIdentifier(), \"MIT\");\n        \n        // Verify paths\n        assertNotNull(deserializedOpenAPI.getPaths());\n        assertTrue(deserializedOpenAPI.getPaths().containsKey(\"/test\"));\n        \n        // Verify components\n        assertNotNull(deserializedOpenAPI.getComponents());\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas());\n        assertTrue(deserializedOpenAPI.getComponents().getSchemas().containsKey(\"TestSchema\"));\n        \n        // Verify webhooks\n        assertNotNull(deserializedOpenAPI.getWebhooks());\n        assertTrue(deserializedOpenAPI.getWebhooks().containsKey(\"testWebhook\"));\n    }\n    \n    /**\n     * Test serialization of OpenAPI 3.1 document with component path items\n     */\n    @Test\n    public void testComponentPathItemsSerialization() throws IOException {\n        // Create an OpenAPI 3.1 document with component path items\n        OpenAPI openAPI = createBasicOpenAPI31();\n        \n        // Add component path items\n        PathItem pathItem = new PathItem()\n                .description(\"Test path item\")\n                .summary(\"Test path item summary\");\n        pathItem.setGet(new Operation().operationId(\"getTest\"));\n        \n        openAPI.getComponents().pathItems(new HashMap<>());\n        openAPI.getComponents().getPathItems().put(\"/testPathItem\", pathItem);\n        \n        // Serialize to JSON\n        String json = Json31.pretty(openAPI);\n        \n        // Deserialize back to verify\n        OpenAPI deserializedOpenAPI = Json31.mapper().readValue(json, OpenAPI.class);\n        \n        // Verify component path items\n        assertNotNull(deserializedOpenAPI.getComponents().getPathItems());\n        assertTrue(deserializedOpenAPI.getComponents().getPathItems().containsKey(\"/testPathItem\"));\n        assertEquals(deserializedOpenAPI.getComponents().getPathItems().get(\"/testPathItem\").getDescription(), \"Test path item\");\n        assertEquals(deserializedOpenAPI.getComponents().getPathItems().get(\"/testPathItem\").getSummary(), \"Test path item summary\");\n        assertNotNull(deserializedOpenAPI.getComponents().getPathItems().get(\"/testPathItem\").getGet());\n        assertEquals(deserializedOpenAPI.getComponents().getPathItems().get(\"/testPathItem\").getGet().getOperationId(), \"getTest\");\n    }\n    \n    /**\n     * Test serialization of OpenAPI 3.1 document with discriminator extensions\n     */\n    @Test\n    public void testDiscriminatorExtensionsSerialization() throws IOException {\n        // Create an OpenAPI 3.1 document with discriminator extensions\n        OpenAPI openAPI = createBasicOpenAPI31();\n        \n        // Add discriminator with extensions\n        Schema schema = openAPI.getComponents().getSchemas().get(\"TestSchema\");\n        Discriminator discriminator = new Discriminator().propertyName(\"type\");\n        Map<String, Object> extensions = new HashMap<>();\n        extensions.put(\"x-test-extension\", \"test-value\");\n        discriminator.setExtensions(extensions);\n        schema.setDiscriminator(discriminator);\n        \n        // Serialize to JSON\n        String json = Json31.pretty(openAPI);\n        \n        // Deserialize back to verify\n        OpenAPI deserializedOpenAPI = Json31.mapper().readValue(json, OpenAPI.class);\n        \n        // Verify discriminator extensions\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas().get(\"TestSchema\").getDiscriminator());\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas().get(\"TestSchema\").getDiscriminator().getExtensions());\n        assertEquals(deserializedOpenAPI.getComponents().getSchemas().get(\"TestSchema\").getDiscriminator().getExtensions().get(\"x-test-extension\"), \"test-value\");\n    }\n    \n    /**\n     * Test serialization of OpenAPI 3.1 document with path item references and siblings\n     */\n    @Test\n    public void testPathItemRefsAndSiblingsSerialization() throws IOException {\n        // Create an OpenAPI 3.1 document with path item references and siblings\n        OpenAPI openAPI = createBasicOpenAPI31();\n        \n        // Add component path items\n        PathItem pathItem = new PathItem()\n                .description(\"Test path item\")\n                .summary(\"Test path item summary\");\n        pathItem.setGet(new Operation().operationId(\"getTest\"));\n        \n        openAPI.getComponents().pathItems(new HashMap<>());\n        openAPI.getComponents().getPathItems().put(\"testPathItem\", pathItem);\n        \n        // Add path with reference and siblings\n        PathItem refPathItem = new PathItem()\n                .$ref(\"#/components/pathItems/testPathItem\")\n                .description(\"Ref path item description\")\n                .summary(\"Ref path item summary\");\n        openAPI.getPaths().put(\"/refTest\", refPathItem);\n        \n        // Serialize to JSON\n        String json = Json31.pretty(openAPI);\n        \n        // Deserialize back to verify\n        OpenAPI deserializedOpenAPI = Json31.mapper().readValue(json, OpenAPI.class);\n        \n        // Verify path item refs and siblings\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/refTest\").get$ref(), \"#/components/pathItems/testPathItem\");\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/refTest\").getDescription(), \"Ref path item description\");\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/refTest\").getSummary(), \"Ref path item summary\");\n    }\n    \n    /**\n     * Test serialization of OpenAPI 3.1 document with parameter references and siblings\n     */\n    @Test\n    public void testParameterRefsAndSiblingsSerialization() throws IOException {\n        // Create an OpenAPI 3.1 document with parameter references and siblings\n        OpenAPI openAPI = createBasicOpenAPI31();\n        \n        // Add component parameters\n        Parameter parameter = new Parameter()\n                .name(\"testParam\")\n                .in(\"query\")\n                .description(\"Test parameter\");\n        \n        openAPI.getComponents().parameters(new HashMap<>());\n        openAPI.getComponents().getParameters().put(\"testParameter\", parameter);\n        \n        // Add operation with parameter reference and siblings\n        Parameter refParameter = new Parameter()\n                .$ref(\"#/components/parameters/testParameter\")\n                .description(\"Ref parameter description\");\n        \n        openAPI.getPaths().get(\"/test\").getGet().addParametersItem(refParameter);\n        \n        // Serialize to JSON\n        String json = Json31.pretty(openAPI);\n        \n        // Deserialize back to verify\n        OpenAPI deserializedOpenAPI = Json31.mapper().readValue(json, OpenAPI.class);\n        \n        // Verify parameter refs and siblings\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/test\").getGet().getParameters().get(0).get$ref(), \"#/components/parameters/testParameter\");\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/test\").getGet().getParameters().get(0).getDescription(), \"Ref parameter description\");\n    }\n    \n    /**\n     * Test serialization of OpenAPI 3.1 document with example references and siblings\n     */\n    @Test\n    public void testExampleRefsAndSiblingsSerialization() throws IOException {\n        // Create an OpenAPI 3.1 document with example references and siblings\n        OpenAPI openAPI = createBasicOpenAPI31();\n        \n        // Add component examples\n        Example example = new Example()\n                .summary(\"Test example summary\")\n                .description(\"Test example description\")\n                .value(\"Test example value\");\n        \n        openAPI.getComponents().examples(new HashMap<>());\n        openAPI.getComponents().getExamples().put(\"testExample\", example);\n        \n        // Add parameter with example reference and siblings\n        Parameter parameter = new Parameter()\n                .name(\"testParam\")\n                .in(\"query\")\n                .description(\"Test parameter\");\n        \n        Example refExample = new Example()\n                .$ref(\"#/components/examples/testExample\")\n                .summary(\"Ref example summary\")\n                .description(\"Ref example description\");\n        \n        parameter.examples(new HashMap<>());\n        parameter.getExamples().put(\"refExample\", refExample);\n        \n        openAPI.getPaths().get(\"/test\").getGet().addParametersItem(parameter);\n        \n        // Serialize to JSON\n        String json = Json31.pretty(openAPI);\n        \n        // Deserialize back to verify\n        OpenAPI deserializedOpenAPI = Json31.mapper().readValue(json, OpenAPI.class);\n        \n        // Verify example refs and siblings\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/test\").getGet().getParameters().get(0).getName(), \"testParam\");\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/test\").getGet().getParameters().get(0).getIn(), \"query\");\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/test\").getGet().getParameters().get(0).getExamples().get(\"refExample\").get$ref(), \"#/components/examples/testExample\");\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/test\").getGet().getParameters().get(0).getExamples().get(\"refExample\").getSummary(), \"Ref example summary\");\n        assertEquals(deserializedOpenAPI.getPaths().get(\"/test\").getGet().getParameters().get(0).getExamples().get(\"refExample\").getDescription(), \"Ref example description\");\n    }\n    \n    /**\n     * Test serialization of OpenAPI 3.1 document with boolean schema\n     */\n    @Test\n    public void testBooleanSchemaSerialization() throws IOException {\n        // Create an OpenAPI 3.1 document with boolean schema\n        OpenAPI openAPI = createBasicOpenAPI31();\n        \n        // Add boolean schema\n        Schema booleanSchema = new Schema().booleanSchemaValue(true);\n        openAPI.getComponents().getSchemas().put(\"BooleanSchema\", booleanSchema);\n        \n        // Serialize to JSON\n        String json = Json31.pretty(openAPI);\n        \n        // Deserialize back to verify\n        OpenAPI deserializedOpenAPI = Json31.mapper().readValue(json, OpenAPI.class);\n        \n        // Verify boolean schema\n        assertTrue(Boolean.TRUE.equals(deserializedOpenAPI.getComponents().getSchemas().get(\"BooleanSchema\").getBooleanSchemaValue()));\n        \n        // Verify that the schema is serialized as a boolean value\n        ObjectMapper mapper = new ObjectMapper();\n        JsonNode jsonNode = mapper.readTree(json);\n        assertTrue(jsonNode.get(\"components\").get(\"schemas\").get(\"BooleanSchema\").isBoolean());\n        assertTrue(jsonNode.get(\"components\").get(\"schemas\").get(\"BooleanSchema\").asBoolean());\n    }\n    \n    /**\n     * Test serialization of OpenAPI 3.1 document with null values\n     */\n    @Test\n    public void testNullValuesSerialization() throws IOException {\n        // Create an OpenAPI 3.1 document with null values\n        OpenAPI openAPI = createBasicOpenAPI31();\n        \n        // Add schema with null example\n        Schema schema = openAPI.getComponents().getSchemas().get(\"TestSchema\");\n        schema.setExample(null);\n        schema.setExampleSetFlag(true);\n        \n        // Serialize to JSON\n        String json = Json31.pretty(openAPI);\n        \n        // Deserialize back to verify\n        OpenAPI deserializedOpenAPI = Json31.mapper().readValue(json, OpenAPI.class);\n        \n        // Verify null values\n        assertNotNull(deserializedOpenAPI.getComponents().getSchemas().get(\"TestSchema\"));\n        assertEquals(deserializedOpenAPI.getComponents().getSchemas().get(\"TestSchema\").getExample(), null);\n        assertTrue(deserializedOpenAPI.getComponents().getSchemas().get(\"TestSchema\").getExampleSetFlag());\n    }\n    \n    /**\n     * Helper method to create a basic OpenAPI 3.0 document\n     */\n    private OpenAPI createBasicOpenAPI30() {\n        OpenAPI openAPI = new OpenAPI();\n        openAPI.setOpenapi(\"3.0.1\");\n        \n        // Add info\n        Info info = new Info()\n                .title(\"Test API\")\n                .version(\"1.0.0\")\n                .description(\"Test API Description\")\n                .contact(new Contact().name(\"Test Contact\").email(\"test@example.com\"))\n                .license(new License().name(\"MIT\"));\n        openAPI.setInfo(info);\n        \n        // Add paths\n        Paths paths = new Paths();\n        PathItem pathItem = new PathItem();\n        \n        // Add GET operation\n        Operation getOperation = new Operation()\n                .operationId(\"getTest\")\n                .summary(\"Get Test\")\n                .description(\"Get Test Description\");\n        \n        // Add responses\n        ApiResponses responses = new ApiResponses();\n        ApiResponse response = new ApiResponse()\n                .description(\"Successful response\");\n        responses.addApiResponse(\"200\", response);\n        getOperation.setResponses(responses);\n        \n        pathItem.setGet(getOperation);\n        paths.addPathItem(\"/test\", pathItem);\n        openAPI.setPaths(paths);\n        \n        // Add components\n        Components components = new Components();\n        Schema schema = new Schema()\n                .type(\"object\")\n                .title(\"TestSchema\")\n                .description(\"Test Schema Description\");\n        components.addSchemas(\"TestSchema\", schema);\n        openAPI.setComponents(components);\n        \n        return openAPI;\n    }\n    \n    /**\n     * Helper method to create a basic OpenAPI 3.1 document\n     */\n    private OpenAPI createBasicOpenAPI31() {\n        OpenAPI openAPI = new OpenAPI();\n        openAPI.setOpenapi(\"3.1.0\");\n        \n        // Add info\n        Info info = new Info()\n                .title(\"Test API\")\n                .version(\"1.0.0\")\n                .description(\"Test API Description\")\n                .summary(\"Test API Summary\")\n                .contact(new Contact().name(\"Test Contact\").email(\"test@example.com\"))\n                .license(new License().name(\"MIT\").identifier(\"MIT\"));\n        openAPI.setInfo(info);\n        \n        // Add paths\n        Paths paths = new Paths();\n        PathItem pathItem = new PathItem();\n        \n        // Add GET operation\n        Operation getOperation = new Operation()\n                .operationId(\"getTest\")\n                .summary(\"Get Test\")\n                .description(\"Get Test Description\");\n        \n        // Add responses\n        ApiResponses responses = new ApiResponses();\n        ApiResponse response = new ApiResponse()\n                .description(\"Successful response\");\n        responses.addApiResponse(\"200\", response);\n        getOperation.setResponses(responses);\n        \n        pathItem.setGet(getOperation);\n        paths.addPathItem(\"/test\", pathItem);\n        openAPI.setPaths(paths);\n        \n        // Add components\n        Components components = new Components();\n        Schema schema = new Schema()\n                .type(\"object\")\n                .title(\"TestSchema\")\n                .description(\"Test Schema Description\");\n        components.addSchemas(\"TestSchema\", schema);\n        openAPI.setComponents(components);\n        \n        // Add webhooks\n        Map<String, PathItem> webhooks = new HashMap<>();\n        PathItem webhookPathItem = new PathItem();\n        Operation postOperation = new Operation()\n                .operationId(\"postWebhook\")\n                .summary(\"Post Webhook\")\n                .description(\"Post Webhook Description\");\n        webhookPathItem.setPost(postOperation);\n        webhooks.put(\"testWebhook\", webhookPathItem);\n        openAPI.setWebhooks(webhooks);\n        \n        return openAPI;\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/serialization/JsonSerializationTest.java",
    "content": "package io.swagger.v3.core.serialization;\n\nimport com.fasterxml.jackson.core.JsonFactory;\nimport com.fasterxml.jackson.dataformat.yaml.JacksonYAMLParseException;\nimport com.fasterxml.jackson.dataformat.yaml.YAMLFactory;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.ObjectMapperFactory;\nimport io.swagger.v3.core.util.ResourceUtils;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.info.Info;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.servers.Server;\nimport org.testng.annotations.Test;\nimport org.yaml.snakeyaml.LoaderOptions;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertFalse;\n\npublic class JsonSerializationTest {\n\n    @Test\n    public void testSerializeASpecWithPathReferences() throws Exception {\n\n        OpenAPI swagger = new OpenAPI()\n                .addServersItem(new Server().url(\"http://petstore.swagger.io\"));\n\n        PathItem expectedPath = new PathItem().$ref(\"http://my.company.com/paths/health.json\");\n        swagger.path(\"/health\", expectedPath);\n\n        String swaggerJson = Json.mapper().writeValueAsString(swagger);\n        OpenAPI rebuilt = Json.mapper().readValue(swaggerJson, OpenAPI.class);\n\n        final PathItem path = rebuilt.getPaths().get(\"/health\");\n        assertEquals(path, expectedPath);\n    }\n\n    @Test\n    public void testExtension() throws Exception {\n\n        OpenAPI swagger = new OpenAPI();\n        swagger.addExtension(\"x-foo-bar\", \"foo bar\");\n        swagger.setInfo(new Info());\n        swagger.getInfo().addExtension(\"x-foo-bar\", \"foo bar\");\n\n        String swaggerJson = Json.mapper().writeValueAsString(swagger);\n        assertFalse(swaggerJson.contains(\"extensions\"));\n        OpenAPI rebuilt = Json.mapper().readValue(swaggerJson, OpenAPI.class);\n        assertEquals(rebuilt.getExtensions().values().iterator().next(), \"foo bar\");\n        assertEquals(rebuilt.getInfo().getExtensions().values().iterator().next(), \"foo bar\");\n\n    }\n\n    @Test\n    public void testExtensionObjectWithProperties() throws Exception {\n        final Map<String, Object> extensionObjectProps = new HashMap<>();\n        extensionObjectProps.put(\"x-foo-bar\", \"foo bar\");\n        extensionObjectProps.put(\"x-bar-foo\", null);\n\n        OpenAPI swagger = new OpenAPI();\n        swagger.addExtension(\"x-extension-with-properties\", extensionObjectProps);\n\n        String swaggerJson = Json.mapper().writeValueAsString(swagger);\n        assertEquals(swaggerJson, \"{\\\"openapi\\\":\\\"3.0.1\\\",\\\"x-extension-with-properties\\\":{\\\"x-foo-bar\\\":\\\"foo bar\\\",\\\"x-bar-foo\\\":null}}\");\n    }\n\n    @Test\n    public void testSerializeASpecWithResponseReferences() throws Exception {\n        OpenAPI swagger = new OpenAPI()\n                .addServersItem(new Server().url(\"http://petstore.swagger.io\"));\n\n        ApiResponse expectedResponse = new ApiResponse().$ref(\"http://my.company.com/paths/health.json\");\n        PathItem expectedPath = new PathItem()\n                .get(\n                        new Operation().responses(\n                                new ApiResponses()\n                                        .addApiResponse(\"200\", expectedResponse)));\n\n        swagger.path(\"/health\", expectedPath);\n\n        String swaggerJson = Json.mapper().writeValueAsString(swagger);\n        OpenAPI rebuilt = Json.mapper().readValue(swaggerJson, OpenAPI.class);\n\n        assertEquals(rebuilt.getPaths().get(\"/health\").getGet().getResponses().get(\"200\"), expectedResponse);\n\n    }\n\n    @Test\n    public void testSerializeNullExample() throws Exception {\n        final String yaml = ResourceUtils.loadClassResource(getClass(), \"specFiles/null-example.yaml\");\n        OpenAPI deser = Yaml.mapper().readValue(yaml, OpenAPI.class);\n        SerializationMatchers.assertEqualsToYaml(deser, yaml);\n\n    }\n\n    @Test\n    public void testSerializeNullInSchemaExample() throws Exception {\n        final String yaml = ResourceUtils.loadClassResource(getClass(), \"specFiles/null-in-schema-example.yaml\");\n        OpenAPI deser = Yaml.mapper().readValue(yaml, OpenAPI.class);\n        SerializationMatchers.assertEqualsToYaml(deser, yaml);\n\n    }\n\n    @Test\n    public void testSerializeJSONWithCustomFactory() throws Exception {\n        // given\n        JsonFactory jsonFactory = new JsonFactory();\n        final String json = ResourceUtils.loadClassResource(getClass(), \"specFiles/petstore-3.0.json\");\n        final String expectedJson = ResourceUtils.loadClassResource(getClass(), \"specFiles/jsonSerialization-expected-petstore-3.0.json\");\n\n        // when\n        OpenAPI deser = ObjectMapperFactory.createJson(jsonFactory).readValue(json, OpenAPI.class);\n\n        // then\n        SerializationMatchers.assertEqualsToJson(deser, expectedJson);\n    }\n\n    @Test\n    public void testSerializeYAMLWithCustomFactory() throws Exception {\n        // given\n        LoaderOptions loaderOptions = new LoaderOptions();\n        loaderOptions.setCodePointLimit(5 * 1024 * 1024);\n        YAMLFactory yamlFactory = YAMLFactory.builder()\n                .loaderOptions(loaderOptions)\n                .build();\n        final String yaml = ResourceUtils.loadClassResource(getClass(), \"specFiles/null-example.yaml\");\n\n        // when\n        OpenAPI deser = ObjectMapperFactory.createYaml(yamlFactory).readValue(yaml, OpenAPI.class);\n\n        // then\n        SerializationMatchers.assertEqualsToYaml(deser, yaml);\n    }\n\n    @Test(expectedExceptions = JacksonYAMLParseException.class)\n    public void testSerializeYAMLWithCustomFactoryAndCodePointLimitReached() throws Exception {\n        // given\n        LoaderOptions loaderOptions = new LoaderOptions();\n        loaderOptions.setCodePointLimit(1);\n        YAMLFactory yamlFactory = YAMLFactory.builder()\n                .loaderOptions(loaderOptions)\n                .build();\n        final String yaml = ResourceUtils.loadClassResource(getClass(), \"specFiles/null-example.yaml\");\n\n        // when\n        OpenAPI deser = ObjectMapperFactory.createYaml(yamlFactory).readValue(yaml, OpenAPI.class);\n\n        // then - Throw JacksonYAMLParseException\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/serialization/ModelSerializerTest.java",
    "content": "package io.swagger.v3.core.serialization;\n\nimport com.fasterxml.jackson.core.JsonProcessingException;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.oas.models.Car;\nimport io.swagger.v3.core.oas.models.Manufacturers;\nimport io.swagger.v3.core.oas.models.ReadOnlyModel;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.models.ExternalDocumentation;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.DateSchema;\nimport io.swagger.v3.oas.models.media.DateTimeSchema;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\nimport java.math.BigDecimal;\nimport java.util.Arrays;\nimport java.util.LinkedHashMap;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertFalse;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class ModelSerializerTest {\n    private final ObjectMapper m = Json.mapper();\n\n    @Test(description = \"it should convert a model\")\n    public void convertModel() throws JsonProcessingException {\n        final Schema pet = new Schema();\n        final Map<String, Schema> props = new LinkedHashMap<String, Schema>();\n        props.put(\"intValue\", new IntegerSchema());\n        props.put(\"longValue\", new IntegerSchema().format(\"int64\"));\n        props.put(\"dateValue\", new DateSchema());\n        props.put(\"dateTimeValue\", new DateTimeSchema());\n        pet.setProperties(props);\n        pet.setRequired(Arrays.asList(\"intValue\", \"name\"));\n        final String json = \"{\\n\" +\n                \"   \\\"required\\\":[\\n\" +\n                \"      \\\"intValue\\\"\\n\" +\n                \"   ],\\n\" +\n                \"   \\\"properties\\\":{\\n\" +\n                \"      \\\"intValue\\\":{\\n\" +\n                \"         \\\"type\\\":\\\"integer\\\",\\n\" +\n                \"         \\\"format\\\":\\\"int32\\\"\\n\" +\n                \"      },\\n\" +\n                \"      \\\"longValue\\\":{\\n\" +\n                \"         \\\"type\\\":\\\"integer\\\",\\n\" +\n                \"         \\\"format\\\":\\\"int64\\\"\\n\" +\n                \"      },\\n\" +\n                \"      \\\"dateValue\\\":{\\n\" +\n                \"         \\\"type\\\":\\\"string\\\",\\n\" +\n                \"         \\\"format\\\":\\\"date\\\"\\n\" +\n                \"      },\\n\" +\n                \"      \\\"dateTimeValue\\\":{\\n\" +\n                \"         \\\"type\\\":\\\"string\\\",\\n\" +\n                \"         \\\"format\\\":\\\"date-time\\\"\\n\" +\n                \"      }\\n\" +\n                \"   }\\n\" +\n                \"}\";\n\n        SerializationMatchers.assertEqualsToJson(pet, json);\n    }\n\n    @Test(description = \"it should deserialize a model\")\n    public void deserializeModel() throws IOException {\n        final String json =\n                \"{\\n\" +\n                        \"   \\\"required\\\":[\\n\" +\n                        \"      \\\"intValue\\\"\\n\" +\n                        \"   ],\\n\" +\n                        \"   \\\"type\\\":\\\"object\\\",\\n\" +\n                        \"   \\\"properties\\\":{\\n\" +\n                        \"      \\\"dateValue\\\":{\\n\" +\n                        \"         \\\"type\\\":\\\"string\\\",\\n\" +\n                        \"         \\\"format\\\":\\\"date\\\"\\n\" +\n                        \"      },\\n\" +\n                        \"      \\\"longValue\\\":{\\n\" +\n                        \"         \\\"type\\\":\\\"integer\\\",\\n\" +\n                        \"         \\\"format\\\":\\\"int64\\\"\\n\" +\n                        \"      },\\n\" +\n                        \"      \\\"dateTimeValue\\\":{\\n\" +\n                        \"         \\\"type\\\":\\\"string\\\",\\n\" +\n                        \"         \\\"format\\\":\\\"date-time\\\"\\n\" +\n                        \"      },\\n\" +\n                        \"      \\\"intValue\\\":{\\n\" +\n                        \"         \\\"type\\\":\\\"integer\\\",\\n\" +\n                        \"         \\\"format\\\":\\\"int32\\\"\\n\" +\n                        \"      },\\n\" +\n                        \"      \\\"byteArrayValue\\\":{\\n\" +\n                        \"         \\\"type\\\":\\\"string\\\",\\n\" +\n                        \"         \\\"format\\\":\\\"binary\\\"\\n\" +\n                        \"      }\\n\" +\n                        \"   }\\n\" +\n                        \"}\";\n\n        final Schema p = m.readValue(json, Schema.class);\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should serialize an array model\")\n    public void serializeArrayModel() throws IOException {\n        final ArraySchema model = new ArraySchema();\n        model.setItems(new Schema().$ref(\"Pet\"));\n        assertEquals(m.writeValueAsString(model), \"{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"$ref\\\":\\\"#/components/schemas/Pet\\\"}}\");\n    }\n\n    @Test(description = \"it should deserialize an array model\")\n    public void deserializeArrayModel() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"$ref\\\":\\\"#/definitions/Pet\\\"}}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertTrue(p instanceof ArraySchema);\n        assertEquals(m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should not create an xml object for $ref\")\n    public void shouldNotCreateXmlObjectForRef() throws IOException {\n        final Schema model = new Schema().$ref(\"Monster\");\n        model.setDescription(\"oops\");\n        model.setExternalDocs(new ExternalDocumentation()\n                .description(\"external docs\")\n                .url(\"http://swagger.io\"));\n        assertEquals(Json.mapper().writeValueAsString(model), \"{\\\"$ref\\\":\\\"#/components/schemas/Monster\\\"}\");\n    }\n\n    @Test(description = \"it should make a field readOnly by annotation\")\n    public void makeFieldReadOnly() throws IOException {\n        final Map<String, Schema> schemas = ModelConverters.getInstance().read(Car.class);\n        final String json =\n                \"{\\n\" +\n                        \"   \\\"Car\\\":{\\n\" +\n                        \"      \\\"type\\\":\\\"object\\\",\\n\" +\n                        \"      \\\"properties\\\":{\\n\" +\n                        \"         \\\"wheelCount\\\":{\\n\" +\n                        \"            \\\"type\\\":\\\"integer\\\",\\n\" +\n                        \"            \\\"format\\\":\\\"int32\\\",\\n\" +\n                        \"            \\\"readOnly\\\":true\\n\" +\n                        \"         }\\n\" +\n                        \"      }\\n\" +\n                        \"   }\\n\" +\n                        \"}\";\n        SerializationMatchers.assertEqualsToJson(schemas, json);\n    }\n\n    @Test(description = \"it should serialize a model with a Set\")\n    public void serializeModelWithSet() throws IOException {\n        final Map<String, Schema> schemas = ModelConverters.getInstance().read(Manufacturers.class);\n        final String json = \"{\\n\" +\n                \"   \\\"Manufacturers\\\":{\\n\" +\n                \"      \\\"type\\\":\\\"object\\\",\\n\" +\n                \"      \\\"properties\\\":{\\n\" +\n                \"         \\\"countries\\\":{\\n\" +\n                \"            \\\"type\\\":\\\"array\\\",\\n\" +\n                \"            \\\"uniqueItems\\\":true,\\n\" +\n                \"            \\\"items\\\":{\\n\" +\n                \"               \\\"type\\\":\\\"string\\\"\\n\" +\n                \"            }\\n\" +\n                \"         }\\n\" +\n                \"      }\\n\" +\n                \"   }\\n\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(schemas, json);\n    }\n\n    @Test(description = \"it should deserialize a model with object example\")\n    public void deserializeModelWithObjectExample() throws IOException {\n        final String json = \"{\\n\" +\n                \"   \\\"title\\\":\\\"Error\\\",\\n\" +\n                \"   \\\"type\\\":\\\"object\\\",\\n\" +\n                \"   \\\"properties\\\":{\\n\" +\n                \"      \\\"code\\\":{\\n\" +\n                \"         \\\"type\\\":\\\"integer\\\",\\n\" +\n                \"         \\\"format\\\":\\\"int32\\\"\\n\" +\n                \"      },\\n\" +\n                \"      \\\"message\\\":{\\n\" +\n                \"         \\\"type\\\":\\\"string\\\"\\n\" +\n                \"      },\\n\" +\n                \"      \\\"fields\\\":{\\n\" +\n                \"         \\\"type\\\":\\\"string\\\"\\n\" +\n                \"      }\\n\" +\n                \"   },\\n\" +\n                \"   \\\"example\\\":{\\n\" +\n                \"      \\\"code\\\":1,\\n\" +\n                \"      \\\"message\\\":\\\"hello\\\",\\n\" +\n                \"      \\\"fields\\\":\\\"abc\\\"\\n\" +\n                \"   }\\n\" +\n                \"}\";\n\n        final Schema model = Json.mapper().readValue(json, Schema.class);\n        assertEquals(Json.mapper().writeValueAsString(model.getExample()), \"{\\\"code\\\":1,\\\"message\\\":\\\"hello\\\",\\\"fields\\\":\\\"abc\\\"}\");\n    }\n\n    @Test(description = \"it should deserialize a model with read-only property\")\n    public void deserializeModelWithReadOnlyProperty() throws IOException {\n        final String json = \"{\\n\" +\n                \"   \\\"properties\\\":{\\n\" +\n                \"      \\\"id\\\":{\\n\" +\n                \"         \\\"type\\\":\\\"integer\\\",\\n\" +\n                \"         \\\"format\\\":\\\"int32\\\",\\n\" +\n                \"         \\\"readOnly\\\":true\\n\" +\n                \"      }\\n\" +\n                \"   }\\n\" +\n                \"}\";\n        final Schema model = Json.mapper().readValue(json, Schema.class);\n        Schema property = (Schema) model.getProperties().get(\"id\");\n        assertTrue(property.getReadOnly());\n    }\n\n    @Test(description = \"it should generate a JSON with read-only from pojo, #1161\")\n    public void readOnlyJsonGeneration() throws IOException {\n        Map<String, Schema> models = ModelConverters.getInstance().read(ReadOnlyModel.class);\n\n        Schema model = models.get(\"ReadOnlyModel\");\n\n        Schema id = (Schema) model.getProperties().get(\"id\");\n        assertTrue(id.getReadOnly());\n\n        Schema readWriteId = (Schema) model.getProperties().get(\"readWriteId\");\n        assertNull(readWriteId.getReadOnly());\n    }\n\n    @Test(description = \"it should generate an integer field with enum\")\n    public void integerEnumGeneration() throws IOException {\n        final String json = \"{\\n\" +\n                \"   \\\"properties\\\":{\\n\" +\n                \"      \\\"id\\\":{\\n\" +\n                \"         \\\"description\\\":\\\"fun!\\\",\\n\" +\n                \"         \\\"type\\\":\\\"integer\\\",\\n\" +\n                \"         \\\"format\\\":\\\"int32\\\",\\n\" +\n                \"         \\\"readOnly\\\":true,\\n\" +\n                \"         \\\"enum\\\": [ 0, 1]\\n\" +\n                \"      }\\n\" +\n                \"   }\\n\" +\n                \"}\";\n        final Schema model = Json.mapper().readValue(json, Schema.class);\n        IntegerSchema p = (IntegerSchema) model.getProperties().get(\"id\");\n\n        assertNotNull(p.getEnum());\n        assertEquals(p.getEnum().get(0), new Integer(0));\n        assertEquals(p.getEnum().get(1), new Integer(1));\n    }\n\n    @Test(description = \"it retains enums per \")\n    public void testEnumParser() throws IOException {\n        String json = \"{\\n\" +\n                \"  \\\"properties\\\": {\\n\" +\n                \"    \\\"AdvStateType\\\": {\\n\" +\n                \"      \\\"description\\\": \\\"Advertising State\\\",\\n\" +\n                \"      \\\"enum\\\": [\\n\" +\n                \"        \\\"off\\\",\\n\" +\n                \"        \\\"on\\\"\\n\" +\n                \"      ],\\n\" +\n                \"      \\\"type\\\": \\\"string\\\"\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\";\n        final Schema model = Json.mapper().readValue(json, Schema.class);\n        StringSchema p = (StringSchema) model.getProperties().get(\"AdvStateType\");\n\n        assertNotNull(p.getEnum());\n        assertEquals(p.getEnum().get(0), \"off\");\n        assertEquals(p.getEnum().get(1), \"on\");\n    }\n\n    @Test\n    public void testPrimitiveModel() throws Exception {\n        String json = \"{\\n\" +\n                \"  \\\"type\\\": \\\"string\\\",\\n\" +\n                \"  \\\"enum\\\": [\\n\" +\n                \"    \\\"a\\\",\\n\" +\n                \"    \\\"b\\\",\\n\" +\n                \"    \\\"c\\\"\\n\" +\n                \"  ]\\n\" +\n                \"}\";\n\n        final Schema model = Json.mapper().readValue(json, Schema.class);\n\n        assertNotNull(model.getEnum());\n        assertTrue(model.getEnum().size() == 3);\n    }\n\n    @Test\n    public void testIssue1852() throws Exception {\n        String json = \"{\\n\" +\n                \"  \\\"type\\\": \\\"integer\\\",\\n\" +\n                \"  \\\"minimum\\\": 10,\\n\" +\n                \"  \\\"maximum\\\": 20,\\n\" +\n                \"  \\\"default\\\": 15\\n\" +\n                \"}\";\n\n        final Schema model = Json.mapper().readValue(json, Schema.class);\n\n        assertEquals(model.getMinimum().intValue(), 10);\n        assertEquals(model.getMaximum().intValue(), 20);\n        assertEquals(model.getDefault(), 15);\n    }\n\n    @Test\n    public void testIssue2064Neg() throws Exception {\n        String json =\n                \"{\\n\" +\n                        \"  \\\"type\\\": \\\"string\\\",\\n\" +\n                        \"  \\\"uniqueItems\\\": false\\n\" +\n                        \"}\";\n\n        final Schema model = Json.mapper().readValue(json, Schema.class);\n\n        assertFalse(model.getUniqueItems());\n    }\n\n    @Test\n    public void testIssue2064() throws Exception {\n        String json =\n                \"{\\n\" +\n                        \"  \\\"type\\\": \\\"string\\\",\\n\" +\n                        \"  \\\"uniqueItems\\\": true\\n\" +\n                        \"}\";\n\n        final Schema model = Json.mapper().readValue(json, Schema.class);\n\n        assertTrue(model.getUniqueItems());\n    }\n\n    @Test\n    public void testIssue2064Ip() throws Exception {\n        String json =\n                \"{\\n\" +\n                        \"  \\\"type\\\": \\\"object\\\",\\n\" +\n                        \"  \\\"properties\\\": {\\n\" +\n                        \"    \\\"id\\\": {\\n\" +\n                        \"      \\\"type\\\": \\\"integer\\\",\\n\" +\n                        \"      \\\"format\\\": \\\"int32\\\",\\n\" +\n                        \"      \\\"multipleOf\\\": 3.0\\n\" +\n                        \"    }\\n\" +\n                        \"  }\\n\" +\n                        \"}\";\n\n        final Schema model = Json.mapper().readValue(json, Schema.class);\n\n        IntegerSchema ip = (IntegerSchema) model.getProperties().get(\"id\");\n        assertEquals(ip.getMultipleOf(), new BigDecimal(\"3.0\"));\n\n    }\n\n    @Test\n    public void testEnumWithNull() throws Exception {\n        String yaml =\n                        \"type: integer\\n\" +\n                        \"description: some int values with null\\n\" +\n                        \"format: int32\\n\" +\n                        \"enum: \\n\" +\n                        \"- 1\\n\" +\n                        \"- 2\\n\" +\n                        \"- null\\n\";\n\n        final Schema model = Yaml.mapper().readValue(yaml, Schema.class);\n\n        assertEquals(model.getEnum(), Arrays.asList(1, 2, null));\n        SerializationMatchers.assertEqualsToYaml(model, yaml);\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/serialization/Oas31ObjectFieldTest.java",
    "content": "package io.swagger.v3.core.serialization;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.Assert;\nimport org.testng.annotations.Test;\n\nimport java.util.List;\nimport java.util.Map;\n\npublic class Oas31ObjectFieldTest {\n    @Test(description = \"Repro #4682: In OAS 3.1, raw Object property should not be rendered as an empty schema\")\n    public void rawObjectPropertyShouldBeObjectSchema() {\n        Map<String, Schema> schemas = ModelConverters.getInstance(true).readAll(PojoUsingObjectField.class);\n        Schema pojo = schemas.get(\"PojoUsingObjectField\");\n        Assert.assertNotNull(pojo, \"PojoUsingObjectField schema should exist\");\n\n        Schema myField = (Schema) pojo.getProperties().get(\"myField\");\n        Assert.assertNotNull(myField, \"myField schema should exist\");\n        Assert.assertTrue(isObjectSchema(myField), \"Expected raw Object property to be an object schema in OAS 3.1, but was: type=\" + myField.getType() + \", types=\" + myField.getTypes() + \", class=\" + myField.getClass());\n    }\n\n    @Test(description = \"OAS 3.1: List<Object> items schema should be object\")\n    public void listOfObjectItemsShouldBeObjectSchema() {\n        Map<String, Schema> schemas = ModelConverters.getInstance(true).readAll(PojoUsingListOfObject.class);\n        Schema pojo = schemas.get(\"PojoUsingListOfObject\");\n        Assert.assertNotNull(pojo, \"PojoUsingListOfObject schema should exist\");\n        Schema itemsProp = (Schema) pojo.getProperties().get(\"items\");\n        Assert.assertNotNull(itemsProp, \"items property schema should exist\");\n        Schema itemSchema = itemsProp.getItems();\n        Assert.assertNotNull(itemSchema, \"List<Object> items schema should exist\");\n        Assert.assertTrue(isObjectSchema(itemSchema), \"Expected List<Object> items to be an object schema in OAS 3.1, but was: type=\" + itemSchema.getType() + \", types=\" + itemSchema.getTypes() + \", class=\" + itemSchema.getClass());\n    }\n\n    @Test(description = \"OAS 3.1: Map<String,Object> additionalProperties schema should be object\")\n    public void mapOfObjectAdditionalPropertiesShouldBeObjectSchema() {\n        Map<String, Schema> schemas = ModelConverters.getInstance(true).readAll(PojoUsingMapStringToObject.class);\n        Schema pojo = schemas.get(\"PojoUsingMapStringToObject\");\n        Assert.assertNotNull(pojo, \"PojoUsingMapStringToObject schema should exist\");\n        Schema additionalProp = (Schema) pojo.getProperties().get(\"additional\");\n        Assert.assertNotNull(additionalProp, \"additional property schema should exist\");\n        Schema valueSchema = (Schema) additionalProp.getAdditionalProperties();\n        Assert.assertNotNull(valueSchema, \"Map<String,Object> additionalProperties (value schema) should exist\");\n        Assert.assertTrue(isObjectSchema(valueSchema), \"Expected Map<String,Object> additionalProperties to be an object schema in OAS 3.1, but was: type=\" + valueSchema.getType() + \", types=\" + valueSchema.getTypes() + \", class=\" + valueSchema.getClass());\n    }\n\n    /**\n     * OAS 3.1 may represent types via Schema#getTypes() (JSON Schema style) rather than Schema#getType().\n     */\n    private static boolean isObjectSchema(Schema s) {\n        if (s == null) return false;\n        if (\"object\".equals(s.getType())) return true;\n        return s.getTypes() != null && s.getTypes().contains(\"object\");\n    }\n\n    private static class PojoUsingObjectField {\n        private Object myField;\n\n        public Object getMyField() {\n            return myField;\n        }\n\n        public void setMyField(Object myField) {\n            this.myField = myField;\n        }\n    }\n\n    private static class PojoUsingListOfObject {\n        private List<Object> items;\n\n        public List<Object> getItems() {\n            return items;\n        }\n\n        public void setItems(List<Object> items) {\n            this.items = items;\n        }\n    }\n\n    private static class PojoUsingMapStringToObject {\n        private Map<String, Object> additional;\n\n        public Map<String, Object> getAdditional() {\n            return additional;\n        }\n\n        public void setAdditional(Map<String, Object> additional) {\n            this.additional = additional;\n        }\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/serialization/OpenAPI3_1SerializationTest.java",
    "content": "package io.swagger.v3.core.serialization;\n\nimport com.fasterxml.jackson.core.JsonFactory;\nimport com.fasterxml.jackson.core.util.DefaultIndenter;\nimport com.fasterxml.jackson.databind.json.JsonMapper;\nimport com.fasterxml.jackson.dataformat.yaml.JacksonYAMLParseException;\nimport com.fasterxml.jackson.dataformat.yaml.YAMLFactory;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.util.*;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.callbacks.Callback;\nimport io.swagger.v3.oas.models.examples.Example;\nimport io.swagger.v3.oas.models.headers.Header;\nimport io.swagger.v3.oas.models.info.Contact;\nimport io.swagger.v3.oas.models.info.Info;\nimport io.swagger.v3.oas.models.info.License;\nimport io.swagger.v3.oas.models.links.Link;\nimport io.swagger.v3.oas.models.media.Content;\nimport io.swagger.v3.oas.models.media.Discriminator;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.media.ObjectSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.security.SecurityScheme;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.testng.annotations.Test;\nimport org.yaml.snakeyaml.LoaderOptions;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class OpenAPI3_1SerializationTest {\n    private static final Logger LOGGER = LoggerFactory.getLogger(OpenAPI3_1SerializationTest.class);\n\n    @Test\n    public void testSerializePetstore() throws Exception {\n\n        final String jsonString = ResourceUtils.loadClassResource(getClass(), \"specFiles/3.1.0/petstore-3.1.yaml\");\n        final OpenAPI swagger = Yaml31.mapper().readValue(jsonString, OpenAPI.class);\n        assertNotNull(swagger);\n        assertEquals(swagger.getInfo().getLicense().getIdentifier(), \"test\");\n        SerializationMatchers.assertEqualsToYaml31(swagger, \"openapi: 3.1.0\\n\" +\n                \"info:\\n\" +\n                \"  title: Swagger Petstore\\n\" +\n                \"  license:\\n\" +\n                \"    name: MIT\\n\" +\n                \"    identifier: test\\n\" +\n                \"  version: 1.0.0\\n\" +\n                \"servers:\\n\" +\n                \"- url: http://petstore.swagger.io/v1\\n\" +\n                \"paths:\\n\" +\n                \"  /pets:\\n\" +\n                \"    get:\\n\" +\n                \"      tags:\\n\" +\n                \"      - pets\\n\" +\n                \"      summary: List all pets\\n\" +\n                \"      operationId: listPets\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: limit\\n\" +\n                \"        in: query\\n\" +\n                \"        description: How many items to return at one time (max 100)\\n\" +\n                \"        required: false\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: An paged array of pets\\n\" +\n                \"          headers:\\n\" +\n                \"            x-next:\\n\" +\n                \"              description: A link to the next page of responses\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pets\\\"\\n\" +\n                \"        default:\\n\" +\n                \"          description: unexpected error\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Error\\\"\\n\" +\n                \"    post:\\n\" +\n                \"      tags:\\n\" +\n                \"      - pets\\n\" +\n                \"      summary: Create a pet\\n\" +\n                \"      operationId: createPets\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"201\\\":\\n\" +\n                \"          description: Null response\\n\" +\n                \"        default:\\n\" +\n                \"          description: unexpected error\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Error\\\"\\n\" +\n                \"  /pets/{petId}:\\n\" +\n                \"    get:\\n\" +\n                \"      tags:\\n\" +\n                \"      - pets\\n\" +\n                \"      summary: Info for a specific pet\\n\" +\n                \"      operationId: showPetById\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: petId\\n\" +\n                \"        in: path\\n\" +\n                \"        description: The id of the pet to retrieve\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: Expected response to a valid request\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pets\\\"\\n\" +\n                \"        default:\\n\" +\n                \"          description: unexpected error\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Error\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Pet:\\n\" +\n                \"      required:\\n\" +\n                \"      - id\\n\" +\n                \"      - name\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        name:\\n\" +\n                \"          type:\\n\" +\n                \"          - string\\n\" +\n                \"          - integer\\n\" +\n                \"        tag:\\n\" +\n                \"          type: string\\n\" +\n                \"    Pets:\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"    Error:\\n\" +\n                \"      required:\\n\" +\n                \"      - code\\n\" +\n                \"      - message\\n\" +\n                \"      properties:\\n\" +\n                \"        code:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        message:\\n\" +\n                \"          type: string\\n\" +\n                \"webhooks:\\n\" +\n                \"  newPet:\\n\" +\n                \"    post:\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Information about a new pet in the system\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: Return a 200 status to indicate that the data was received\\n\" +\n                \"            successfully\");\n        SerializationMatchers.assertEqualsToJson31(swagger, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"info\\\" : {\\n\" +\n                \"    \\\"title\\\" : \\\"Swagger Petstore\\\",\\n\" +\n                \"    \\\"license\\\" : {\\n\" +\n                \"      \\\"name\\\" : \\\"MIT\\\",\\n\" +\n                \"      \\\"identifier\\\" : \\\"test\\\"\\n\" +\n                \"    },\\n\" +\n                \"    \\\"version\\\" : \\\"1.0.0\\\"\\n\" +\n                \"  },\\n\" +\n                \"  \\\"servers\\\" : [ {\\n\" +\n                \"    \\\"url\\\" : \\\"http://petstore.swagger.io/v1\\\"\\n\" +\n                \"  } ],\\n\" +\n                \"  \\\"paths\\\" : {\\n\" +\n                \"    \\\"/pets\\\" : {\\n\" +\n                \"      \\\"get\\\" : {\\n\" +\n                \"        \\\"tags\\\" : [ \\\"pets\\\" ],\\n\" +\n                \"        \\\"summary\\\" : \\\"List all pets\\\",\\n\" +\n                \"        \\\"operationId\\\" : \\\"listPets\\\",\\n\" +\n                \"        \\\"parameters\\\" : [ {\\n\" +\n                \"          \\\"name\\\" : \\\"limit\\\",\\n\" +\n                \"          \\\"in\\\" : \\\"query\\\",\\n\" +\n                \"          \\\"description\\\" : \\\"How many items to return at one time (max 100)\\\",\\n\" +\n                \"          \\\"required\\\" : false,\\n\" +\n                \"          \\\"schema\\\" : {\\n\" +\n                \"            \\\"type\\\" : \\\"integer\\\",\\n\" +\n                \"            \\\"format\\\" : \\\"int32\\\"\\n\" +\n                \"          }\\n\" +\n                \"        } ],\\n\" +\n                \"        \\\"responses\\\" : {\\n\" +\n                \"          \\\"200\\\" : {\\n\" +\n                \"            \\\"description\\\" : \\\"An paged array of pets\\\",\\n\" +\n                \"            \\\"headers\\\" : {\\n\" +\n                \"              \\\"x-next\\\" : {\\n\" +\n                \"                \\\"description\\\" : \\\"A link to the next page of responses\\\",\\n\" +\n                \"                \\\"schema\\\" : {\\n\" +\n                \"                  \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"                }\\n\" +\n                \"              }\\n\" +\n                \"            },\\n\" +\n                \"            \\\"content\\\" : {\\n\" +\n                \"              \\\"application/json\\\" : {\\n\" +\n                \"                \\\"schema\\\" : {\\n\" +\n                \"                  \\\"$ref\\\" : \\\"#/components/schemas/Pets\\\"\\n\" +\n                \"                }\\n\" +\n                \"              }\\n\" +\n                \"            }\\n\" +\n                \"          },\\n\" +\n                \"          \\\"default\\\" : {\\n\" +\n                \"            \\\"description\\\" : \\\"unexpected error\\\",\\n\" +\n                \"            \\\"content\\\" : {\\n\" +\n                \"              \\\"application/json\\\" : {\\n\" +\n                \"                \\\"schema\\\" : {\\n\" +\n                \"                  \\\"$ref\\\" : \\\"#/components/schemas/Error\\\"\\n\" +\n                \"                }\\n\" +\n                \"              }\\n\" +\n                \"            }\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      },\\n\" +\n                \"      \\\"post\\\" : {\\n\" +\n                \"        \\\"tags\\\" : [ \\\"pets\\\" ],\\n\" +\n                \"        \\\"summary\\\" : \\\"Create a pet\\\",\\n\" +\n                \"        \\\"operationId\\\" : \\\"createPets\\\",\\n\" +\n                \"        \\\"responses\\\" : {\\n\" +\n                \"          \\\"201\\\" : {\\n\" +\n                \"            \\\"description\\\" : \\\"Null response\\\"\\n\" +\n                \"          },\\n\" +\n                \"          \\\"default\\\" : {\\n\" +\n                \"            \\\"description\\\" : \\\"unexpected error\\\",\\n\" +\n                \"            \\\"content\\\" : {\\n\" +\n                \"              \\\"application/json\\\" : {\\n\" +\n                \"                \\\"schema\\\" : {\\n\" +\n                \"                  \\\"$ref\\\" : \\\"#/components/schemas/Error\\\"\\n\" +\n                \"                }\\n\" +\n                \"              }\\n\" +\n                \"            }\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"/pets/{petId}\\\" : {\\n\" +\n                \"      \\\"get\\\" : {\\n\" +\n                \"        \\\"tags\\\" : [ \\\"pets\\\" ],\\n\" +\n                \"        \\\"summary\\\" : \\\"Info for a specific pet\\\",\\n\" +\n                \"        \\\"operationId\\\" : \\\"showPetById\\\",\\n\" +\n                \"        \\\"parameters\\\" : [ {\\n\" +\n                \"          \\\"name\\\" : \\\"petId\\\",\\n\" +\n                \"          \\\"in\\\" : \\\"path\\\",\\n\" +\n                \"          \\\"description\\\" : \\\"The id of the pet to retrieve\\\",\\n\" +\n                \"          \\\"required\\\" : true,\\n\" +\n                \"          \\\"schema\\\" : {\\n\" +\n                \"            \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"          }\\n\" +\n                \"        } ],\\n\" +\n                \"        \\\"responses\\\" : {\\n\" +\n                \"          \\\"200\\\" : {\\n\" +\n                \"            \\\"description\\\" : \\\"Expected response to a valid request\\\",\\n\" +\n                \"            \\\"content\\\" : {\\n\" +\n                \"              \\\"application/json\\\" : {\\n\" +\n                \"                \\\"schema\\\" : {\\n\" +\n                \"                  \\\"$ref\\\" : \\\"#/components/schemas/Pets\\\"\\n\" +\n                \"                }\\n\" +\n                \"              }\\n\" +\n                \"            }\\n\" +\n                \"          },\\n\" +\n                \"          \\\"default\\\" : {\\n\" +\n                \"            \\\"description\\\" : \\\"unexpected error\\\",\\n\" +\n                \"            \\\"content\\\" : {\\n\" +\n                \"              \\\"application/json\\\" : {\\n\" +\n                \"                \\\"schema\\\" : {\\n\" +\n                \"                  \\\"$ref\\\" : \\\"#/components/schemas/Error\\\"\\n\" +\n                \"                }\\n\" +\n                \"              }\\n\" +\n                \"            }\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  },\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"schemas\\\" : {\\n\" +\n                \"      \\\"Pet\\\" : {\\n\" +\n                \"        \\\"required\\\" : [ \\\"id\\\", \\\"name\\\" ],\\n\" +\n                \"        \\\"properties\\\" : {\\n\" +\n                \"          \\\"id\\\" : {\\n\" +\n                \"            \\\"type\\\" : \\\"integer\\\",\\n\" +\n                \"            \\\"format\\\" : \\\"int64\\\"\\n\" +\n                \"          },\\n\" +\n                \"          \\\"name\\\" : {\\n\" +\n                \"            \\\"type\\\" : [\\\"string\\\", \\\"integer\\\"]\\n\" +\n                \"          },\\n\" +\n                \"          \\\"tag\\\" : {\\n\" +\n                \"            \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      },\\n\" +\n                \"      \\\"Pets\\\" : {\\n\" +\n                \"        \\\"type\\\" : \\\"array\\\",\\n\" +\n                \"        \\\"items\\\" : {\\n\" +\n                \"          \\\"$ref\\\" : \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"        }\\n\" +\n                \"      },\\n\" +\n                \"      \\\"Error\\\" : {\\n\" +\n                \"        \\\"required\\\" : [ \\\"code\\\", \\\"message\\\" ],\\n\" +\n                \"        \\\"properties\\\" : {\\n\" +\n                \"          \\\"code\\\" : {\\n\" +\n                \"            \\\"type\\\" : \\\"integer\\\",\\n\" +\n                \"            \\\"format\\\" : \\\"int32\\\"\\n\" +\n                \"          },\\n\" +\n                \"          \\\"message\\\" : {\\n\" +\n                \"            \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  },\\n\" +\n                \"  \\\"webhooks\\\" : {\\n\" +\n                \"    \\\"newPet\\\" : {\\n\" +\n                \"      \\\"post\\\" : {\\n\" +\n                \"        \\\"requestBody\\\" : {\\n\" +\n                \"          \\\"description\\\" : \\\"Information about a new pet in the system\\\",\\n\" +\n                \"          \\\"content\\\" : {\\n\" +\n                \"            \\\"application/json\\\" : {\\n\" +\n                \"              \\\"schema\\\" : {\\n\" +\n                \"                \\\"$ref\\\" : \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"              }\\n\" +\n                \"            }\\n\" +\n                \"          }\\n\" +\n                \"        },\\n\" +\n                \"        \\\"responses\\\" : {\\n\" +\n                \"          \\\"200\\\" : {\\n\" +\n                \"            \\\"description\\\" : \\\"Return a 200 status to indicate that the data was received successfully\\\"\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n\n    }\n\n    @Test\n    public void testJSONSerializePetstoreWithCustomFactory() throws Exception {\n\n        //given\n        final String jsonString = ResourceUtils.loadClassResource(getClass(), \"specFiles/3.1.0/petstore-3.1.json\");\n        JsonFactory jsonFactory = new JsonFactory();\n\n        //when\n        final OpenAPI swagger = ObjectMapperFactory.createJson31(jsonFactory).readValue(jsonString, OpenAPI.class);\n\n        // then\n        assertNotNull(swagger);\n        SerializationMatchers.assertEqualsToJson31(swagger, jsonString);\n    }\n\n    @Test\n    public void testInfoSerialization() {\n        OpenAPI openAPI = new OpenAPI()\n                .openapi(\"3.1.0\")\n                .info(new Info()\n                        .title(\"Title test\")\n                        .description(\"This is a description for test\")\n                        .summary(\"Test Summary\")\n                        .version(\"1.0.0\")\n                        .termsOfService(\"https://test.term.of.services\")\n                        .contact(new Contact()\n                                .name(\"Test Contact\")\n                                .url(\"https://test.contact.url\")\n                                .email(\"test@email.com\"))\n                        .license(new License()\n                                .name(\"test license\")\n                                .url(\"https://test.license.com\")\n                                .identifier(\"swagger\")));\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.1.0\\n\" +\n                \"info:\\n\" +\n                \"  title: Title test\\n\" +\n                \"  description: This is a description for test\\n\" +\n                \"  summary: Test Summary\\n\" +\n                \"  termsOfService: https://test.term.of.services\\n\" +\n                \"  contact:\\n\" +\n                \"    name: Test Contact\\n\" +\n                \"    url: https://test.contact.url\\n\" +\n                \"    email: test@email.com\\n\" +\n                \"  license:\\n\" +\n                \"    name: test license\\n\" +\n                \"    url: https://test.license.com\\n\" +\n                \"    identifier: swagger\\n\" +\n                \"  version: 1.0.0\");\n\n        SerializationMatchers.assertEqualsToJson31(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"info\\\" : {\\n\" +\n                \"    \\\"title\\\" : \\\"Title test\\\",\\n\" +\n                \"    \\\"description\\\" : \\\"This is a description for test\\\",\\n\" +\n                \"    \\\"summary\\\" : \\\"Test Summary\\\",\\n\" +\n                \"    \\\"termsOfService\\\" : \\\"https://test.term.of.services\\\",\\n\" +\n                \"    \\\"contact\\\" : {\\n\" +\n                \"      \\\"name\\\" : \\\"Test Contact\\\",\\n\" +\n                \"      \\\"url\\\" : \\\"https://test.contact.url\\\",\\n\" +\n                \"      \\\"email\\\" : \\\"test@email.com\\\"\\n\" +\n                \"    },\\n\" +\n                \"    \\\"license\\\" : {\\n\" +\n                \"      \\\"name\\\" : \\\"test license\\\",\\n\" +\n                \"      \\\"url\\\" : \\\"https://test.license.com\\\",\\n\" +\n                \"      \\\"identifier\\\" : \\\"swagger\\\"\\n\" +\n                \"    },\\n\" +\n                \"    \\\"version\\\" : \\\"1.0.0\\\"\\n\" +\n                \"  }\\n\" +\n                \"}\");\n\n        openAPI.setOpenapi(\"3.0.3\");\n        SerializationMatchers.assertEqualsToYaml(openAPI, \"openapi: 3.0.3\\n\" +\n                \"info:\\n\" +\n                \"  title: Title test\\n\" +\n                \"  description: This is a description for test\\n\" +\n                \"  termsOfService: https://test.term.of.services\\n\" +\n                \"  contact:\\n\" +\n                \"    name: Test Contact\\n\" +\n                \"    url: https://test.contact.url\\n\" +\n                \"    email: test@email.com\\n\" +\n                \"  license:\\n\" +\n                \"    name: test license\\n\" +\n                \"    url: https://test.license.com\\n\" +\n                \"  version: 1.0.0\");\n\n        SerializationMatchers.assertEqualsToJson(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.0.3\\\",\\n\" +\n                \"  \\\"info\\\" : {\\n\" +\n                \"    \\\"title\\\" : \\\"Title test\\\",\\n\" +\n                \"    \\\"description\\\" : \\\"This is a description for test\\\",\\n\" +\n                \"    \\\"termsOfService\\\" : \\\"https://test.term.of.services\\\",\\n\" +\n                \"    \\\"contact\\\" : {\\n\" +\n                \"      \\\"name\\\" : \\\"Test Contact\\\",\\n\" +\n                \"      \\\"url\\\" : \\\"https://test.contact.url\\\",\\n\" +\n                \"      \\\"email\\\" : \\\"test@email.com\\\"\\n\" +\n                \"    },\\n\" +\n                \"    \\\"license\\\" : {\\n\" +\n                \"      \\\"name\\\" : \\\"test license\\\",\\n\" +\n                \"      \\\"url\\\" : \\\"https://test.license.com\\\"\\n\" +\n                \"    },\\n\" +\n                \"    \\\"version\\\" : \\\"1.0.0\\\"\\n\" +\n                \"  }\\n\" +\n                \"}\");\n    }\n\n    @Test\n    public void testWebHooksSerialization() {\n        OpenAPI openAPI = new OpenAPI()\n                .openapi(\"3.1.0\")\n                .addWebhooks(\"hook\", new PathItem()\n                        .description(\"test path hook\")\n                        .get(new Operation()\n                                .operationId(\"testHookOperation\")\n                                .responses(new ApiResponses()\n                                        .addApiResponse(\"200\", new ApiResponse().description(\"test response description\")))));\n\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.1.0\\n\" +\n                \"webhooks:\\n\" +\n                \"  hook:\\n\" +\n                \"    description: test path hook\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: testHookOperation\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: test response description\");\n\n        SerializationMatchers.assertEqualsToJson31(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"webhooks\\\" : {\\n\" +\n                \"    \\\"hook\\\" : {\\n\" +\n                \"      \\\"description\\\" : \\\"test path hook\\\",\\n\" +\n                \"      \\\"get\\\" : {\\n\" +\n                \"        \\\"operationId\\\" : \\\"testHookOperation\\\",\\n\" +\n                \"        \\\"responses\\\" : {\\n\" +\n                \"          \\\"200\\\" : {\\n\" +\n                \"            \\\"description\\\" : \\\"test response description\\\"\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n        openAPI.setOpenapi(\"3.0.3\");\n        SerializationMatchers.assertEqualsToYaml(openAPI, \"openapi: 3.0.3\");\n        SerializationMatchers.assertEqualsToJson(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.0.3\\\"\\n}\");\n\n    }\n\n    @Test\n    public void testComponentPathItemsSerialization() {\n        Schema schema = new StringSchema();\n        schema.addType(schema.getType());\n        OpenAPI openAPI = new OpenAPI().openapi(\"3.1.0\").components(new Components()\n                .addSchemas(\"stringTest\", schema)\n                .addPathItem(\"/pathTest\", new PathItem()\n                        .description(\"test path item\")\n                        .get(new Operation()\n                                .operationId(\"testPathItem\")\n                                .responses(new ApiResponses()\n                                        .addApiResponse(\"200\", new ApiResponse().description(\"response description\")))))\n                .addResponses(\"201\", new ApiResponse()\n                        .description(\"api response description\"))\n                .addParameters(\"param\", new Parameter()\n                        .in(\"query\")\n                        .description(\"parameter description\")\n                        .schema(schema))\n                .addExamples(\"example\", new Example()\n                        .summary(\"example summary\")\n                        .value(\"This is an example/\")\n                        .description(\"example description\"))\n                .addRequestBodies(\"body\", new RequestBody()\n                        .content(new Content()\n                                .addMediaType(\"application/json\", new MediaType()\n                                        .schema(new ObjectSchema()))))\n                .addHeaders(\"test-head\", new Header()\n                        .description(\"test header description\"))\n                .addSecuritySchemes(\"basic\", new SecurityScheme()\n                        .in(SecurityScheme.In.HEADER)\n                        .scheme(\"http\")\n                        .description(\"ref security description\"))\n                .addLinks(\"Link\", new Link()\n                        .operationRef(\"#/paths/~12.0~1repositories~1{username}/get\"))\n                .addCallbacks(\"TestCallback\", new Callback().addPathItem(\"{$request.query.queryUrl}\", new PathItem()\n                        .description(\"test path item\")\n                        .post(new Operation()\n                                .operationId(\"testPathItem\")))));\n\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.1.0\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    stringTest:\\n\" +\n                \"      type: string\\n\" +\n                \"  responses:\\n\" +\n                \"    \\\"201\\\":\\n\" +\n                \"      description: api response description\\n\" +\n                \"  parameters:\\n\" +\n                \"    param:\\n\" +\n                \"      in: query\\n\" +\n                \"      description: parameter description\\n\" +\n                \"      schema:\\n\" +\n                \"        type: string\\n\" +\n                \"  examples:\\n\" +\n                \"    example:\\n\" +\n                \"      summary: example summary\\n\" +\n                \"      description: example description\\n\" +\n                \"      value: This is an example/\\n\" +\n                \"  requestBodies:\\n\" +\n                \"    body:\\n\" +\n                \"      content:\\n\" +\n                \"        application/json:\\n\" +\n                \"          schema: \\n\" +\n                \"            type: object\\n\" +\n                \"  headers:\\n\" +\n                \"    test-head:\\n\" +\n                \"      description: test header description\\n\" +\n                \"  securitySchemes:\\n\" +\n                \"    basic:\\n\" +\n                \"      description: ref security description\\n\" +\n                \"      in: header\\n\" +\n                \"      scheme: http\\n\" +\n                \"  links:\\n\" +\n                \"    Link:\\n\" +\n                \"      operationRef: \\\"#/paths/~12.0~1repositories~1{username}/get\\\"\\n\" +\n                \"  callbacks:\\n\" +\n                \"    TestCallback:\\n\" +\n                \"      '{$request.query.queryUrl}':\\n\" +\n                \"        description: test path item\\n\" +\n                \"        post:\\n\" +\n                \"          operationId: testPathItem\\n\" +\n                \"  pathItems:\\n\" +\n                \"    /pathTest:\\n\" +\n                \"      description: test path item\\n\" +\n                \"      get:\\n\" +\n                \"        operationId: testPathItem\\n\" +\n                \"        responses:\\n\" +\n                \"          \\\"200\\\":\\n\" +\n                \"            description: response description\");\n\n        SerializationMatchers.assertEqualsToJson31(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"schemas\\\" : {\\n\" +\n                \"      \\\"stringTest\\\" : {\\n\" +\n                \"        \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"responses\\\" : {\\n\" +\n                \"      \\\"201\\\" : {\\n\" +\n                \"        \\\"description\\\" : \\\"api response description\\\"\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"parameters\\\" : {\\n\" +\n                \"      \\\"param\\\" : {\\n\" +\n                \"        \\\"in\\\" : \\\"query\\\",\\n\" +\n                \"        \\\"description\\\" : \\\"parameter description\\\",\\n\" +\n                \"        \\\"schema\\\" : {\\n\" +\n                \"          \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"examples\\\" : {\\n\" +\n                \"      \\\"example\\\" : {\\n\" +\n                \"        \\\"summary\\\" : \\\"example summary\\\",\\n\" +\n                \"        \\\"description\\\" : \\\"example description\\\",\\n\" +\n                \"        \\\"value\\\" : \\\"This is an example/\\\"\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"requestBodies\\\" : {\\n\" +\n                \"      \\\"body\\\" : {\\n\" +\n                \"        \\\"content\\\" : {\\n\" +\n                \"          \\\"application/json\\\" : {\\n\" +\n                \"            \\\"schema\\\" : {\\n\" +\n                \"              \\\"type\\\" : \\\"object\\\"\\n\" +\n                \"            }\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"headers\\\" : {\\n\" +\n                \"      \\\"test-head\\\" : {\\n\" +\n                \"        \\\"description\\\" : \\\"test header description\\\"\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"securitySchemes\\\" : {\\n\" +\n                \"      \\\"basic\\\" : {\\n\" +\n                \"        \\\"description\\\" : \\\"ref security description\\\",\\n\" +\n                \"        \\\"in\\\" : \\\"header\\\",\\n\" +\n                \"        \\\"scheme\\\" : \\\"http\\\"\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"links\\\" : {\\n\" +\n                \"      \\\"Link\\\" : {\\n\" +\n                \"        \\\"operationRef\\\" : \\\"#/paths/~12.0~1repositories~1{username}/get\\\"\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"callbacks\\\" : {\\n\" +\n                \"      \\\"TestCallback\\\" : {\\n\" +\n                \"        \\\"{$request.query.queryUrl}\\\" : {\\n\" +\n                \"          \\\"description\\\" : \\\"test path item\\\",\\n\" +\n                \"          \\\"post\\\" : {\\n\" +\n                \"            \\\"operationId\\\" : \\\"testPathItem\\\"\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"pathItems\\\" : {\\n\" +\n                \"      \\\"/pathTest\\\" : {\\n\" +\n                \"        \\\"description\\\" : \\\"test path item\\\",\\n\" +\n                \"        \\\"get\\\" : {\\n\" +\n                \"          \\\"operationId\\\" : \\\"testPathItem\\\",\\n\" +\n                \"          \\\"responses\\\" : {\\n\" +\n                \"            \\\"200\\\" : {\\n\" +\n                \"              \\\"description\\\" : \\\"response description\\\"\\n\" +\n                \"            }\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n\n        openAPI.openapi(\"3.0.3\");\n        SerializationMatchers.assertEqualsToYaml(openAPI, \"openapi: 3.0.3\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    stringTest:\\n\" +\n                \"      type: string\\n\" +\n                \"  responses:\\n\" +\n                \"    \\\"201\\\":\\n\" +\n                \"      description: api response description\\n\" +\n                \"  parameters:\\n\" +\n                \"    param:\\n\" +\n                \"      in: query\\n\" +\n                \"      description: parameter description\\n\" +\n                \"      schema:\\n\" +\n                \"        type: string\\n\" +\n                \"  examples:\\n\" +\n                \"    example:\\n\" +\n                \"      summary: example summary\\n\" +\n                \"      description: example description\\n\" +\n                \"      value: This is an example/\\n\" +\n                \"  requestBodies:\\n\" +\n                \"    body:\\n\" +\n                \"      content:\\n\" +\n                \"        application/json:\\n\" +\n                \"          schema:\\n\" +\n                \"            type: object\\n\" +\n                \"  headers:\\n\" +\n                \"    test-head:\\n\" +\n                \"      description: test header description\\n\" +\n                \"  securitySchemes:\\n\" +\n                \"    basic:\\n\" +\n                \"      description: ref security description\\n\" +\n                \"      in: header\\n\" +\n                \"      scheme: http\\n\" +\n                \"  links:\\n\" +\n                \"    Link:\\n\" +\n                \"      operationRef: \\\"#/paths/~12.0~1repositories~1{username}/get\\\"\\n\" +\n                \"  callbacks:\\n\" +\n                \"    TestCallback:\\n\" +\n                \"      '{$request.query.queryUrl}':\\n\" +\n                \"        description: test path item\\n\" +\n                \"        post:\\n\" +\n                \"          operationId: testPathItem\");\n\n        SerializationMatchers.assertEqualsToJson(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.0.3\\\",\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"schemas\\\" : {\\n\" +\n                \"      \\\"stringTest\\\" : {\\n\" +\n                \"        \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"responses\\\" : {\\n\" +\n                \"      \\\"201\\\" : {\\n\" +\n                \"        \\\"description\\\" : \\\"api response description\\\"\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"parameters\\\" : {\\n\" +\n                \"      \\\"param\\\" : {\\n\" +\n                \"        \\\"in\\\" : \\\"query\\\",\\n\" +\n                \"        \\\"description\\\" : \\\"parameter description\\\",\\n\" +\n                \"        \\\"schema\\\" : {\\n\" +\n                \"          \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"examples\\\" : {\\n\" +\n                \"      \\\"example\\\" : {\\n\" +\n                \"        \\\"summary\\\" : \\\"example summary\\\",\\n\" +\n                \"        \\\"description\\\" : \\\"example description\\\",\\n\" +\n                \"        \\\"value\\\" : \\\"This is an example/\\\"\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"requestBodies\\\" : {\\n\" +\n                \"      \\\"body\\\" : {\\n\" +\n                \"        \\\"content\\\" : {\\n\" +\n                \"          \\\"application/json\\\" : {\\n\" +\n                \"            \\\"schema\\\" : {\\n\" +\n                \"              \\\"type\\\" : \\\"object\\\"\\n\" +\n                \"            }\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"headers\\\" : {\\n\" +\n                \"      \\\"test-head\\\" : {\\n\" +\n                \"        \\\"description\\\" : \\\"test header description\\\"\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"securitySchemes\\\" : {\\n\" +\n                \"      \\\"basic\\\" : {\\n\" +\n                \"        \\\"description\\\" : \\\"ref security description\\\",\\n\" +\n                \"        \\\"in\\\" : \\\"header\\\",\\n\" +\n                \"        \\\"scheme\\\" : \\\"http\\\"\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"links\\\" : {\\n\" +\n                \"      \\\"Link\\\" : {\\n\" +\n                \"        \\\"operationRef\\\" : \\\"#/paths/~12.0~1repositories~1{username}/get\\\"\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"callbacks\\\" : {\\n\" +\n                \"      \\\"TestCallback\\\" : {\\n\" +\n                \"        \\\"{$request.query.queryUrl}\\\" : {\\n\" +\n                \"          \\\"description\\\" : \\\"test path item\\\",\\n\" +\n                \"          \\\"post\\\" : {\\n\" +\n                \"            \\\"operationId\\\" : \\\"testPathItem\\\"\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n    }\n\n    @Test\n    public void testDiscriminatorSerialization() {\n        Schema<String> propertySchema1 = new StringSchema();\n        propertySchema1.addType(propertySchema1.getType());\n\n        Schema<String> propertySchema2 = new StringSchema();\n        propertySchema2.addType(propertySchema2.getType());\n\n        Discriminator discriminator = new Discriminator().propertyName(\"type\");\n        discriminator.addExtension(\"x-otherName\", \"discriminationType\");\n\n        Schema schema = new ObjectSchema()\n                .addProperties(\"name\", propertySchema1)\n                .addProperties(\"type\", propertySchema1)\n                .discriminator(discriminator);\n\n        schema.addType(schema.getType());\n        OpenAPI openAPI = new OpenAPI().openapi(\"3.1.0\").components(new Components()\n                .addSchemas(\"pet\", schema));\n\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.1.0\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    pet:\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        type:\\n\" +\n                \"          type: string\\n\" +\n                \"      discriminator:\\n\" +\n                \"        propertyName: type\\n\" +\n                \"        x-otherName: discriminationType\\n\" +\n                \"      type: object\");\n\n        SerializationMatchers.assertEqualsToJson31(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"schemas\\\" : {\\n\" +\n                \"      \\\"pet\\\" : {\\n\" +\n                \"        \\\"properties\\\" : {\\n\" +\n                \"          \\\"name\\\" : {\\n\" +\n                \"            \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"          },\\n\" +\n                \"          \\\"type\\\" : {\\n\" +\n                \"            \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"          }\\n\" +\n                \"        },\\n\" +\n                \"        \\\"discriminator\\\" : {\\n\" +\n                \"          \\\"propertyName\\\" : \\\"type\\\",\\n\" +\n                \"          \\\"x-otherName\\\" : \\\"discriminationType\\\"\\n\" +\n                \"        },\\n\" +\n                \"        \\\"type\\\" : \\\"object\\\"\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n\n        openAPI.openapi(\"3.0.3\");\n\n        SerializationMatchers.assertEqualsToYaml(openAPI, \"openapi: 3.0.3\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    pet:\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        type:\\n\" +\n                \"          type: string\\n\" +\n                \"      discriminator:\\n\" +\n                \"        propertyName: type\\n\" +\n                \"      type: object\");\n\n        SerializationMatchers.assertEqualsToJson(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.0.3\\\",\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"schemas\\\" : {\\n\" +\n                \"      \\\"pet\\\" : {\\n\" +\n                \"        \\\"properties\\\" : {\\n\" +\n                \"          \\\"name\\\" : {\\n\" +\n                \"            \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"          },\\n\" +\n                \"          \\\"type\\\" : {\\n\" +\n                \"            \\\"type\\\" : \\\"string\\\"\\n\" +\n                \"          }\\n\" +\n                \"        },\\n\" +\n                \"        \\\"discriminator\\\" : {\\n\" +\n                \"          \\\"propertyName\\\" : \\\"type\\\"\\n\" +\n                \"        },\\n\" +\n                \"        \\\"type\\\" : \\\"object\\\"\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n    }\n\n    @Test\n    public void testPathItemsRefSerialization() {\n        OpenAPI openAPI = new OpenAPI().openapi(\"3.1.0\")\n                .path(\"/pathTest\", new PathItem()\n                        .$ref(\"#/components/pathItems/pathTest\")\n                        .description(\"This is a ref path item\")\n                        .summary(\"ref path item\")\n                )\n                .components(new Components()\n                        .addPathItem(\"pathTest\", new PathItem()\n                                .description(\"test path item\")\n                                .get(new Operation()\n                                        .operationId(\"testPathItem\")\n                                        .responses(new ApiResponses()\n                                                .addApiResponse(\"200\", new ApiResponse().description(\"response description\"))))));\n\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /pathTest:\\n\" +\n                \"    $ref: \\\"#/components/pathItems/pathTest\\\"\\n\" +\n                \"    description: This is a ref path item\\n\" +\n                \"    summary: ref path item\\n\" +\n                \"components:\\n\" +\n                \"  pathItems:\\n\" +\n                \"    pathTest:\\n\" +\n                \"      description: test path item\\n\" +\n                \"      get:\\n\" +\n                \"        operationId: testPathItem\\n\" +\n                \"        responses:\\n\" +\n                \"          \\\"200\\\":\\n\" +\n                \"            description: response description\");\n\n        SerializationMatchers.assertEqualsToJson31(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"paths\\\" : {\\n\" +\n                \"    \\\"/pathTest\\\" : {\\n\" +\n                \"      \\\"summary\\\" : \\\"ref path item\\\",\\n\" +\n                \"      \\\"description\\\" : \\\"This is a ref path item\\\",\\n\" +\n                \"      \\\"$ref\\\" : \\\"#/components/pathItems/pathTest\\\"\\n\" +\n                \"    }\\n\" +\n                \"  },\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"pathItems\\\" : {\\n\" +\n                \"      \\\"pathTest\\\" : {\\n\" +\n                \"        \\\"description\\\" : \\\"test path item\\\",\\n\" +\n                \"        \\\"get\\\" : {\\n\" +\n                \"          \\\"operationId\\\" : \\\"testPathItem\\\",\\n\" +\n                \"          \\\"responses\\\" : {\\n\" +\n                \"            \\\"200\\\" : {\\n\" +\n                \"              \\\"description\\\" : \\\"response description\\\"\\n\" +\n                \"            }\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n    }\n\n    @Test\n    public void testResponseRefSerialization() {\n        OpenAPI openAPI = new OpenAPI()\n                .openapi(\"3.1.0\")\n                .path(\"/test\", new PathItem()\n                        .description(\"test path item\")\n                        .get(new Operation()\n                                .operationId(\"testPathItem\")\n                                .responses(new ApiResponses()\n                                        .addApiResponse(\"200\"   , new ApiResponse()\n                                                .description(\"point to a $ref response\")\n                                                .$ref(\"#/components/responses/okResponse\")))))\n                .components(new Components()\n                        .addResponses(\"okResponse\", new ApiResponse().description(\"everything is good\")));\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    description: test path item\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: testPathItem\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: point to a $ref response\\n\" +\n                \"          $ref: \\\"#/components/responses/okResponse\\\"\\n\" +\n                \"components:\\n\" +\n                \"  responses:\\n\" +\n                \"    okResponse:\\n\" +\n                \"      description: everything is good\");\n\n        SerializationMatchers.assertEqualsToJson31(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"paths\\\" : {\\n\" +\n                \"    \\\"/test\\\" : {\\n\" +\n                \"      \\\"description\\\" : \\\"test path item\\\",\\n\" +\n                \"      \\\"get\\\" : {\\n\" +\n                \"        \\\"operationId\\\" : \\\"testPathItem\\\",\\n\" +\n                \"        \\\"responses\\\" : {\\n\" +\n                \"          \\\"200\\\" : {\\n\" +\n                \"            \\\"description\\\" : \\\"point to a $ref response\\\",\\n\" +\n                \"            \\\"$ref\\\" : \\\"#/components/responses/okResponse\\\"\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  },\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"responses\\\" : {\\n\" +\n                \"      \\\"okResponse\\\" : {\\n\" +\n                \"        \\\"description\\\" : \\\"everything is good\\\"\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n    }\n\n    @Test\n    public void testParameterRefSerialization() {\n        OpenAPI openAPI = new OpenAPI()\n                .openapi(\"3.1.0\")\n                .components(new Components()\n                        .addParameters(\"testParameter\", new Parameter()\n                                .in(\"query\")))\n                .path(\"/test\", new PathItem()\n                        .description(\"test path item\")\n                        .get(new Operation()\n                                .operationId(\"testPathItem\")\n                                .addParametersItem(new Parameter()\n                                        .$ref(\"#/components/parameters/testParameter\")\n                                        .description(\"test parameter\"))));\n\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    description: test path item\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: testPathItem\\n\" +\n                \"      parameters:\\n\" +\n                \"      - description: test parameter\\n\" +\n                \"        $ref: \\\"#/components/parameters/testParameter\\\"\\n\" +\n                \"components:\\n\" +\n                \"  parameters:\\n\" +\n                \"    testParameter:\\n\" +\n                \"      in: query\");\n\n        SerializationMatchers.assertEqualsToJson31(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"paths\\\" : {\\n\" +\n                \"    \\\"/test\\\" : {\\n\" +\n                \"      \\\"description\\\" : \\\"test path item\\\",\\n\" +\n                \"      \\\"get\\\" : {\\n\" +\n                \"        \\\"operationId\\\" : \\\"testPathItem\\\",\\n\" +\n                \"        \\\"parameters\\\" : [ {\\n\" +\n                \"          \\\"description\\\" : \\\"test parameter\\\",\\n\" +\n                \"          \\\"$ref\\\" : \\\"#/components/parameters/testParameter\\\"\\n\" +\n                \"        } ]\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  },\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"parameters\\\" : {\\n\" +\n                \"      \\\"testParameter\\\" : {\\n\" +\n                \"        \\\"in\\\" : \\\"query\\\"\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n    }\n\n    @Test\n    public void testExampleRefSerialization() {\n        OpenAPI openAPI = new OpenAPI()\n                .openapi(\"3.1.0\")\n                .components(new Components()\n                        .addExamples(\"testExample\", new Example()\n                                .value(\"Example on test\")\n                                .description(\"this is a example desc\")\n                                .summary(\"this is a summary test\"))\n                        .addSchemas(\"schema\", new Schema().example(new Example()\n                                .$ref(\"#/components/examples/testExample\")\n                                .description(\"ref description\")\n                                .summary(\"ref summary\"))));\n\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.1.0\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    schema:\\n\" +\n                \"      example:\\n\" +\n                \"        summary: ref summary\\n\" +\n                \"        description: ref description\\n\" +\n                \"        $ref: \\\"#/components/examples/testExample\\\"\\n\" +\n                \"  examples:\\n\" +\n                \"    testExample:\\n\" +\n                \"      summary: this is a summary test\\n\" +\n                \"      description: this is a example desc\\n\" +\n                \"      value: Example on test\");\n        SerializationMatchers.assertEqualsToJson31(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"schemas\\\" : {\\n\" +\n                \"      \\\"schema\\\" : {\\n\" +\n                \"        \\\"example\\\" : {\\n\" +\n                \"          \\\"summary\\\" : \\\"ref summary\\\",\\n\" +\n                \"          \\\"description\\\" : \\\"ref description\\\",\\n\" +\n                \"          \\\"$ref\\\" : \\\"#/components/examples/testExample\\\"\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    },\\n\" +\n                \"    \\\"examples\\\" : {\\n\" +\n                \"      \\\"testExample\\\" : {\\n\" +\n                \"        \\\"summary\\\" : \\\"this is a summary test\\\",\\n\" +\n                \"        \\\"description\\\" : \\\"this is a example desc\\\",\\n\" +\n                \"        \\\"value\\\" : \\\"Example on test\\\"\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n    }\n    @Test\n    public void testRequestBodyRefSerialization() {\n        OpenAPI openAPI = new OpenAPI()\n                .openapi(\"3.1.0\")\n                .path(\"/test\", new PathItem()\n                        .description(\"test path item\")\n                        .post(new Operation()\n                                .operationId(\"testPathItem\")\n                                .requestBody(new RequestBody()\n                                        .$ref(\"#/components/requestBodies/body\")\n                                        .description(\"ref request body\"))))\n                .components(new Components()\n                        .addRequestBodies(\"body\", new RequestBody()\n                                .content(new Content()\n                                        .addMediaType(\"application/json\", new MediaType()\n                                                .schema(new ObjectSchema())))))\n                ;\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    description: test path item\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: testPathItem\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: ref request body\\n\" +\n                \"        $ref: \\\"#/components/requestBodies/body\\\"\\n\" +\n                \"components:\\n\" +\n                \"  requestBodies:\\n\" +\n                \"    body:\\n\" +\n                \"      content:\\n\" +\n                \"        application/json:\\n\" +\n                \"          schema: \\n\" +\n                \"            type: object\");\n        SerializationMatchers.assertEqualsToJson31(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"paths\\\" : {\\n\" +\n                \"    \\\"/test\\\" : {\\n\" +\n                \"      \\\"description\\\" : \\\"test path item\\\",\\n\" +\n                \"      \\\"post\\\" : {\\n\" +\n                \"        \\\"operationId\\\" : \\\"testPathItem\\\",\\n\" +\n                \"        \\\"requestBody\\\" : {\\n\" +\n                \"          \\\"description\\\" : \\\"ref request body\\\",\\n\" +\n                \"          \\\"$ref\\\" : \\\"#/components/requestBodies/body\\\"\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  },\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"requestBodies\\\" : {\\n\" +\n                \"      \\\"body\\\" : {\\n\" +\n                \"        \\\"content\\\" : {\\n\" +\n                \"          \\\"application/json\\\" : {\\n\" +\n                \"            \\\"schema\\\" : {\\n\" +\n                \"              \\\"type\\\" : \\\"object\\\"\\n\" +\n                \"            }\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n    }\n\n    @Test\n    public void testHeaderRefSerialization() {\n        OpenAPI openAPI = new OpenAPI()\n                .openapi(\"3.1.0\")\n                .path(\"/test\", new PathItem()\n                        .description(\"test path item\")\n                        .post(new Operation()\n                                .operationId(\"testPathItem\")\n                                .responses(new ApiResponses()\n                                        .addApiResponse(\"default\", new ApiResponse()\n                                                .description(\"default response\")\n                                                .addHeaderObject(\"header\", new Header()\n                                                        .$ref(\"#/components/responses/okResponse\")\n                                                        .description(\"ref header description\"))))\n                        ))\n                .components(new Components()\n                        .addHeaders(\"test-head\", new Header()\n                                .description(\"test header description\")));\n\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    description: test path item\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: testPathItem\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          headers:\\n\" +\n                \"            header:\\n\" +\n                \"              description: ref header description\\n\" +\n                \"              $ref: \\\"#/components/responses/okResponse\\\"\\n\" +\n                \"components:\\n\" +\n                \"  headers:\\n\" +\n                \"    test-head:\\n\" +\n                \"      description: test header description\");\n        SerializationMatchers.assertEqualsToJson31(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"paths\\\" : {\\n\" +\n                \"    \\\"/test\\\" : {\\n\" +\n                \"      \\\"description\\\" : \\\"test path item\\\",\\n\" +\n                \"      \\\"post\\\" : {\\n\" +\n                \"        \\\"operationId\\\" : \\\"testPathItem\\\",\\n\" +\n                \"        \\\"responses\\\" : {\\n\" +\n                \"          \\\"default\\\" : {\\n\" +\n                \"            \\\"description\\\" : \\\"default response\\\",\\n\" +\n                \"            \\\"headers\\\" : {\\n\" +\n                \"              \\\"header\\\" : {\\n\" +\n                \"                \\\"description\\\" : \\\"ref header description\\\",\\n\" +\n                \"                \\\"$ref\\\" : \\\"#/components/responses/okResponse\\\"\\n\" +\n                \"              }\\n\" +\n                \"            }\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  },\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"headers\\\" : {\\n\" +\n                \"      \\\"test-head\\\" : {\\n\" +\n                \"        \\\"description\\\" : \\\"test header description\\\"\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n    }\n\n    @Test\n    public void testSecuritySchemeRefSerialization() {\n        OpenAPI openAPI = new OpenAPI()\n                .openapi(\"3.1.0\")\n                .components(new Components().addSecuritySchemes(\"basic\", new SecurityScheme()\n                        .$ref(\"https://external.site.com/#components/securitySchemes/basic\")\n                        .description(\"ref security description\")));\n\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.1.0\\n\" +\n                \"components:\\n\" +\n                \"  securitySchemes:\\n\" +\n                \"    basic:\\n\" +\n                \"      description: ref security description\\n\" +\n                \"      $ref: https://external.site.com/#components/securitySchemes/basic\");\n        SerializationMatchers.assertEqualsToJson31(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"securitySchemes\\\" : {\\n\" +\n                \"      \\\"basic\\\" : {\\n\" +\n                \"        \\\"description\\\" : \\\"ref security description\\\",\\n\" +\n                \"        \\\"$ref\\\" : \\\"https://external.site.com/#components/securitySchemes/basic\\\"\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n    }\n\n    @Test\n    public void testLinkRefSerialization() {\n        OpenAPI openAPI = new OpenAPI()\n                .openapi(\"3.1.0\")\n                .path(\"/test\", new PathItem()\n                        .description(\"test path item\")\n                        .post(new Operation()\n                                .operationId(\"testPathItem\")\n                                .responses(new ApiResponses()\n                                        .addApiResponse(\"default\", new ApiResponse()\n                                                .description(\"default response\")\n                                                .addLink(\"link\", new Link()\n                                                        .$ref(\"#/components/links/Link\")\n                                                        .description(\"ref link description\"))))))\n                .components(new Components().addLinks(\"Link\", new Link()\n                        .operationRef(\"#/paths/~12.0~1repositories~1{username}/get\")));\n\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    description: test path item\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: testPathItem\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          links:\\n\" +\n                \"            link:\\n\" +\n                \"              description: ref link description\\n\" +\n                \"              $ref: \\\"#/components/links/Link\\\"\\n\" +\n                \"components:\\n\" +\n                \"  links:\\n\" +\n                \"    Link:\\n\" +\n                \"      operationRef: \\\"#/paths/~12.0~1repositories~1{username}/get\\\"\");\n        SerializationMatchers.assertEqualsToJson31(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"paths\\\" : {\\n\" +\n                \"    \\\"/test\\\" : {\\n\" +\n                \"      \\\"description\\\" : \\\"test path item\\\",\\n\" +\n                \"      \\\"post\\\" : {\\n\" +\n                \"        \\\"operationId\\\" : \\\"testPathItem\\\",\\n\" +\n                \"        \\\"responses\\\" : {\\n\" +\n                \"          \\\"default\\\" : {\\n\" +\n                \"            \\\"description\\\" : \\\"default response\\\",\\n\" +\n                \"            \\\"links\\\" : {\\n\" +\n                \"              \\\"link\\\" : {\\n\" +\n                \"                \\\"description\\\" : \\\"ref link description\\\",\\n\" +\n                \"                \\\"$ref\\\" : \\\"#/components/links/Link\\\"\\n\" +\n                \"              }\\n\" +\n                \"            }\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  },\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"links\\\" : {\\n\" +\n                \"      \\\"Link\\\" : {\\n\" +\n                \"        \\\"operationRef\\\" : \\\"#/paths/~12.0~1repositories~1{username}/get\\\"\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n    }\n\n    @Test\n    public void testCallRefSerialization() {\n        OpenAPI openAPI = new OpenAPI()\n                .openapi(\"3.1.0\")\n                .path(\"/test\", new PathItem()\n                        .description(\"test path item\")\n                        .post(new Operation()\n                                .operationId(\"testPathItem\")\n                                .addCallback(\"callbackSample\", new Callback()\n                                        .$ref(\"#/components/callbacks/TestCallback\"))))\n                .components(new Components().addCallbacks(\"TestCallback\", new Callback().addPathItem(\"{$request.query.queryUrl}\", new PathItem()\n                        .description(\"test path item\")\n                        .post(new Operation()\n                                .operationId(\"testPathItem\")))));\n\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    description: test path item\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: testPathItem\\n\" +\n                \"      callbacks:\\n\" +\n                \"        callbackSample:\\n\" +\n                \"          $ref: \\\"#/components/callbacks/TestCallback\\\"\\n\" +\n                \"components:\\n\" +\n                \"  callbacks:\\n\" +\n                \"    TestCallback:\\n\" +\n                \"      '{$request.query.queryUrl}':\\n\" +\n                \"        description: test path item\\n\" +\n                \"        post:\\n\" +\n                \"          operationId: testPathItem\");\n\n        SerializationMatchers.assertEqualsToJson31(openAPI, \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"paths\\\" : {\\n\" +\n                \"    \\\"/test\\\" : {\\n\" +\n                \"      \\\"description\\\" : \\\"test path item\\\",\\n\" +\n                \"      \\\"post\\\" : {\\n\" +\n                \"        \\\"operationId\\\" : \\\"testPathItem\\\",\\n\" +\n                \"        \\\"callbacks\\\" : {\\n\" +\n                \"          \\\"callbackSample\\\" : {\\n\" +\n                \"            \\\"$ref\\\" : \\\"#/components/callbacks/TestCallback\\\"\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  },\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"callbacks\\\" : {\\n\" +\n                \"      \\\"TestCallback\\\" : {\\n\" +\n                \"        \\\"{$request.query.queryUrl}\\\" : {\\n\" +\n                \"          \\\"description\\\" : \\\"test path item\\\",\\n\" +\n                \"          \\\"post\\\" : {\\n\" +\n                \"            \\\"operationId\\\" : \\\"testPathItem\\\"\\n\" +\n                \"          }\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\");\n    }\n\n    @Test\n    public void testBooleanSchemaSerialization() {\n        OpenAPI openAPI = new OpenAPI()\n                .openapi(\"3.1.0\")\n                .components(new Components().addSchemas(\"test\", new Schema().booleanSchemaValue(true)));\n\n        LOGGER.debug(\"--------- root ----------\");\n        Json31.prettyPrint(openAPI);\n        assertEquals(Json31.pretty(openAPI), withJacksonSystemLineSeparator(\"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"schemas\\\" : {\\n\" +\n                \"      \\\"test\\\" : true\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\"));\n        LOGGER.debug(\"--------- schema ----------\");\n        Json31.prettyPrint(openAPI.getComponents().getSchemas().get(\"test\"));\n        assertEquals(Json31.pretty(openAPI.getComponents().getSchemas().get(\"test\")), \"true\");\n        LOGGER.debug(\"--------- root YAML----------\");\n        Yaml31.prettyPrint(openAPI);\n        assertEquals(Yaml31.pretty(openAPI), \"openapi: 3.1.0\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    test: true\\n\");\n        LOGGER.debug(\"--------- schema YAML ----------\");\n        Yaml31.prettyPrint(openAPI.getComponents().getSchemas().get(\"test\"));\n        assertEquals(Yaml31.pretty(openAPI.getComponents().getSchemas().get(\"test\")), \"true\\n\");\n        LOGGER.debug(\"--------- root 3.0 ----------\");\n        Json.prettyPrint(openAPI);\n        assertEquals(Json.pretty(openAPI), withJacksonSystemLineSeparator(\"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"schemas\\\" : {\\n\" +\n                \"      \\\"test\\\" : { }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\"));\n        LOGGER.debug(\"--------- schema 3.0 ----------\");\n        Json.prettyPrint(openAPI.getComponents().getSchemas().get(\"test\"));\n        assertEquals(Json.pretty(openAPI.getComponents().getSchemas().get(\"test\")), \"{ }\");\n        LOGGER.debug(\"--------- root YAML 3.0 ----------\");\n        Yaml.prettyPrint(openAPI);\n        assertEquals(Yaml.pretty(openAPI), \"openapi: 3.1.0\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    test: {}\\n\");\n        LOGGER.debug(\"--------- schema YAML 3.0 ----------\");\n        Yaml.prettyPrint(openAPI.getComponents().getSchemas().get(\"test\"));\n        assertEquals(Yaml.pretty(openAPI.getComponents().getSchemas().get(\"test\")), \"{}\\n\");\n    }\n\n    @Test\n    public void testBooleanAdditionalPropertiesSerialization() throws Exception{\n        String expectedJson = \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.1.0\\\",\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"schemas\\\" : {\\n\" +\n                \"      \\\"test\\\" : {\\n\" +\n                \"        \\\"type\\\" : \\\"object\\\",\\n\" +\n                \"        \\\"additionalProperties\\\" : true\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\";\n\n        String expectedYaml = \"openapi: 3.1.0\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    test:\\n\" +\n                \"      type: object\\n\" +\n                \"      additionalProperties: true\\n\";\n\n        OpenAPI openAPI = Json31.mapper().readValue(expectedJson, OpenAPI.class);\n        String ser = Json31.pretty(openAPI);\n        assertEquals(ser, withJacksonSystemLineSeparator(expectedJson));\n        assertTrue(Boolean.TRUE.equals(openAPI.getComponents().getSchemas().get(\"test\").getAdditionalProperties()));\n        openAPI = Json.mapper().readValue(expectedJson, OpenAPI.class);\n        ser = Json.pretty(openAPI);\n        assertEquals(ser, withJacksonSystemLineSeparator(expectedJson));\n        assertTrue(Boolean.TRUE.equals(openAPI.getComponents().getSchemas().get(\"test\").getAdditionalProperties()));\n\n        openAPI = Yaml31.mapper().readValue(expectedYaml, OpenAPI.class);\n        ser = Yaml31.pretty(openAPI);\n        assertEquals(ser, expectedYaml);\n        assertTrue(Boolean.TRUE.equals(openAPI.getComponents().getSchemas().get(\"test\").getAdditionalProperties()));\n        openAPI = Yaml.mapper().readValue(expectedYaml, OpenAPI.class);\n        ser = Yaml.pretty(openAPI);\n        assertEquals(ser, expectedYaml);\n        assertTrue(Boolean.TRUE.equals(openAPI.getComponents().getSchemas().get(\"test\").getAdditionalProperties()));\n\n        expectedJson = \"{\\n\" +\n                \"  \\\"openapi\\\" : \\\"3.0.0\\\",\\n\" +\n                \"  \\\"components\\\" : {\\n\" +\n                \"    \\\"schemas\\\" : {\\n\" +\n                \"      \\\"test\\\" : {\\n\" +\n                \"        \\\"type\\\" : \\\"object\\\",\\n\" +\n                \"        \\\"additionalProperties\\\" : true\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\";\n\n        expectedYaml = \"openapi: 3.0.0\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    test:\\n\" +\n                \"      type: object\\n\" +\n                \"      additionalProperties: true\\n\";\n\n        openAPI = Json31.mapper().readValue(expectedJson, OpenAPI.class);\n        ser = Json31.pretty(openAPI);\n        assertEquals(ser, withJacksonSystemLineSeparator(expectedJson));\n        assertTrue(Boolean.TRUE.equals(openAPI.getComponents().getSchemas().get(\"test\").getAdditionalProperties()));\n        openAPI = Json.mapper().readValue(expectedJson, OpenAPI.class);\n        ser = Json.pretty(openAPI);\n        assertEquals(ser, withJacksonSystemLineSeparator(expectedJson));\n        assertTrue(Boolean.TRUE.equals(openAPI.getComponents().getSchemas().get(\"test\").getAdditionalProperties()));\n\n        openAPI = Yaml31.mapper().readValue(expectedYaml, OpenAPI.class);\n        ser = Yaml31.pretty(openAPI);\n        assertEquals(ser, expectedYaml);\n        assertTrue(Boolean.TRUE.equals(openAPI.getComponents().getSchemas().get(\"test\").getAdditionalProperties()));\n        openAPI = Yaml.mapper().readValue(expectedYaml, OpenAPI.class);\n        ser = Yaml.pretty(openAPI);\n        assertEquals(ser, expectedYaml);\n        assertTrue(Boolean.TRUE.equals(openAPI.getComponents().getSchemas().get(\"test\").getAdditionalProperties()));\n    }\n\n    @Test(expectedExceptions = JacksonYAMLParseException.class)\n    public void testSerializeYAML31WithCustomFactoryAndCodePointLimitReached() throws Exception {\n        // given\n        LoaderOptions loaderOptions = new LoaderOptions();\n        loaderOptions.setCodePointLimit(1);\n        YAMLFactory yamlFactory = YAMLFactory.builder()\n                .loaderOptions(loaderOptions)\n                .build();\n        final String yaml = ResourceUtils.loadClassResource(getClass(), \"specFiles/petstore-3.0.yaml\");\n\n        // when\n        OpenAPI deser = ObjectMapperFactory.createYaml31(yamlFactory).readValue(yaml, OpenAPI.class);\n\n        // then - Throw JacksonYAMLParseException\n    }\n\n    private static String withJacksonSystemLineSeparator(String s) {\n        return s.replace(\"\\n\", DefaultIndenter.SYS_LF);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/serialization/ParameterSerializationTest.java",
    "content": "package io.swagger.v3.core.serialization;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.Content;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.media.NumberSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport io.swagger.v3.oas.models.parameters.HeaderParameter;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.parameters.PathParameter;\nimport io.swagger.v3.oas.models.parameters.QueryParameter;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport org.testng.annotations.Test;\n\nimport java.math.BigDecimal;\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class ParameterSerializationTest {\n    private final ObjectMapper m = Json.mapper();\n\n    @Test(description = \"it should serialize a QueryParameter\")\n    public void serializeQueryParameter() {\n        final Parameter p = new QueryParameter()\n                .schema(new StringSchema());\n        final String json = \"{\\\"in\\\":\\\"query\\\",\\\"schema\\\":{\\\"type\\\":\\\"string\\\"}}\";\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should serialize a QueryParameter with array\")\n    public void serializeArrayQueryParameter() {\n        final Parameter p = new QueryParameter()\n                .schema(new ArraySchema()\n                        .items(new StringSchema()));\n        final String json = \"{\" +\n                \"   \\\"in\\\":\\\"query\\\",\" +\n                \"   \\\"schema\\\":{\" +\n                \"     \\\"type\\\":\\\"array\\\",\" +\n                \"     \\\"items\\\":{\" +\n                \"       \\\"type\\\":\\\"string\\\"\" +\n                \"   }}\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should serialize a PathParameter\")\n    public void serializePathParameter() {\n        final Parameter p = new PathParameter().schema(new StringSchema());\n        final String json = \"{\\\"in\\\":\\\"path\\\",\\\"required\\\":true,\\\"schema\\\":{\\\"type\\\":\\\"string\\\"}}\";\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should serialize a PathParameter with string array\")\n    public void serializeStringArrayPathParameter() {\n        Parameter p = new PathParameter()\n                .schema(new ArraySchema()\n                        .items(new StringSchema()));\n        final String json = \"{\\\"in\\\":\\\"path\\\",\\\"required\\\":true,\\\"schema\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\"}}}\";\n        SerializationMatchers.assertEqualsToJson(p, json);\n\n        final String yaml = \"---\\n\" +\n                \"in: \\\"path\\\"\\n\" +\n                \"required: true\\n\" +\n                \"schema:\\n\" +\n                \"  type: \\\"array\\\"\\n\" +\n                \"  items:\\n\" +\n                \"    type: \\\"string\\\"\";\n        SerializationMatchers.assertEqualsToYaml(p, yaml);\n    }\n\n    @Test(description = \"it should serialize a PathParameter with integer array\")\n    public void serializeIntegerArrayPathParameter() {\n        final Parameter p = new PathParameter()\n                .schema(new ArraySchema().items(new IntegerSchema()));\n        final String json = \"{\\\"in\\\":\\\"path\\\",\\\"required\\\":true,\\\"schema\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"integer\\\",\\\"format\\\":\\\"int32\\\"}}}\\n\";\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should it should serialize a HeaderParameter\")\n    public void serializeHeaderParameter() {\n        final Parameter p = new HeaderParameter()\n                .schema(new StringSchema());\n        final String json = \"{\\\"in\\\":\\\"header\\\",\\\"schema\\\":{\\\"type\\\":\\\"string\\\"}}\";\n        SerializationMatchers.assertEqualsToJson(p, json);\n        final String yaml = \"---\\n\" +\n                \"in: \\\"header\\\"\\n\" +\n                \"schema:\\n\" +\n                \"  type: \\\"string\\\"\";\n        SerializationMatchers.assertEqualsToYaml(p, yaml);\n    }\n\n    @Test(description = \"it should serialize a string array HeaderParameter\")\n    public void serializeStringArrayHeaderParameter() {\n        final Parameter p = new HeaderParameter()\n                .schema(new ArraySchema()\n                        .items(new StringSchema()));\n        final String json = \"{\\\"in\\\":\\\"header\\\",\\\"schema\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\"}}}\";\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should serialize a BodyParameter\")\n    public void serializeBodyParameter() {\n        final Schema model = new Schema()\n                .title(\"Cat\")\n                .addProperties(\"name\", new StringSchema());\n        final RequestBody p = new RequestBody()\n                .content(new Content().addMediaType(\"*/*\",\n                        new MediaType().schema(model)));\n\n        final String json = \"{\\\"content\\\":{\\\"*/*\\\":{\\\"schema\\\":{\\\"title\\\":\\\"Cat\\\",\\\"properties\\\":{\\\"name\\\":{\\\"type\\\":\\\"string\\\"}}}}}}\";\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should serialize a BodyParameter to yaml\")\n    public void serializeBodyParameterToYaml() {\n        final Schema model = new Schema()\n                .title(\"Cat\")\n                .addProperties(\"name\", new StringSchema());\n        final RequestBody p = new RequestBody()\n                .content(new Content().addMediaType(\"*/*\",\n                        new MediaType().schema(model)));\n        final String yaml = \"---\\n\" +\n                \"content:\\n\" +\n                \"  '*/*':\\n\" +\n                \"    schema:\\n\" +\n                \"      title: Cat\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\";\n        SerializationMatchers.assertEqualsToYaml(p, yaml);\n    }\n\n    @Test(description = \"it should serialize a ref BodyParameter\")\n    public void serializeRefBodyParameter() {\n        final Schema model = new Schema().$ref(\"#/definitions/Cat\");\n        final RequestBody p = new RequestBody()\n                .content(new Content().addMediaType(\"*/*\",\n                        new MediaType().schema(model)));\n\n        final String json = \"{\\\"content\\\":{\\\"*/*\\\":{\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Cat\\\"}}}}\";\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should serialize an array BodyParameter\")\n    public void serializeArrayBodyParameter() {\n        final Schema model = new ArraySchema().items(new Schema().$ref(\"#/definitions/Cat\"));\n        final RequestBody p = new RequestBody()\n                .content(new Content().addMediaType(\"*/*\",\n                        new MediaType().schema(model)));\n        final String json = \"{\\\"content\\\":{\\\"*/*\\\":{\\\"schema\\\":{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"$ref\\\":\\\"#/definitions/Cat\\\"}}}}}\";\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"it should serialize a path parameter with enum\")\n    public void serializeEnumPathParameter() {\n        List<String> values = new ArrayList<>();\n        values.add(\"a\");\n        values.add(\"b\");\n        values.add(\"c\");\n        Parameter p = new PathParameter()\n                .schema(new StringSchema()._enum(values));\n        final String json = \"{\" +\n                \"   \\\"in\\\":\\\"path\\\",\" +\n                \"   \\\"required\\\":true,\" +\n                \"   \\\"schema\\\":{\" +\n                \"      \\\"type\\\":\\\"string\\\",\" +\n                \"       \\\"enum\\\":[\\\"a\\\",\\\"b\\\",\\\"c\\\"]\" +\n                \"   }\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(p, json);\n    }\n\n    @Test(description = \"should serialize correctly typed numeric enums\")\n    public void testIssue1765() throws Exception {\n        String yaml =\n                \"openapi: '3.0.1'\\n\" +\n                        \"paths:\\n\" +\n                        \"  /test:\\n\" +\n                        \"    get:\\n\" +\n                        \"      parameters:\\n\" +\n                        \"      - name: \\\"days\\\"\\n\" +\n                        \"        in: \\\"path\\\"\\n\" +\n                        \"        required: true\\n\" +\n                        \"        schema:\\n\" +\n                        \"          type: \\\"integer\\\"\\n\" +\n                        \"          format: \\\"int32\\\"\\n\" +\n                        \"          enum:\\n\" +\n                        \"          - 1\\n\" +\n                        \"          - 2\\n\" +\n                        \"          - 3\\n\" +\n                        \"          - 4\\n\" +\n                        \"          - 5\\n\" +\n                        \"      responses:\\n\" +\n                        \"        default:\\n\" +\n                        \"          description: great\";\n\n        OpenAPI swagger = Yaml.mapper().readValue(yaml, OpenAPI.class);\n        SerializationMatchers.assertEqualsToYaml(swagger, yaml);\n    }\n\n    @Test(description = \"should serialize string value\")\n    public void testStringValue() {\n        final QueryParameter param = (QueryParameter) new QueryParameter().required(false);\n        Schema schema = new Schema()\n                .type(\"string\");\n        schema.setDefault(\"false\");\n\n        param.setSchema(schema);\n        final String json = \"{\" +\n                \"   \\\"in\\\":\\\"query\\\",\" +\n                \"   \\\"required\\\":false,\" +\n                \"   \\\"schema\\\":{\" +\n                \"      \\\"type\\\":\\\"string\\\",\" +\n                \"       \\\"default\\\":\\\"false\\\"\" +\n                \"   }\" +\n                \"}\";\n\n        SerializationMatchers.assertEqualsToJson(param, json);\n    }\n\n    @Test(description = \"should serialize boolean value\")\n    public void testBooleanValue() {\n        final QueryParameter param = (QueryParameter) new QueryParameter().required(false);\n        Schema schema = new Schema()\n                .type(\"boolean\");\n        schema.setDefault(\"false\");\n\n        param.setSchema(schema);\n        final String json = \"{\" +\n                \"   \\\"in\\\":\\\"query\\\",\" +\n                \"   \\\"required\\\":false,\" +\n                \"   \\\"schema\\\":{\" +\n                \"      \\\"type\\\":\\\"boolean\\\",\" +\n                \"       \\\"default\\\":\\\"false\\\"\" +\n                \"   }\" +\n                \"}\";\n\n        SerializationMatchers.assertEqualsToJson(param, json);\n    }\n\n    @Test(description = \"should serialize long value\")\n    public void testLongValue() {\n\n        final QueryParameter param = (QueryParameter) new QueryParameter().required(false);\n        Schema schema = new IntegerSchema().format(\"int64\");\n        schema.setDefault(\"1234\");\n\n        param.setSchema(schema);\n        final String json = \"{\" +\n                \"   \\\"in\\\":\\\"query\\\",\" +\n                \"   \\\"required\\\":false,\" +\n                \"   \\\"schema\\\":{\" +\n                \"      \\\"type\\\":\\\"integer\\\",\" +\n                \"       \\\"default\\\":1234,\" +\n                \"       \\\"format\\\":\\\"int64\\\"\" +\n                \"   }\" +\n                \"}\";\n\n        SerializationMatchers.assertEqualsToJson(param, json);\n    }\n\n    @Test(description = \"should serialize double value\")\n    public void testDoubleValue() {\n        final QueryParameter param = new QueryParameter();\n        param.setSchema(new NumberSchema()._default(new BigDecimal(\"12.34\")).format(\"double\"));\n\n        final String json = \"{\\\"in\\\":\\\"query\\\",\\\"schema\\\":{\\\"type\\\":\\\"number\\\",\\\"format\\\":\\\"double\\\",\\\"default\\\":12.34}}\";\n        SerializationMatchers.assertEqualsToJson(param, json);\n    }\n\n    @Test(description = \"should serialize float value\")\n    public void testFloatValue() {\n\n        final QueryParameter param = new QueryParameter();\n        param.setSchema(new NumberSchema()._default(new BigDecimal(\"12.34\")).format(\"float\"));\n\n        final String json = \"{\\\"in\\\":\\\"query\\\",\\\"schema\\\":{\\\"type\\\":\\\"number\\\",\\\"format\\\":\\\"float\\\",\\\"default\\\":12.34}}\";\n        SerializationMatchers.assertEqualsToJson(param, json);\n    }\n\n    @Test(description = \"should serialize incorrect boolean value as string\")\n    public void testIncorrectBoolean() {\n        final QueryParameter param = (QueryParameter) new QueryParameter().required(false);\n        Schema schema = new Schema()\n                .type(\"boolean\");\n        schema.setDefault(\"test\");\n\n        param.setSchema(schema);\n        final String json = \"{\" +\n                \"   \\\"in\\\":\\\"query\\\",\" +\n                \"   \\\"required\\\":false,\" +\n                \"   \\\"schema\\\":{\" +\n                \"      \\\"type\\\":\\\"boolean\\\",\" +\n                \"       \\\"default\\\":\\\"test\\\"\" +\n                \"   }\" +\n                \"}\";\n\n        SerializationMatchers.assertEqualsToJson(param, json);\n    }\n\n    @Test(description = \"should not serialize incorrect long value\")\n    public void testIncorrectLong() {\n        final QueryParameter param = (QueryParameter) new QueryParameter().required(false);\n        Schema schema = new IntegerSchema().format(\"int64\");\n        schema.setDefault(\"test\");\n\n        param.setSchema(schema);\n        final String json = \"{\" +\n                \"   \\\"in\\\":\\\"query\\\",\" +\n                \"   \\\"required\\\":false,\" +\n                \"   \\\"schema\\\":{\" +\n                \"      \\\"type\\\":\\\"integer\\\",\" +\n                \"       \\\"format\\\":\\\"int64\\\"\" +\n                \"   }\" +\n                \"}\";\n\n        SerializationMatchers.assertEqualsToJson(param, json);\n    }\n\n    @Test(description = \"should not serialize incorrect double value\")\n    public void testIncorrectDouble() {\n        final QueryParameter param = (QueryParameter) new QueryParameter().required(false);\n        Schema schema = new NumberSchema().format(\"double\");\n        schema.setDefault(\"test\");\n\n        param.setSchema(schema);\n        final String json = \"{\" +\n                \"   \\\"in\\\":\\\"query\\\",\" +\n                \"   \\\"required\\\":false,\" +\n                \"   \\\"schema\\\":{\" +\n                \"      \\\"type\\\":\\\"number\\\",\" +\n                \"       \\\"format\\\":\\\"double\\\"\" +\n                \"   }\" +\n                \"}\";\n\n        SerializationMatchers.assertEqualsToJson(param, json);\n    }\n\n    @Test(description = \"should mark a parameter as readOnly\")\n    public void testReadOnlyParameter() throws Exception {\n        final QueryParameter qp = new QueryParameter();\n        qp.setSchema(new StringSchema().readOnly(true));\n        final String json = \"{\" +\n                \"   \\\"in\\\":\\\"query\\\",\" +\n                \"   \\\"schema\\\":{\" +\n                \"      \\\"type\\\":\\\"string\\\",\" +\n                \"      \\\"readOnly\\\":true\" +\n                \"   }\" +\n                \"}\";\n\n        SerializationMatchers.assertEqualsToJson(qp, json);\n    }\n\n    @Test(description = \"should mark a parameter as to allow empty value\")\n    public void testAllowEmptyValueParameter() throws Exception {\n        final Parameter qp = new QueryParameter().allowEmptyValue(true);\n        final String json = \"{\\\"in\\\":\\\"query\\\",\\\"allowEmptyValue\\\":true}\";\n        SerializationMatchers.assertEqualsToJson(qp, json);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/serialization/ResponseExamplesTest.java",
    "content": "package io.swagger.v3.core.serialization;\n\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.models.examples.Example;\nimport io.swagger.v3.oas.models.media.Content;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\n\npublic class ResponseExamplesTest {\n    @Test(description = \"it should create a response\")\n    public void createResponse() throws IOException {\n        final ApiResponse response = new ApiResponse()\n                .content(new Content()\n                        .addMediaType(\"application/json\", new MediaType()\n                                .addExamples(\"test\", new Example().value(\"{\\\"name\\\":\\\"Fred\\\",\\\"id\\\":123456\\\"}\"))));\n\n        final String json = \"{\\n\" +\n                \"  \\\"content\\\" : {\\n\" +\n                \"    \\\"application/json\\\" : {\\n\" +\n                \"      \\\"examples\\\" : {\\n\" +\n                \"        \\\"test\\\" : {\\n\" +\n                \"          \\\"value\\\" : \\\"{\\\\\\\"name\\\\\\\":\\\\\\\"Fred\\\\\\\",\\\\\\\"id\\\\\\\":123456\\\\\\\"}\\\"\\n\" +\n                \"        }\\n\" +\n                \"      }\\n\" +\n                \"    }\\n\" +\n                \"  }\\n\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(response, json);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/serialization/SchemaSerializationTest.java",
    "content": "package io.swagger.v3.core.serialization;\n\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.JsonSchema;\nimport org.testng.annotations.Test;\n\nimport java.math.BigDecimal;\nimport java.util.Arrays;\nimport java.util.HashSet;\n\npublic class SchemaSerializationTest {\n\n    @Test\n    public void serializeRefSchema3_1() {\n        OpenAPI openAPI = new OpenAPI()\n                .components(new Components()\n                        .addSchemas(\"Pet\", new JsonSchema()\n                                .types(new HashSet<>(Arrays.asList(\"object\")))\n                                .format(\"whatever\")\n                                ._if(new JsonSchema().type(\"string\").types(new HashSet<>(Arrays.asList(\"string\"))))\n                                .then(new JsonSchema().type(\"string\").types(new HashSet<>(Arrays.asList(\"string\"))))\n                                ._else(new JsonSchema().type(\"string\").types(new HashSet<>(Arrays.asList(\"string\"))))\n                                .minimum(BigDecimal.valueOf(1))\n                                .addProperties(\"id\", new JsonSchema().type(\"integer\").types(new HashSet<>(Arrays.asList(\"integer\"))))\n                                .addProperties(\"name\", new JsonSchema().type(\"string\").types(new HashSet<>(Arrays.asList(\"string\"))))\n                                .addProperties(\"tag\", new JsonSchema().type(\"string\").types(new HashSet<>(Arrays.asList(\"string\")))))\n                        .addSchemas(\"AnotherPet\", new JsonSchema()\n                                .title(\"Another Pet\")\n                                .description(\"Another Pet for petstore referencing Pet schema\")\n                                .$ref(\"#/components/schemas/Pet\")\n                                .addProperties(\"category\", new JsonSchema().types(new HashSet<>(Arrays.asList(\"string\"))))\n                                .addProperties(\"photoUrl\", new JsonSchema().types(new HashSet<>(Arrays.asList(\"string\"))))));\n\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.0.1\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Pet:\\n\" +\n                \"      type: object\\n\" +\n                \"      format: whatever\\n\" +\n                \"      if:\\n\" +\n                \"        type: string\\n\" +\n                \"      then:\\n\" +\n                \"        type: string\\n\" +\n                \"      else:\\n\" +\n                \"        type: string\\n\" +\n                \"      minimum: 1\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        tag:\\n\" +\n                \"          type: string\\n\" +\n                \"    AnotherPet:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"      description: Another Pet for petstore referencing Pet schema\\n\" +\n                \"      properties:\\n\" +\n                \"        category:\\n\" +\n                \"          type: string\\n\" +\n                \"        photoUrl:\\n\" +\n                \"          type: string\\n\" +\n                \"      title: Another Pet\\n\");\n        SerializationMatchers.assertEqualsToYaml(openAPI, \"openapi: 3.0.1\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Pet:\\n\" +\n                \"      minimum: 1\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        tag:\\n\" +\n                \"          type: string\\n\" +\n                \"      format: whatever\\n\" +\n                \"    AnotherPet:\\n\" +\n                \"      $ref: \\\"#/components/schemas/Pet\\\"\\n\");\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/serialization/SecurityDefinitionTest.java",
    "content": "package io.swagger.v3.core.serialization;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.v3.core.oas.models.Person;\nimport io.swagger.v3.core.util.ResourceUtils;\nimport io.swagger.v3.core.util.TestUtils;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.info.Contact;\nimport io.swagger.v3.oas.models.info.Info;\nimport io.swagger.v3.oas.models.media.Content;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.security.OAuthFlow;\nimport io.swagger.v3.oas.models.security.OAuthFlows;\nimport io.swagger.v3.oas.models.security.Scopes;\nimport io.swagger.v3.oas.models.security.SecurityRequirement;\nimport io.swagger.v3.oas.models.security.SecurityScheme;\nimport io.swagger.v3.oas.models.servers.Server;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\nimport java.util.Collections;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class SecurityDefinitionTest {\n\n    @Test(description = \"it should serialize correctly security\")\n    public void serializeSecurity() throws IOException {\n        final OpenAPI oas = TestUtils.deserializeJsonFileFromClasspath(\"specFiles/securityDefinitions.json\", OpenAPI.class);\n        final String json = ResourceUtils.loadClassResource(getClass(), \"specFiles/securityDefinitions.json\");\n        SerializationMatchers.assertEqualsToJson(oas, json);\n    }\n\n    @Test(description = \"it should create a model with security requirements\")\n    public void createModelWithSecurityRequirements() throws IOException {\n        final Schema personModel = ModelConverters.getInstance().read(Person.class).get(\"Person\");\n        final Schema errorModel = ModelConverters.getInstance().read(Error.class).get(\"Error\");\n\n        final Info info = new Info()\n                .version(\"1.0.0\")\n                .title(\"Swagger Petstore\");\n\n        final Contact contact = new Contact()\n                .name(\"Swagger API Team\")\n                .email(\"foo@bar.baz\")\n                .url(\"http://swagger.io\");\n        info.setContact(contact);\n\n        final OpenAPI oas = new OpenAPI()\n                .info(info)\n                .addServersItem(new Server()\n                        .url(\"http://petstore.swagger.io\"))\n                .schema(\"Person\", personModel)\n                .schema(\"Error\", errorModel);\n\n        oas.schemaRequirement(\"githubAccessCode\",\n                new SecurityScheme()\n                        .flows(new OAuthFlows()\n                                .authorizationCode(new OAuthFlow()\n                                        .scopes(new Scopes().addString(\"user:email\", \"Grants read access to a user’s email addresses.\")))));\n\n        final Operation get = new Operation()\n                .summary(\"finds pets in the system\")\n                .description(\"a longer description\")\n                .addTagsItem(\"Pet Operations\")\n                .operationId(\"get pet by id\");\n\n        get.addParametersItem(new Parameter()\n                .in(\"query\")\n                .name(\"tags\")\n                .description(\"tags to filter by\")\n                .required(false)\n                .schema(new StringSchema()));\n        get.addParametersItem(new Parameter()\n                .in(\"path\")\n                .name(\"petId\")\n                .description(\"pet to fetch\")\n                .schema(new IntegerSchema().format(\"int64\")));\n\n        final ApiResponse response = new ApiResponse()\n                .description(\"pets returned\")\n                .content(new Content().addMediaType(\"*/*\", new MediaType().schema(new Schema().$ref(\"Person\"))));\n\n        final ApiResponse errorResponse = new ApiResponse()\n                .description(\"error response\")\n                .content(new Content().addMediaType(\"*/*\", new MediaType().schema(new Schema().$ref(\"Error\"))));\n\n        get.responses(new ApiResponses()\n                .addApiResponse(\"200\", response)\n                .addApiResponse(\"default\", errorResponse))\n                .addSecurityItem(new SecurityRequirement()\n                        .addList(\"internal_oauth2\", \"user:email\"))\n                .addSecurityItem(new SecurityRequirement()\n                        .addList(\"api_key\"));\n\n        oas.path(\"/pets\", new PathItem().get(get));\n\n        final String json = ResourceUtils.loadClassResource(getClass(), \"ModelWithSecurityRequirements.json\");\n        SerializationMatchers.assertEqualsToJson(oas, json);\n    }\n\n    @Test(description = \"Security Scheme deserialization should not remove extensions\")\n    public void doNotRemoveExtensions() {\n        final SecurityScheme securityScheme = TestUtils.deserializeJsonFileFromClasspath(\"specFiles/securitySchemaWithExtension.json\", SecurityScheme.class);\n\n        final Map<String, Object> extensions = securityScheme.getExtensions();\n        final Map<String, Object> expected = Collections.singletonMap(\"x-custom\", Collections.singletonMap(\"key-string\", \"value-one\"));\n\n        assertEquals(extensions, expected);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/serialization/YamlSerializerTest.java",
    "content": "package io.swagger.v3.core.serialization;\n\nimport com.fasterxml.jackson.databind.JsonNode;\nimport io.swagger.v3.core.util.Yaml;\nimport org.testng.annotations.Test;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class YamlSerializerTest {\n    @Test\n    public void testMultiLineYaml() throws Exception {\n        final String yaml =\n                \"multiLineString: |\\n\" +\n                        \"  \\\"hello multiple lines\\n\" +\n                        \"  in my content without\\n\" +\n                        \"  any problem\\\"\\n\";\n\n        JsonNode node = Yaml.mapper().readValue(yaml, JsonNode.class);\n\n        String serializedYaml = Yaml.pretty(node);\n\n        assertEquals(serializedYaml, yaml);\n    }\n\n    @Test\n    public void testQuotedStrings() throws Exception {\n        final String yaml =\n                \"singleLineUnquotedString: Look ma no quotes\\n\";\n\n        JsonNode node = Yaml.mapper().readValue(yaml, JsonNode.class);\n\n        String serializedYaml = Yaml.pretty(node);\n\n        assertEquals(serializedYaml, yaml);\n    }\n\n    @Test\n    public void testPreserveQuotesOnNumbers() throws Exception {\n        final String yaml =\n                \"quotedNumber: \\\"3.0\\\"\\n\";\n\n        JsonNode node = Yaml.mapper().readValue(yaml, JsonNode.class);\n\n        String serializedYaml = Yaml.pretty(node);\n\n        assertEquals(serializedYaml, yaml);\n    }\n\n    @Test\n    public void testPreserveNoQuotesOnNumbers() throws Exception {\n        final String yaml =\n                \"unquotedNumber: 4.0\\n\";\n\n        JsonNode node = Yaml.mapper().readValue(yaml, JsonNode.class);\n\n        String serializedYaml = Yaml.pretty(node);\n\n        assertEquals(serializedYaml, yaml);\n    }\n\n    @Test\n    public void testPreserveNoQuotesOnNonNumbers() throws Exception {\n        final String yaml =\n                \"unquotedNumber: 4.0.0\\n\";\n\n        JsonNode node = Yaml.mapper().readValue(yaml, JsonNode.class);\n\n        String serializedYaml = Yaml.pretty(node);\n\n        assertEquals(serializedYaml, yaml);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/serialization/auth/AuthSerializationTest.java_",
    "content": "package io.swagger.v3.core.serialization.auth;\n\nimport io.swagger.v3.core.matchers.SerializationMatchers;\nimport io.swagger.models.auth.ApiKeyAuthDefinition;\nimport io.swagger.models.auth.BasicAuthDefinition;\nimport io.swagger.models.auth.In;\nimport io.swagger.models.auth.OAuth2Definition;\n\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\n\npublic class AuthSerializationTest {\n\n    @Test(description = \"it should convert serialize a basic auth model\")\n    public void testBasicAuth() throws IOException {\n        final BasicAuthDefinition auth = new BasicAuthDefinition();\n        final String json = \"{\\\"type\\\":\\\"basic\\\"}\";\n        SerializationMatchers.assertEqualsToJson(auth, json);\n    }\n\n    @Test(description = \"it should convert serialize a header key model\")\n    public void testHeaderKeyToJson() throws IOException {\n        final ApiKeyAuthDefinition auth = new ApiKeyAuthDefinition()\n                .name(\"api-key\")\n                .in(In.HEADER);\n        final String json = \"{\\\"type\\\":\\\"apiKey\\\",\\\"name\\\":\\\"api-key\\\",\\\"in\\\":\\\"header\\\"}\";\n        SerializationMatchers.assertEqualsToJson(auth, json);\n    }\n\n    @Test(description = \"it should convert serialize a header key model to yaml\")\n    public void testHeaderKeyToYaml() throws IOException {\n        final ApiKeyAuthDefinition auth = new ApiKeyAuthDefinition()\n                .name(\"api-key\")\n                .in(In.HEADER);\n        final String yaml = \"---\\n\" +\n                \"type: \\\"apiKey\\\"\\n\" +\n                \"name: \\\"api-key\\\"\\n\" +\n                \"in: \\\"header\\\"\";\n        SerializationMatchers.assertEqualsToYaml(auth, yaml);\n    }\n\n    @Test(description = \"it should convert serialize an oauth2 implicit flow model\")\n    public void testImplicitAuth() throws IOException {\n        final OAuth2Definition auth = new OAuth2Definition()\n                .implicit(\"http://foo.com/authorization\");\n        final String json = \"{\\\"type\\\":\\\"oauth2\\\",\\\"authorizationUrl\\\":\\\"http://foo.com/authorization\\\",\\\"flow\\\":\\\"implicit\\\"}\";\n        SerializationMatchers.assertEqualsToJson(auth, json);\n    }\n\n    @Test(description = \"it should convert serialize an oauth2 password flow model\")\n    public void testPasswordAuth() throws IOException {\n        final OAuth2Definition auth = new OAuth2Definition()\n                .password(\"http://foo.com/token\");\n        final String json = \"{\\\"type\\\":\\\"oauth2\\\",\\\"tokenUrl\\\":\\\"http://foo.com/token\\\",\\\"flow\\\":\\\"password\\\"}\";\n        SerializationMatchers.assertEqualsToJson(auth, json);\n    }\n\n    @Test(description = \"it should convert serialize an oauth2 application flow model\")\n    public void testApplicationAuth() throws IOException {\n        final OAuth2Definition auth = new OAuth2Definition()\n                .application(\"http://foo.com/token\");\n        final String json = \"{\\\"type\\\":\\\"oauth2\\\",\\\"tokenUrl\\\":\\\"http://foo.com/token\\\",\\\"flow\\\":\\\"application\\\"}\";\n        SerializationMatchers.assertEqualsToJson(auth, json);\n    }\n\n    @Test(description = \"it should convert serialize an oauth2 accessCode flow model\")\n    public void testaAcessCode() throws IOException {\n        final OAuth2Definition auth = new OAuth2Definition()\n                .accessCode(\"http://foo.com/authorizationUrl\", \"http://foo.com/token\");\n        final String json = \"{\\n\" +\n                \"   \\\"type\\\":\\\"oauth2\\\",\\n\" +\n                \"   \\\"authorizationUrl\\\":\\\"http://foo.com/authorizationUrl\\\",\\n\" +\n                \"   \\\"tokenUrl\\\":\\\"http://foo.com/token\\\",\\n\" +\n                \"   \\\"flow\\\":\\\"accessCode\\\"\\n\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(auth, json);\n    }\n\n    @Test(description = \"it should convert serialize an oauth2 implicit flow model with scopes\")\n    public void testImplicitWithScopes() throws IOException {\n        final OAuth2Definition auth = new OAuth2Definition()\n                .implicit(\"http://foo.com/authorization\")\n                .scope(\"email\", \"read your email\");\n        final String json = \"{\\n\" +\n                \"   \\\"type\\\":\\\"oauth2\\\",\\n\" +\n                \"   \\\"authorizationUrl\\\":\\\"http://foo.com/authorization\\\",\\n\" +\n                \"   \\\"flow\\\":\\\"implicit\\\",\\n\" +\n                \"   \\\"scopes\\\":{\\n\" +\n                \"      \\\"email\\\":\\\"read your email\\\"\\n\" +\n                \"   }\\n\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(auth, json);\n    }\n\n    @Test(description = \"it should convert serialize an oauth2 password flow model with scopes\")\n    public void testPasswordWithScopes() throws IOException {\n        final OAuth2Definition auth = new OAuth2Definition()\n                .password(\"http://foo.com/token\")\n                .scope(\"email\", \"read your email\");\n        final String json = \"{\\n\" +\n                \"   \\\"type\\\":\\\"oauth2\\\",\\n\" +\n                \"   \\\"tokenUrl\\\":\\\"http://foo.com/token\\\",\\n\" +\n                \"   \\\"flow\\\":\\\"password\\\",\\n\" +\n                \"   \\\"scopes\\\":{\\n\" +\n                \"      \\\"email\\\":\\\"read your email\\\"\\n\" +\n                \"   }\\n\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(auth, json);\n    }\n\n    @Test(description = \"it should convert serialize an oauth2 application flow model with scopes\")\n    public void testApplicationWithScopes() throws IOException {\n        final OAuth2Definition auth = new OAuth2Definition()\n                .application(\"http://foo.com/token\")\n                .scope(\"email\", \"read your email\");\n        final String json = \"{\\n\" +\n                \"   \\\"type\\\":\\\"oauth2\\\",\\n\" +\n                \"   \\\"tokenUrl\\\":\\\"http://foo.com/token\\\",\\n\" +\n                \"   \\\"flow\\\":\\\"application\\\",\\n\" +\n                \"   \\\"scopes\\\":{\\n\" +\n                \"      \\\"email\\\":\\\"read your email\\\"\\n\" +\n                \"   }\\n\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(auth, json);\n    }\n\n    @Test(description = \"it should convert serialize an oauth2 accessCode flow model with scopes\")\n    public void testAccessCodeWithScopes() throws IOException {\n        final OAuth2Definition auth = new OAuth2Definition()\n                .accessCode(\"http://foo.com/authorizationUrl\", \"http://foo.com/token\")\n                .scope(\"email\", \"read your email\");\n        final String json = \"{\\n\" +\n                \"   \\\"type\\\":\\\"oauth2\\\",\\n\" +\n                \"   \\\"authorizationUrl\\\":\\\"http://foo.com/authorizationUrl\\\",\\n\" +\n                \"   \\\"tokenUrl\\\":\\\"http://foo.com/token\\\",\\n\" +\n                \"   \\\"flow\\\":\\\"accessCode\\\",\\n\" +\n                \"   \\\"scopes\\\":{\\n\" +\n                \"      \\\"email\\\":\\\"read your email\\\"\\n\" +\n                \"   }\\n\" +\n                \"}\";\n        SerializationMatchers.assertEqualsToJson(auth, json);\n    }\n}\n\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/serialization/properties/PropertySerializationTest.java",
    "content": "package io.swagger.v3.core.serialization.properties;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.JsonAssert;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.BooleanSchema;\nimport io.swagger.v3.oas.models.media.DateSchema;\nimport io.swagger.v3.oas.models.media.DateTimeSchema;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.MapSchema;\nimport io.swagger.v3.oas.models.media.NumberSchema;\nimport io.swagger.v3.oas.models.media.ObjectSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\nimport java.math.BigDecimal;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\n\npublic class PropertySerializationTest {\n    private final ObjectMapper m = Json.mapper();\n\n    @Test(description = \"it should serialize a BooleanSchema\")\n    public void serializeBooleanSchema() throws IOException {\n        final BooleanSchema p = new BooleanSchema()\n                ._default(true);\n        final String json = \"{\\\"type\\\":\\\"boolean\\\",\\\"default\\\":true}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize a BooleanSchema\")\n    public void deserializeBooleanSchema() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"boolean\\\",\\\"default\\\":false}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getType(), \"boolean\");\n        assertNull(p.getFormat());\n        assertEquals(p.getClass(), BooleanSchema.class);\n        assertEquals(((BooleanSchema) p).getDefault(), Boolean.FALSE);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize a DateProperty\")\n    public void serializeDateProperty() throws IOException {\n        final DateSchema p = new DateSchema();\n        final String json = \"{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"date\\\"}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize a DateProperty\")\n    public void deserializeDateProperty() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"date\\\"}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getType(), \"string\");\n        assertEquals(p.getFormat(), \"date\");\n        assertEquals(p.getClass(), DateSchema.class);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize a DateTimeProperty\")\n    public void serializeDateTimeProperty() throws IOException {\n        final DateTimeSchema p = new DateTimeSchema();\n        final String json = \"{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"date-time\\\"}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize a DateTimeProperty\")\n    public void deserializeDateTimeProperty() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"date-time\\\"}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getType(), \"string\");\n        assertEquals(p.getFormat(), \"date-time\");\n        assertEquals(p.getClass(), DateTimeSchema.class);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize a DoubleProperty\")\n    public void serializeDoubleProperty() throws IOException {\n        final NumberSchema p = new NumberSchema()\n                ._default(new BigDecimal(\"3.14159\"));\n        p.format(\"double\");\n        final String json = \"{\\\"type\\\":\\\"number\\\",\\\"format\\\":\\\"double\\\",\\\"default\\\":3.14159}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize a DoubleProperty\")\n    public void deserializeDoubleProperty() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"number\\\",\\\"format\\\":\\\"double\\\"}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getType(), \"number\");\n        assertEquals(p.getFormat(), \"double\");\n        assertEquals(p.getClass(), NumberSchema.class);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize a FloatProperty\")\n    public void serializeFloatProperty() throws IOException {\n        final NumberSchema p = new NumberSchema()\n                ._default(new BigDecimal(\"1.2\"));\n        p.format(\"float\");\n        final String json = \"{\\\"type\\\":\\\"number\\\",\\\"format\\\":\\\"float\\\",\\\"default\\\":1.2}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize a FloatProperty\")\n    public void deserializeFloatProperty() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"number\\\",\\\"format\\\":\\\"float\\\"}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getType(), \"number\");\n        assertEquals(p.getFormat(), \"float\");\n        assertEquals(p.getClass(), NumberSchema.class);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize an IntegerProperty\")\n    public void serializeIntegerProperty() throws IOException {\n        final IntegerSchema p = new IntegerSchema()\n                ._default(32);\n        final String json = \"{\\\"type\\\":\\\"integer\\\",\\\"format\\\":\\\"int32\\\",\\\"default\\\":32}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize a IntegerProperty\")\n    public void deserializeIntegerProperty() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"integer\\\",\\\"format\\\":\\\"int32\\\"}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getType(), \"integer\");\n        assertEquals(p.getFormat(), \"int32\");\n        assertEquals(p.getClass(), IntegerSchema.class);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize a LongProperty\")\n    public void serializeLongProperty() throws IOException {\n        final IntegerSchema p = new IntegerSchema()\n                .format(\"int64\")\n                ._default(8675309);\n        final String json = \"{\\\"type\\\":\\\"integer\\\",\\\"format\\\":\\\"int64\\\",\\\"default\\\":8675309}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize a LongProperty\")\n    public void deserializeLongProperty() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"integer\\\",\\\"format\\\":\\\"int64\\\"}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getType(), \"integer\");\n        assertEquals(p.getFormat(), \"int64\");\n        assertEquals(p.getClass(), IntegerSchema.class);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize a string MapProperty\")\n    public void serializeStringMapProperty() throws IOException {\n        final Schema p = new MapSchema().additionalProperties(new StringSchema());\n        final String json = \"{\\\"type\\\":\\\"object\\\",\\\"additionalProperties\\\":{\\\"type\\\":\\\"string\\\"}}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize a string MapProperty\")\n    public void deserializeStringMapProperty() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"object\\\",\\\"additionalProperties\\\":{\\\"type\\\":\\\"string\\\"}}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getType(), \"object\");\n        assertEquals(p.getClass(), MapSchema.class);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize a integer MapProperty\")\n    public void serializeIntegerMapProperty() throws IOException {\n        final Schema p = new MapSchema().additionalProperties(new IntegerSchema());\n        final String json = \"{\\\"type\\\":\\\"object\\\",\\\"additionalProperties\\\":{\\\"type\\\":\\\"integer\\\",\\\"format\\\":\\\"int32\\\"}}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize a integer MapProperty\")\n    public void deserializeIntegerMapProperty() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"object\\\",\\\"additionalProperties\\\":{\\\"type\\\":\\\"integer\\\",\\\"format\\\":\\\"int32\\\"}}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getType(), \"object\");\n        assertEquals(p.getClass(), MapSchema.class);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize a long MapProperty\")\n    public void serializeLongMapProperty() throws IOException {\n        final Schema p = new MapSchema().additionalProperties(new IntegerSchema().format(\"int64\"));\n        final String json = \"{\\\"type\\\":\\\"object\\\",\\\"additionalProperties\\\":{\\\"type\\\":\\\"integer\\\",\\\"format\\\":\\\"int64\\\"}}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize a long MapProperty\")\n    public void deserializeLongMapProperty() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"object\\\",\\\"additionalProperties\\\":{\\\"type\\\":\\\"integer\\\",\\\"format\\\":\\\"int64\\\"}}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getType(), \"object\");\n        assertEquals(p.getClass(), MapSchema.class);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize a RefProperty\")\n    public void serializeRefProperty() throws IOException {\n        final Schema p = new Schema().$ref(\"#/definitions/Dog\");\n        final String json = \"{\\\"$ref\\\":\\\"#/definitions/Dog\\\"}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize a RefProperty\")\n    public void deserializeRefProperty() throws IOException {\n        final String json = \"{\\\"$ref\\\":\\\"#/definitions/Dog\\\"}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getClass(), Schema.class);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize a StringProperty\")\n    public void serializeStringProperty() throws IOException {\n        final StringSchema p = new StringSchema()\n                ._default(\"Bob\");\n        final String json = \"{\\\"type\\\":\\\"string\\\",\\\"default\\\":\\\"Bob\\\"}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize a StringProperty\")\n    public void deserializeStringProperty() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"string\\\"}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getType(), \"string\");\n        assertEquals(p.getClass(), StringSchema.class);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize a StringProperty with enums\")\n    public void serializeEnumStringProperty() throws IOException {\n        final StringSchema p = new StringSchema();\n        p._enum(new ArrayList<String>() {{\n            this.add(\"a\");\n            this.add(\"b\");\n        }});\n        final String json = \"{\\\"type\\\":\\\"string\\\",\\\"enum\\\":[\\\"a\\\",\\\"b\\\"]}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize a StringProperty with enums\")\n    public void deserializeEnumStringProperty() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"string\\\",\\\"enum\\\":[\\\"a\\\",\\\"b\\\"]}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getType(), \"string\");\n        List<String> _enum = ((StringSchema) p).getEnum();\n        assertNotNull(_enum);\n        assertEquals(_enum, Arrays.asList(\"a\", \"b\"));\n        assertEquals(p.getClass(), StringSchema.class);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize an IntegerProperty with enums\")\n    public void deserializeEnumIntegerProperty() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"integer\\\",\\\"format\\\":\\\"int32\\\",\\\"enum\\\":[1,2]}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getType(), \"integer\");\n        List<Number> _enum = ((IntegerSchema) p).getEnum();\n        assertNotNull(_enum);\n        assertEquals(_enum, Arrays.asList(1, 2));\n        assertEquals(p.getClass(), IntegerSchema.class);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize a string array property\")\n    public void serializeArrayStringProperty() throws IOException {\n        final Schema p = new ArraySchema().items(new StringSchema());\n        final String json = \"{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\"}}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize a string array property\")\n    public void deserializeArrayStringProperty() throws IOException {\n        final String json = \"{\\\"type\\\":\\\"array\\\",\\\"items\\\":{\\\"type\\\":\\\"string\\\"}}\";\n        final Schema p = m.readValue(json, Schema.class);\n        assertEquals(p.getType(), \"array\");\n        assertEquals(p.getClass(), ArraySchema.class);\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize a string property with readOnly set\")\n    public void serializeReadOnlyStringProperty() throws IOException {\n        final Schema p = new StringSchema().readOnly(true);\n        final String json = \"{\\\"type\\\":\\\"string\\\",\\\"readOnly\\\":true}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize a string property with readOnly unset\")\n    public void deserializeNotReadOnlyStringProperty() throws IOException {\n        final StringSchema p = new StringSchema();\n        p.setReadOnly(false);\n        final String json = \"{\\\"type\\\":\\\"string\\\",\\\"readOnly\\\":false}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should serialize an object property with required set\")\n    public void serializeObjectPropertyWithRequiredProperties() throws IOException {\n        final Schema p = new ObjectSchema()\n                .addProperties(\"stringProperty\", new StringSchema());\n        p.required(Arrays.asList(\"stringProperty\"));\n        final String json = \"{\\\"required\\\":[\\\"stringProperty\\\"],\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"stringProperty\\\":{\\\"type\\\":\\\"string\\\"}}}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n\n    @Test(description = \"it should deserialize an object property with required set\")\n    public void deserializeObjectPropertyWithRequiredProperties() throws IOException {\n        final Schema p = new ObjectSchema()\n                .addProperties(\"stringProperty\", new StringSchema());\n        p.required(Arrays.asList(\"stringProperty\"));\n        final String json = \"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"stringProperty\\\":{\\\"type\\\":\\\"string\\\"}},\\\"required\\\":[\\\"stringProperty\\\"]}\";\n        JsonAssert.assertJsonEquals(m, m.writeValueAsString(p), json);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/AnnotationsUtilsTest.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.google.common.collect.ImmutableMap;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.DataProvider;\nimport org.testng.annotations.Test;\n\nimport java.io.File;\nimport java.io.Serializable;\nimport java.lang.reflect.Method;\nimport java.math.BigDecimal;\nimport java.math.BigInteger;\nimport java.net.URI;\nimport java.net.URL;\nimport java.util.Date;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.UUID;\n\nimport static io.swagger.v3.oas.annotations.media.Schema.DEFAULT_SENTINEL;\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotEquals;\nimport static org.testng.Assert.assertTrue;\n\npublic class AnnotationsUtilsTest {\n\n    @DataProvider\n    private Object[][] expectedSchemaFromTypes() {\n        return new Object[][]{\n                {String.class, ImmutableMap.of(\"type\", \"string\")},\n                {Character.class, ImmutableMap.of(\"type\", \"string\")},\n                {Boolean.class, ImmutableMap.of(\"type\", \"boolean\")},\n                {Byte.class, ImmutableMap.of(\"type\", \"string\", \"format\", \"byte\")},\n                {URI.class, ImmutableMap.of(\"type\", \"string\", \"format\", \"uri\")},\n                {URL.class, ImmutableMap.of(\"type\", \"string\", \"format\", \"url\")},\n                {UUID.class, ImmutableMap.of(\"type\", \"string\", \"format\", \"uuid\")},\n                {Short.class, ImmutableMap.of(\"type\", \"integer\", \"format\", \"int32\")},\n                {Integer.class, ImmutableMap.of(\"type\", \"integer\", \"format\", \"int32\")},\n                {Long.class, ImmutableMap.of(\"type\", \"integer\", \"format\", \"int64\")},\n                {Float.class, ImmutableMap.of(\"type\", \"number\", \"format\", \"float\")},\n                {Double.class, ImmutableMap.of(\"type\", \"number\", \"format\", \"double\")},\n                {BigInteger.class, ImmutableMap.of(\"type\", \"integer\")},\n                {BigDecimal.class, ImmutableMap.of(\"type\", \"number\")},\n                {Number.class, ImmutableMap.of(\"type\", \"number\")},\n                {Date.class, ImmutableMap.of(\"type\", \"string\", \"format\", \"date-time\")},\n                {File.class, ImmutableMap.of(\"type\", \"string\", \"format\", \"binary\")},\n                {Object.class, ImmutableMap.of(\"type\", \"object\")},\n                {DummyClass.class, ImmutableMap.of(\"$ref\", \"#/components/schemas/DummyClass\")}\n        };\n    }\n\n    @Test(dataProvider = \"expectedSchemaFromTypes\")\n    public void resolveSchemaFromType(Class<?> aClass, Map<String, Object> expected) {\n        Schema schema = AnnotationsUtils.resolveSchemaFromType(aClass, new Components(), null);\n\n        assertEquals(schema.getType(), expected.get(\"type\"));\n        assertEquals(schema.getFormat(), expected.get(\"format\"));\n        assertEquals(schema.get$ref(), expected.get(\"$ref\"));\n    }\n\n    @DataProvider\n    private Object[][] expectedSchemaFromTypeAndFormat() {\n        return new Object[][]{\n                {\"byteType\", ImmutableMap.of(\"type\", \"string\", \"format\", \"byte\")},\n                {\"binaryType\", ImmutableMap.of(\"type\", \"string\", \"format\", \"binary\")},\n                {\"emailType\", ImmutableMap.of(\"type\", \"string\", \"format\", \"email\")},\n                {\"dummyType\", ImmutableMap.of(\"$ref\", \"#/components/schemas/DummyClass\")}\n        };\n    }\n\n    @Test(dataProvider = \"expectedSchemaFromTypeAndFormat\")\n    public void getSchema(String methodName, Map<String, Object> expected) throws NoSuchMethodException {\n        final Method method = getClass().getDeclaredMethod(methodName);\n        Content annotationContent = method.getAnnotation(ApiResponse.class).content()[0];\n        Optional<? extends Schema> schema = AnnotationsUtils.getSchema(annotationContent, new Components(), null, false);\n\n        assertTrue(schema.isPresent());\n        assertEquals(schema.get().getType(), expected.get(\"type\"));\n        assertEquals(schema.get().getFormat(), expected.get(\"format\"));\n        assertEquals(schema.get().get$ref(), expected.get(\"$ref\"));\n    }\n\n    @ApiResponse(content = @Content(schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = Byte.class)))\n    private void byteType() {\n    }\n\n    @ApiResponse(content = @Content(schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = Byte.class, format = \"binary\")))\n    private void binaryType() {\n    }\n\n    @ApiResponse(content = @Content(schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = String.class, format = \"email\")))\n    private void emailType() {\n    }\n\n    @ApiResponse(content = @Content(schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = DummyClass.class)))\n    private void dummyType() {\n    }\n\n    class DummyClass implements Serializable {}\n\n    static class ExampleHolder {\n        @io.swagger.v3.oas.annotations.media.Schema(type = \"string\", example = \"5 lacs per annum\")\n        String value;\n    }\n\n    @Test\n    public void testExampleStartingWithNumberShouldBeString() throws Exception {\n        io.swagger.v3.oas.annotations.media.Schema schemaAnnotation =\n                ExampleHolder.class\n                        .getDeclaredField(\"value\")\n                        .getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n\n        Optional<Schema> schema =\n                AnnotationsUtils.getSchemaFromAnnotation(\n                        schemaAnnotation,\n                        null,\n                        null,\n                        false,\n                        null,\n                        Schema.SchemaResolution.DEFAULT,\n                        null\n                );\n\n        assertTrue(schema.isPresent());\n        assertEquals(schema.get().getExample(), \"5 lacs per annum\");\n    }\n\n    // --- mergeSchemaAnnotations defaultValue tests ---\n\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"type-level description\")\n    static class TypeWithDescriptionOnly {}\n\n    static class FieldHolderWithDefault {\n        @io.swagger.v3.oas.annotations.media.Schema(defaultValue = \"myDefault\")\n        TypeWithDescriptionOnly field;\n    }\n\n    static class FieldHolderWithEmptyDefault {\n        @io.swagger.v3.oas.annotations.media.Schema(defaultValue = \"\")\n        TypeWithDescriptionOnly field;\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(defaultValue = \"typeDefault\")\n    static class TypeWithDefault {}\n\n    static class FieldHolderWithTypeDefault {\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"field-level description\")\n        TypeWithDefault field;\n    }\n\n    @Test\n    public void mergedDefaultValueShouldUsePatchWhenMasterHasSentinel() throws Exception {\n        io.swagger.v3.oas.annotations.media.Schema master =\n                TypeWithDescriptionOnly.class.getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n        io.swagger.v3.oas.annotations.media.Schema patch =\n                FieldHolderWithDefault.class.getDeclaredField(\"field\")\n                        .getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n\n        io.swagger.v3.oas.annotations.media.Schema merged =\n                AnnotationsUtils.mergeSchemaAnnotations(master, patch);\n\n        assertEquals(merged.defaultValue(), \"myDefault\",\n                \"When master has no defaultValue (sentinel) and patch has one, the patch value should win\");\n    }\n\n    @Test\n    public void mergedDefaultValueShouldUseMasterWhenMasterHasRealValue() throws Exception {\n        io.swagger.v3.oas.annotations.media.Schema master =\n                TypeWithDefault.class.getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n        io.swagger.v3.oas.annotations.media.Schema patch =\n                FieldHolderWithDefault.class.getDeclaredField(\"field\")\n                        .getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n\n        io.swagger.v3.oas.annotations.media.Schema merged =\n                AnnotationsUtils.mergeSchemaAnnotations(master, patch);\n\n        assertEquals(merged.defaultValue(), \"typeDefault\",\n                \"When master has a real defaultValue, it should take precedence over patch\");\n    }\n\n    @Test\n    public void mergedDefaultValueShouldReturnSentinelWhenBothHaveSentinel() throws Exception {\n        io.swagger.v3.oas.annotations.media.Schema master =\n                TypeWithDescriptionOnly.class.getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n        io.swagger.v3.oas.annotations.media.Schema patch =\n                FieldHolderWithTypeDefault.class.getDeclaredField(\"field\")\n                        .getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n\n        io.swagger.v3.oas.annotations.media.Schema merged =\n                AnnotationsUtils.mergeSchemaAnnotations(master, patch);\n\n        assertEquals(merged.defaultValue(), DEFAULT_SENTINEL,\n                \"When both master and patch have sentinel, the merged result should also have sentinel\");\n    }\n\n    @Test\n    public void mergedDefaultValueShouldUseEmptyStringFromPatch() throws Exception {\n        io.swagger.v3.oas.annotations.media.Schema master =\n                TypeWithDescriptionOnly.class.getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n        io.swagger.v3.oas.annotations.media.Schema patch =\n                FieldHolderWithEmptyDefault.class.getDeclaredField(\"field\")\n                        .getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n\n        io.swagger.v3.oas.annotations.media.Schema merged =\n                AnnotationsUtils.mergeSchemaAnnotations(master, patch);\n\n        assertEquals(merged.defaultValue(), \"\",\n                \"When master has sentinel and patch has empty string, empty string should win\");\n    }\n\n    @Test\n    public void sentinelShouldNeverAppearInResolvedSchema() throws Exception {\n        io.swagger.v3.oas.annotations.media.Schema master =\n                TypeWithDescriptionOnly.class.getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n        io.swagger.v3.oas.annotations.media.Schema patch =\n                FieldHolderWithDefault.class.getDeclaredField(\"field\")\n                        .getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);\n\n        io.swagger.v3.oas.annotations.media.Schema merged =\n                AnnotationsUtils.mergeSchemaAnnotations(master, patch);\n\n        assertNotEquals(merged.defaultValue(), DEFAULT_SENTINEL,\n                \"Sentinel should never be the result when patch has a real defaultValue\");\n\n        Optional<Schema> resolvedSchema = AnnotationsUtils.getSchemaFromAnnotation(\n                merged, null, null, false, null, Schema.SchemaResolution.DEFAULT, null);\n\n        assertTrue(resolvedSchema.isPresent());\n        assertNotEquals(resolvedSchema.get().getDefault(), DEFAULT_SENTINEL,\n                \"Sentinel value must never appear in resolved schema default\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/JsonAssert.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport static org.testng.Assert.assertTrue;\n\npublic final class JsonAssert {\n    private JsonAssert() {\n    }\n\n    /**\n     * Asserts that two JSON strings are semantically equal, ignoring key order.\n     * This version uses a default failure message.\n     *\n     * @param mapper       The ObjectMapper to use for parsing.\n     * @param expectedJson The expected JSON/YAML string.\n     * @param actualJson   The actual JSON/YAML string.\n    */\n    public static void assertJsonEquals(ObjectMapper mapper, String expectedJson, String actualJson) {\n        assertJsonEquals(mapper, expectedJson, actualJson, \"The JSON structures are not equal.\");\n    }\n\n    /**\n     * This version allows for a custom failure message.\n     *\n     * @param mapper       The ObjectMapper to use for parsing.\n     * @param expectedJson The expected JSON/YAML string.\n     * @param actualJson   The actual JSON/YAML string.\n     * @param message      The custom message to display if the assertion fails.\n    */\n    public static void assertJsonEquals(ObjectMapper mapper, String expectedJson, String actualJson, String message) {\n        try {\n            JsonNode expectedNode = mapper.readTree(expectedJson);\n            JsonNode actualNode = mapper.readTree(actualJson);\n            assertTrue(expectedNode.equals(actualNode), message);\n        } catch (Exception e) {\n            throw new RuntimeException(e);\n        }\n    }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/OutputReplacer.java",
    "content": "package io.swagger.v3.core.util;\n\nimport java.io.ByteArrayOutputStream;\nimport java.io.PrintStream;\nimport java.io.UnsupportedEncodingException;\nimport java.nio.charset.StandardCharsets;\n\n/**\n * The <code>OutputReplacer</code> enumerator helps to run a code with a custom output stream.\n */\npublic enum OutputReplacer {\n\n    /**\n     * The \"standard\" output stream.\n     */\n    OUT {\n        @Override\n        PrintStream getOutputStream() {\n            return System.out;\n        }\n\n        @Override\n        void setOutputStream(PrintStream outputStream) {\n            System.setOut(outputStream);\n        }\n    },\n    /**\n     * The \"standard\" error output stream.\n     */\n    ERROR {\n        @Override\n        PrintStream getOutputStream() {\n            return System.err;\n        }\n\n        @Override\n        void setOutputStream(PrintStream outputStream) {\n            System.setErr(outputStream);\n        }\n\n    };\n\n    /**\n     * Runs a code with a custom output stream.\n     *\n     * @param function is code to run\n     * @return is output stream as string\n     */\n    public String run(Function function) {\n        final PrintStream out = getOutputStream();\n        final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n        final PrintStream capture = new PrintStream(outputStream);\n        try {\n            setOutputStream(capture);\n            PrettyPrintHelper.setOverride(message -> {\n                capture.println(message);\n                capture.flush();\n            });\n            function.run();\n        } finally {\n            PrettyPrintHelper.clearOverride();\n            setOutputStream(out);\n            capture.close();\n        }\n\n        try {\n            return outputStream.toString(StandardCharsets.UTF_8.name());\n        } catch (UnsupportedEncodingException ex) {\n            throw new IllegalStateException(ex);\n        }\n    }\n\n    abstract PrintStream getOutputStream();\n\n    abstract void setOutputStream(PrintStream printStream);\n\n    public interface Function {\n        void run();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/PathUtilsTest.java",
    "content": "package io.swagger.v3.core.util;\n\nimport org.testng.annotations.Test;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class PathUtilsTest {\n\n    @Test(description = \"parse regex with slash inside it from issue 1153\")\n    public void parseRegexWithSlashInside() {\n        final Map<String, String> regexMap = new HashMap<String, String>();\n        final String path = PathUtils.parsePath(\"/{itemId: [0-9]{4}/[0-9]{2}/[0-9]{2}/[0-9]{2}/[0-9]{2}/[0-9]{2}/[0-9]{3}/[A-Za-z0-9]+}\", regexMap);\n        assertEquals(path, \"/{itemId}\");\n        assertEquals(regexMap.get(\"itemId\"), \"[0-9]{4}/[0-9]{2}/[0-9]{2}/[0-9]{2}/[0-9]{2}/[0-9]{2}/[0-9]{3}/[A-Za-z0-9]+\");\n    }\n\n    @Test(description = \"parse two part path with one param\")\n    public void parseTwoPartPathWithOneParam() {\n        final Map<String, String> regexMap = new HashMap<String, String>();\n        final String path = PathUtils.parsePath(\"/api/{itemId: [0-9]{4}/[0-9]{2,4}/[A-Za-z0-9]+}\", regexMap);\n        assertEquals(path, \"/api/{itemId}\");\n        assertEquals(regexMap.get(\"itemId\"), \"[0-9]{4}/[0-9]{2,4}/[A-Za-z0-9]+\");\n    }\n\n    @Test(description = \"parse two part path with two params and white spaces around\")\n    public void parseTwoPartPathWithTwoParams() {\n        final Map<String, String> regexMap = new HashMap<String, String>();\n        final String path = PathUtils.parsePath(\"/{itemId: [0-9]{4}/[A-Za-z0-9]+}/{ api : [aA-zZ]+ }\", regexMap);\n        assertEquals(path, \"/{itemId}/{api}\");\n        assertEquals(regexMap.get(\"itemId\"), \"[0-9]{4}/[A-Za-z0-9]+\");\n        assertEquals(regexMap.get(\"api\"), \"[aA-zZ]+\");\n    }\n\n    @Test(description = \"parse simple path\")\n    public void parseSimplePath() {\n        final Map<String, String> regexMap = new HashMap<String, String>();\n        final String path = PathUtils.parsePath(\"/api/itemId\", regexMap);\n        assertEquals(path, \"/api/itemId\");\n        assertEquals(regexMap.size(), 0);\n    }\n\n    @Test(description = \"parse path with param without regex\")\n    public void parsePathWithoutRegex() {\n        final Map<String, String> regexMap = new HashMap<String, String>();\n        final String path = PathUtils.parsePath(\"/api/{name}\", regexMap);\n        assertEquals(path, \"/api/{name}\");\n        assertEquals(regexMap.size(), 0);\n    }\n\n    @Test(description = \"parse path with two params in one part\")\n    public void parsePathWithTwoParamsInOnePart() {\n        final Map<String, String> regexMap = new HashMap<String, String>();\n        final String path = PathUtils.parsePath(\"/{a:\\\\w+}-{b:\\\\w+}/c\", regexMap);\n        assertEquals(path, \"/{a}-{b}/c\");\n        assertEquals(regexMap.get(\"a\"), \"\\\\w+\");\n        assertEquals(regexMap.get(\"b\"), \"\\\\w+\");\n    }\n\n    @Test(description = \"parse path like /swagger.{json|yaml}\")\n    public void test() {\n        final Map<String, String> regexMap = new HashMap<String, String>();\n        final String path = PathUtils.parsePath(\"/swagger.{json|yaml}\", regexMap);\n        assertEquals(path, \"/swagger.{json|yaml}\");\n        assertEquals(regexMap.size(), 0);\n    }\n\n    @Test(description = \"parse path with many braces and slashes iside\")\n    public void parsePathWithBracesAndSlashes() {\n        final Map<String, String> regexMap = new HashMap<String, String>();\n        final String path = PathUtils.parsePath(\"/api/{regex:/(?!\\\\{\\\\})\\\\w*|/\\\\{\\\\w+:*([^\\\\{\\\\}]*(\\\\{.*\\\\})*)*\\\\}}\", regexMap);\n        assertEquals(path, \"/api/{regex}\");\n        assertEquals(regexMap.get(\"regex\"), \"/(?!\\\\{\\\\})\\\\w*|/\\\\{\\\\w+:*([^\\\\{\\\\}]*(\\\\{.*\\\\})*)*\\\\}\");\n    }\n\n    @Test(description = \"collect path\")\n    public void collectPath() {\n        final String path = PathUtils.collectPath(\"api\", \"/users/\", \"{userId}/\");\n        assertEquals(path, \"/api/users/{userId}\");\n    }\n\n    @Test(description = \"collect path with many slashes inside\")\n    public void collectPathWithSlashesInside() {\n        final String path = PathUtils.collectPath(\"///api/users///\", \"///getUser///\", \"/ /\");\n        assertEquals(path, \"/api/users/getUser\");\n    }\n\n    @Test(description = \"not fail when passed path is null\")\n    public void testNullPath() {\n        final Map<String, String> regexMap = new HashMap<String, String>();\n        final String path = PathUtils.parsePath(null, regexMap);\n        assertEquals(path, null);\n    }\n\n    @Test(description = \"not fail when regex is not valid\")\n    public void testInvalidRegex() {\n        final Map<String, String> regexMap = new HashMap<String, String>();\n        final String path = PathUtils.parsePath(\"/api/{fail: [a-z]\", regexMap);\n        assertEquals(path, null);\n    }\n\n    @Test(description = \"not fail when passed path is empty\")\n    public void testEmptyPath() {\n        final Map<String, String> regexMap = new HashMap<String, String>();\n        final String path = PathUtils.parsePath(\"\", regexMap);\n        assertEquals(path, \"/\");\n    }\n\n    @Test(description = \"not fail when passed path is null\")\n    public void testNullCollectedPath() {\n        final String path = PathUtils.collectPath(null, null);\n        assertEquals(path, \"/\");\n    }\n\n    @Test(description = \"not fail when passed path is empty\")\n    public void testEmptyCollectedPath() {\n        final String path = PathUtils.collectPath(\"\");\n        assertEquals(path, \"/\");\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/ReferenceTypeUtilsTest.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.databind.JavaType;\nimport com.fasterxml.jackson.databind.type.TypeFactory;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport org.testng.annotations.Test;\n\nimport java.lang.reflect.Type;\nimport java.math.BigDecimal;\nimport java.util.concurrent.atomic.AtomicReference;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertTrue;\n\n/**\n * Unit test cases for {@link ReferenceTypeUtils}\n */\npublic class ReferenceTypeUtilsTest {\n\n    @Test(description = \"AtomicReference should be reference type\")\n    public void testIsReferenceTypeWithAtomicReference() {\n        final JavaType referredType = TypeFactory.defaultInstance().constructType(String.class);\n        final Class<AtomicReference> rawType = AtomicReference.class;\n        final JavaType atomicReferenceType = TypeFactory.defaultInstance().constructReferenceType(rawType, referredType);\n\n        final boolean actualIsReferenceType = ReferenceTypeUtils._isReferenceType(atomicReferenceType);\n\n        assertTrue(actualIsReferenceType, rawType.getCanonicalName() + \" should be reference type but was not.\");\n    }\n\n    @Test(description = \"AtomicReference JavaType should be unwrapped\")\n    public void testUnwrapWithAtomicReferenceAndJavaType() {\n        final JavaType expectedReferredType = TypeFactory.defaultInstance().constructType(String.class);\n\n        final Class<AtomicReference> rawType = AtomicReference.class;\n        final JavaType atomicReferenceType = TypeFactory.defaultInstance().constructReferenceType(rawType, expectedReferredType);\n\n        final AnnotatedType actualUnwrappedType = ReferenceTypeUtils.unwrapReference(new AnnotatedType(atomicReferenceType));\n\n       assertEquals(actualUnwrappedType.getType(), expectedReferredType, rawType.getCanonicalName() + \"Reference type not correctly unwrapped\");\n    }\n\n    @Test(description = \"AtomicReference should be unwrapped when read from Java bean\")\n    public void testUnwrapWithAtomicReferenceMemberFromJavaBean() throws Exception {\n        final JavaType expectedReferredType = TypeFactory.defaultInstance().constructType(BigDecimal.class);\n\n        final Type genericType = TypeWithAtomicReferenceMember.class.getDeclaredField(\"member\").getGenericType();\n        final AnnotatedType actualUnwrappedType = ReferenceTypeUtils.unwrapReference(new AnnotatedType(genericType));\n\n       assertEquals(actualUnwrappedType.getType(), expectedReferredType, genericType.getTypeName() + \"Reference type not correctly unwrapped\");\n    }\n\n    @SuppressWarnings(\"unused\")\n    private static final class TypeWithAtomicReferenceMember {\n        AtomicReference<BigDecimal> member;\n\n        public AtomicReference<BigDecimal> getMember() {\n            return member;\n        }\n\n        public void setMember(AtomicReference<BigDecimal> member) {\n            this.member = member;\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/ResourceUtils.java",
    "content": "package io.swagger.v3.core.util;\n\nimport org.apache.commons.io.IOUtils;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.nio.charset.StandardCharsets;\n\npublic class ResourceUtils {\n\n    public static String loadClassResource(Class<?> cls, String name) throws IOException {\n        InputStream in = null;\n        try {\n            in = cls.getClassLoader().getResourceAsStream(name);\n            return IOUtils.toString(in, StandardCharsets.UTF_8);\n        } finally {\n            IOUtils.closeQuietly(in);\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/TestUtils.java",
    "content": "package io.swagger.v3.core.util;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport org.apache.commons.io.IOUtils;\n\nimport java.io.IOException;\nimport java.io.InputStream;\n\n/**\n * Created by russellb337 on 7/31/15.\n */\npublic class TestUtils {\n\n    private static <T> T deserializeFileFromClasspath(String path, Class<T> type, ObjectMapper objectMapper) {\n        final InputStream resource = TestUtils.class.getClassLoader().getResourceAsStream(path);\n\n        String contents;\n\n        if (resource == null) {\n            throw new RuntimeException(\"Could not find file on the classpath: \" + path);\n        }\n\n        try {\n            contents = IOUtils.toString(resource);\n        } catch (IOException e) {\n            throw new RuntimeException(\"could not read from file \" + path, e);\n        }\n\n        try {\n            T result = objectMapper.readValue(contents, type);\n            return result;\n        } catch (IOException e) {\n            throw new RuntimeException(\"Could not deserialize contents into type: \" + type, e);\n        }\n    }\n\n    public static <T> T deserializeJsonFileFromClasspath(String path, Class<T> type) {\n        return deserializeFileFromClasspath(path, type, Json.mapper());\n    }\n\n    public static <T> T deserializeYamlFileFromClasspath(String path, Class<T> type) {\n        return deserializeFileFromClasspath(path, type, Yaml.mapper());\n    }\n\n    public static String normalizeLineEnds(String s) {\n        return s.replace(\"\\r\\n\", \"\\n\").replace('\\r', '\\n');\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/ValidationAnnotationsUtilsTest.java",
    "content": "package io.swagger.v3.core.util;\n\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.NumberSchema;\nimport io.swagger.v3.oas.models.media.ObjectSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Test;\n\nimport javax.validation.constraints.*;\nimport java.math.BigDecimal;\n\nimport static org.testng.Assert.*;\n\npublic class ValidationAnnotationsUtilsTest {\n\n    private Size createSizeAnnotation(final int min, final int max) {\n        return new Size() {\n            @Override\n            public Class<?>[] groups() {\n                return new Class[0];\n            }\n\n            @Override\n            public String message() {\n                return \"\";\n            }\n\n            @Override\n            public Class<? extends javax.validation.Payload>[] payload() {\n                return new Class[0];\n            }\n\n            @Override\n            public int min() {\n                return min;\n            }\n\n            @Override\n            public int max() {\n                return max;\n            }\n\n            @Override\n            public Class<? extends java.lang.annotation.Annotation> annotationType() {\n                return Size.class;\n            }\n        };\n    }\n\n    private Min createMinAnnotation(final long value) {\n        return new Min() {\n            @Override\n            public Class<?>[] groups() {\n                return new Class[0];\n            }\n\n            @Override\n            public String message() {\n                return \"\";\n            }\n\n            @Override\n            public Class<? extends javax.validation.Payload>[] payload() {\n                return new Class[0];\n            }\n\n            @Override\n            public long value() {\n                return value;\n            }\n\n            @Override\n            public Class<? extends java.lang.annotation.Annotation> annotationType() {\n                return Min.class;\n            }\n        };\n    }\n\n    private Max createMaxAnnotation(final long value) {\n        return new Max() {\n            @Override\n            public Class<?>[] groups() {\n                return new Class[0];\n            }\n\n            @Override\n            public String message() {\n                return \"\";\n            }\n\n            @Override\n            public Class<? extends javax.validation.Payload>[] payload() {\n                return new Class[0];\n            }\n\n            @Override\n            public long value() {\n                return value;\n            }\n\n            @Override\n            public Class<? extends java.lang.annotation.Annotation> annotationType() {\n                return Max.class;\n            }\n        };\n    }\n\n    private DecimalMin createDecimalMinAnnotation(final String value, final boolean inclusive) {\n        return new DecimalMin() {\n            @Override\n            public Class<?>[] groups() {\n                return new Class[0];\n            }\n\n            @Override\n            public String message() {\n                return \"\";\n            }\n\n            @Override\n            public Class<? extends javax.validation.Payload>[] payload() {\n                return new Class[0];\n            }\n\n            @Override\n            public String value() {\n                return value;\n            }\n\n            @Override\n            public boolean inclusive() {\n                return inclusive;\n            }\n\n            @Override\n            public Class<? extends java.lang.annotation.Annotation> annotationType() {\n                return DecimalMin.class;\n            }\n        };\n    }\n\n    private DecimalMax createDecimalMaxAnnotation(final String value, final boolean inclusive) {\n        return new DecimalMax() {\n            @Override\n            public Class<?>[] groups() {\n                return new Class[0];\n            }\n\n            @Override\n            public String message() {\n                return \"\";\n            }\n\n            @Override\n            public Class<? extends javax.validation.Payload>[] payload() {\n                return new Class[0];\n            }\n\n            @Override\n            public String value() {\n                return value;\n            }\n\n            @Override\n            public boolean inclusive() {\n                return inclusive;\n            }\n\n            @Override\n            public Class<? extends java.lang.annotation.Annotation> annotationType() {\n                return DecimalMax.class;\n            }\n        };\n    }\n\n    private Pattern createPatternAnnotation(final String regexp) {\n        return new Pattern() {\n            @Override\n            public Class<?>[] groups() {\n                return new Class[0];\n            }\n\n            @Override\n            public String message() {\n                return \"\";\n            }\n\n            @Override\n            public Class<? extends javax.validation.Payload>[] payload() {\n                return new Class[0];\n            }\n\n            @Override\n            public String regexp() {\n                return regexp;\n            }\n\n            @Override\n            public Pattern.Flag[] flags() {\n                return new Pattern.Flag[0];\n            }\n\n            @Override\n            public Class<? extends java.lang.annotation.Annotation> annotationType() {\n                return Pattern.class;\n            }\n        };\n    }\n\n    private Email createEmailAnnotation() {\n        return new Email() {\n            @Override\n            public Class<?>[] groups() {\n                return new Class[0];\n            }\n\n            @Override\n            public String message() {\n                return \"\";\n            }\n\n            @Override\n            public Class<? extends javax.validation.Payload>[] payload() {\n                return new Class[0];\n            }\n\n            @Override\n            public String regexp() {\n                return \"\";\n            }\n\n            @Override\n            public Pattern.Flag[] flags() {\n                return new Pattern.Flag[0];\n            }\n\n            @Override\n            public Class<? extends java.lang.annotation.Annotation> annotationType() {\n                return Email.class;\n            }\n        };\n    }\n\n\n    @Test\n    public void testApplyNotEmptyConstraintOnArraySchema() {\n        Schema schema = new ArraySchema();\n        boolean modified = ValidationAnnotationsUtils.applyNotEmptyConstraint(schema, null, null);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMinItems(), Integer.valueOf(1));\n    }\n\n\n    @Test\n    public void testApplyNotEmptyConstraintOnStringSchema() {\n        Schema schema = new StringSchema();\n        boolean modified = ValidationAnnotationsUtils.applyNotEmptyConstraint(schema, null, null);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMinLength(), Integer.valueOf(1));\n    }\n\n\n    @Test\n    public void testApplyNotEmptyConstraintOnObjectSchema() {\n        Schema schema = new ObjectSchema();\n        boolean modified = ValidationAnnotationsUtils.applyNotEmptyConstraint(schema, null, null);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMinProperties(), Integer.valueOf(1));\n    }\n\n    @Test\n    public void testApplyNotEmptyConstraintOnNumberSchema() {\n        Schema schema = new NumberSchema();\n        boolean modified = ValidationAnnotationsUtils.applyNotEmptyConstraint(schema, null, null);\n        \n        assertFalse(modified);\n        assertNull(schema.getMinProperties());\n        assertNull(schema.getMinLength());\n        assertNull(schema.getMinItems());\n    }\n\n\n    @Test\n    public void testApplyNotBlankConstraintOnStringSchema() {\n        Schema schema = new StringSchema();\n        boolean modified = ValidationAnnotationsUtils.applyNotBlankConstraint(schema, null);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMinLength(), Integer.valueOf(1));\n    }\n\n    @Test\n    public void testApplyNotBlankConstraintOnNonStringSchema() {\n        Schema schema = new NumberSchema();\n        boolean modified = ValidationAnnotationsUtils.applyNotBlankConstraint(schema, null);\n        \n        assertFalse(modified);\n        assertNull(schema.getMinLength());\n    }\n\n\n    @Test\n    public void testApplyMinConstraintOnNumberSchema() {\n        Schema schema = new NumberSchema();\n        Min minAnnotation = createMinAnnotation(10);\n        \n        boolean modified = ValidationAnnotationsUtils.applyMinConstraint(schema, minAnnotation);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMinimum(), new BigDecimal(10));\n    }\n\n    @Test\n    public void testApplyMinConstraintOnIntegerSchema() {\n        Schema schema = new IntegerSchema();\n        Min minAnnotation = createMinAnnotation(5);\n        \n        boolean modified = ValidationAnnotationsUtils.applyMinConstraint(schema, minAnnotation);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMinimum(), new BigDecimal(5));\n    }\n\n    @Test\n    public void testApplyMinConstraintOnStringSchema() {\n        Schema schema = new StringSchema();\n        Min minAnnotation = createMinAnnotation(10);\n        \n        boolean modified = ValidationAnnotationsUtils.applyMinConstraint(schema, minAnnotation);\n        \n        assertFalse(modified);\n        assertNull(schema.getMinimum());\n    }\n\n\n    @Test\n    public void testApplyMaxConstraintOnNumberSchema() {\n        Schema schema = new NumberSchema();\n        Max maxAnnotation = createMaxAnnotation(100);\n        \n        boolean modified = ValidationAnnotationsUtils.applyMaxConstraint(schema, maxAnnotation);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMaximum(), new BigDecimal(100));\n    }\n\n    @Test\n    public void testApplyMaxConstraintOnIntegerSchema() {\n        Schema schema = new IntegerSchema();\n        Max maxAnnotation = createMaxAnnotation(50);\n        \n        boolean modified = ValidationAnnotationsUtils.applyMaxConstraint(schema, maxAnnotation);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMaximum(), new BigDecimal(50));\n    }\n\n    @Test\n    public void testApplyMaxConstraintOnStringSchema() {\n        Schema schema = new StringSchema();\n        Max maxAnnotation = createMaxAnnotation(100);\n        \n        boolean modified = ValidationAnnotationsUtils.applyMaxConstraint(schema, maxAnnotation);\n        \n        assertFalse(modified);\n        assertNull(schema.getMaximum());\n    }\n\n    @Test\n    public void testApplySizeConstraintOnNumberSchemaWithCustomValues() {\n        Schema schema = new NumberSchema();\n        Size sizeAnnotation = createSizeAnnotation(10, 100);\n        \n        boolean modified = ValidationAnnotationsUtils.applySizeConstraint(schema, sizeAnnotation);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMinimum(), new BigDecimal(10));\n        assertEquals(schema.getMaximum(), new BigDecimal(100));\n    }\n\n\n    @Test\n    public void testApplySizeConstraintOnStringSchemaWithCustomValues() {\n        Schema schema = new StringSchema();\n        Size sizeAnnotation = createSizeAnnotation(5, 50);\n        \n        boolean modified = ValidationAnnotationsUtils.applySizeConstraint(schema, sizeAnnotation);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMinLength(), Integer.valueOf(5));\n        assertEquals(schema.getMaxLength(), Integer.valueOf(50));\n    }\n\n    @Test\n    public void testApplySizeConstraintOnArraySchemaWithCustomValues() {\n        Schema schema = new ArraySchema();\n        Size sizeAnnotation = createSizeAnnotation(1, 10);\n        \n        boolean modified = ValidationAnnotationsUtils.applySizeConstraint(schema, sizeAnnotation);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMinItems(), Integer.valueOf(1));\n        assertEquals(schema.getMaxItems(), Integer.valueOf(10));\n    }\n\n    @Test\n    public void testApplySizeConstraintOnObjectSchema() {\n        Schema schema = new ObjectSchema();\n        Size sizeAnnotation = createSizeAnnotation(1, 10);\n        \n        boolean modified = ValidationAnnotationsUtils.applySizeConstraint(schema, sizeAnnotation);\n        \n        assertFalse(modified);\n    }\n\n\n    @Test\n    public void testApplyDecimalMinConstraintOnNumberSchemaInclusive() {\n        Schema schema = new NumberSchema();\n        DecimalMin minAnnotation = createDecimalMinAnnotation(\"10.5\", true);\n        \n        boolean modified = ValidationAnnotationsUtils.applyDecimalMinConstraint(schema, minAnnotation);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMinimum(), new BigDecimal(\"10.5\"));\n        assertFalse(schema.getExclusiveMinimum());\n    }\n\n    @Test\n    public void testApplyDecimalMinConstraintOnNumberSchemaExclusive() {\n        Schema schema = new NumberSchema();\n        DecimalMin minAnnotation = createDecimalMinAnnotation(\"10.5\", false);\n        \n        boolean modified = ValidationAnnotationsUtils.applyDecimalMinConstraint(schema, minAnnotation);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMinimum(), new BigDecimal(\"10.5\"));\n        assertTrue(schema.getExclusiveMinimum());\n    }\n\n    @Test\n    public void testApplyDecimalMinConstraintOnStringSchema() {\n        Schema schema = new StringSchema();\n        DecimalMin minAnnotation = createDecimalMinAnnotation(\"10.5\", true);\n        \n        boolean modified = ValidationAnnotationsUtils.applyDecimalMinConstraint(schema, minAnnotation);\n        \n        assertFalse(modified);\n        assertNull(schema.getMinimum());\n    }\n\n\n    @Test\n    public void testApplyDecimalMaxConstraintOnNumberSchemaInclusive() {\n        Schema schema = new NumberSchema();\n        DecimalMax maxAnnotation = createDecimalMaxAnnotation(\"100.5\", true);\n        \n        boolean modified = ValidationAnnotationsUtils.applyDecimalMaxConstraint(schema, maxAnnotation);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMaximum(), new BigDecimal(\"100.5\"));\n        assertFalse(schema.getExclusiveMaximum());\n    }\n\n    @Test\n    public void testApplyDecimalMaxConstraintOnNumberSchemaExclusive() {\n        Schema schema = new NumberSchema();\n        DecimalMax maxAnnotation = createDecimalMaxAnnotation(\"100.5\", false);\n        \n        boolean modified = ValidationAnnotationsUtils.applyDecimalMaxConstraint(schema, maxAnnotation);\n        \n        assertTrue(modified);\n        assertEquals(schema.getMaximum(), new BigDecimal(\"100.5\"));\n        assertTrue(schema.getExclusiveMaximum());\n    }\n\n    @Test\n    public void testApplyDecimalMaxConstraintOnStringSchema() {\n        Schema schema = new StringSchema();\n        DecimalMax maxAnnotation = createDecimalMaxAnnotation(\"100.5\", true);\n        \n        boolean modified = ValidationAnnotationsUtils.applyDecimalMaxConstraint(schema, maxAnnotation);\n        \n        assertFalse(modified);\n        assertNull(schema.getMaximum());\n    }\n\n\n    @Test\n    public void testApplyPatternConstraintOnStringSchema() {\n        Schema schema = new StringSchema();\n        Pattern patternAnnotation = createPatternAnnotation(\"^[A-Z]+$\");\n        \n        boolean modified = ValidationAnnotationsUtils.applyPatternConstraint(schema, patternAnnotation);\n        \n        assertTrue(modified);\n        assertEquals(schema.getPattern(), \"^[A-Z]+$\");\n    }\n\n    @Test\n    public void testApplyPatternConstraintOnArraySchemaWithStringItems() {\n        Schema schema = new ArraySchema();\n        schema.setItems(new StringSchema());\n        Pattern patternAnnotation = createPatternAnnotation(\"^[0-9]+$\");\n        \n        boolean modified = ValidationAnnotationsUtils.applyPatternConstraint(schema, patternAnnotation);\n        \n        assertTrue(modified);\n        assertNull(schema.getPattern());\n        assertEquals(schema.getItems().getPattern(), \"^[0-9]+$\");\n    }\n\n    @Test\n    public void testApplyPatternConstraintOnArraySchemaWithNumberItems() {\n        Schema schema = new ArraySchema();\n        schema.setItems(new NumberSchema());\n        Pattern patternAnnotation = createPatternAnnotation(\"^[0-9]+$\");\n        \n        boolean modified = ValidationAnnotationsUtils.applyPatternConstraint(schema, patternAnnotation);\n        \n        assertFalse(modified);\n        assertNull(schema.getItems().getPattern());\n    }\n\n    @Test\n    public void testApplyPatternConstraintOnNumberSchema() {\n        Schema schema = new NumberSchema();\n        Pattern patternAnnotation = createPatternAnnotation(\"^[0-9]+$\");\n        \n        boolean modified = ValidationAnnotationsUtils.applyPatternConstraint(schema, patternAnnotation);\n        \n        assertFalse(modified);\n        assertNull(schema.getPattern());\n    }\n\n\n    @Test\n    public void testApplyEmailConstraintOnStringSchema() {\n        Schema schema = new StringSchema();\n        Email emailAnnotation = createEmailAnnotation();\n        \n        boolean modified = ValidationAnnotationsUtils.applyEmailConstraint(schema, emailAnnotation);\n        \n        assertTrue(modified);\n        assertEquals(schema.getFormat(), \"email\");\n    }\n\n    @Test\n    public void testApplyEmailConstraintOnArraySchemaWithStringItems() {\n        Schema schema = new ArraySchema();\n        schema.setItems(new StringSchema());\n        Email emailAnnotation = createEmailAnnotation();\n        \n        boolean modified = ValidationAnnotationsUtils.applyEmailConstraint(schema, emailAnnotation);\n        \n        assertTrue(modified);\n        assertNull(schema.getFormat());\n        assertEquals(schema.getItems().getFormat(), \"email\");\n    }\n\n    @Test\n    public void testApplyEmailConstraintOnArraySchemaWithNumberItems() {\n        Schema schema = new ArraySchema();\n        schema.setItems(new NumberSchema());\n        Email emailAnnotation = createEmailAnnotation();\n        \n        boolean modified = ValidationAnnotationsUtils.applyEmailConstraint(schema, emailAnnotation);\n        \n        assertFalse(modified);\n        assertNull(schema.getItems().getFormat());\n    }\n\n    @Test\n    public void testApplyEmailConstraintOnNumberSchema() {\n        Schema schema = new NumberSchema();\n        Email emailAnnotation = createEmailAnnotation();\n        \n        boolean modified = ValidationAnnotationsUtils.applyEmailConstraint(schema, emailAnnotation);\n        \n        assertFalse(modified);\n        assertNull(schema.getFormat());\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/reflection/ReflectionUtilsTest.java",
    "content": "package io.swagger.v3.core.util.reflection;\n\nimport io.swagger.v3.core.util.ReflectionUtils;\nimport io.swagger.v3.core.util.reflection.resources.Child;\nimport io.swagger.v3.core.util.reflection.resources.IParent;\nimport io.swagger.v3.core.util.reflection.resources.ObjectWithManyFields;\nimport io.swagger.v3.core.util.reflection.resources.Parent;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.tags.Tag;\nimport org.testng.annotations.Test;\n\nimport javax.ws.rs.Path;\n\nimport java.lang.annotation.Annotation;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\nimport java.lang.reflect.Field;\nimport java.lang.reflect.Method;\nimport java.lang.reflect.Type;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.stream.Collectors;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertFalse;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\n\nimport static java.lang.annotation.ElementType.PARAMETER;\nimport static org.testng.Assert.assertTrue;\nimport static org.testng.Assert.fail;\n\npublic class ReflectionUtilsTest {\n\n    @Test\n    public void typeFromStringTest() {\n        assertEquals(ReflectionUtils.typeFromString(\"int\"), (Type) Integer.class);\n        assertEquals(ReflectionUtils.typeFromString(\"java.lang.String\"), (Type) String.class);\n        assertNull(ReflectionUtils.typeFromString(\"FakeType\"));\n        assertNull(ReflectionUtils.typeFromString(null));\n    }\n\n    @Test\n    public void isOverriddenMethodTest() throws NoSuchMethodException {\n        for (Method method : Child.class.getMethods()) {\n            if (\"parametrizedMethod1\".equals(method.getName())) {\n                final boolean result = ReflectionUtils.isOverriddenMethod(method, Child.class);\n                final Class<?> first = method.getParameterTypes()[0];\n                if (Number.class.equals(first)) {\n                    assertTrue(result);\n                } else if (Integer.class.equals(first)) {\n                    assertFalse(result);\n                }\n            } else if (\"parametrizedMethod3\".equals(method.getName())) {\n                assertFalse(ReflectionUtils.isOverriddenMethod(method, Child.class));\n            }\n        }\n\n        for (Method method : Object.class.getMethods()) {\n            if (\"equals\".equals(method.getName())) {\n                assertFalse(ReflectionUtils.isOverriddenMethod(method, Object.class));\n            }\n        }\n\n        for (Method method : IParent.class.getMethods()) {\n            if (\"parametrizedMethod5\".equals(method.getName())) {\n                assertFalse(ReflectionUtils.isOverriddenMethod(method, IParent.class));\n            } else if (\"parametrizedMethod2\".equals(method.getName())) {\n                assertFalse(ReflectionUtils.isOverriddenMethod(method, IParent.class));\n            } else {\n                fail(\"Method not expected\");\n            }\n        }\n    }\n\n    @Test\n    public void getOverriddenMethodTest() throws NoSuchMethodException {\n        final Method method1 = ReflectionUtils.getOverriddenMethod(\n                Child.class.getMethod(\"parametrizedMethod1\", Integer.class));\n        assertNotNull(method1);\n        assertEquals(method1.getParameterTypes()[0], Number.class);\n\n        final Method method2 = ReflectionUtils.getOverriddenMethod(\n                Child.class.getMethod(\"parametrizedMethod2\", Long.class));\n        assertNotNull(method2);\n        assertEquals(method2.getParameterTypes()[0], Number.class);\n\n        final Method method3 = ReflectionUtils.getOverriddenMethod(\n                Child.class.getMethod(\"parametrizedMethod3\", Long.class));\n        assertNull(method3);\n\n        assertNull(ReflectionUtils.getOverriddenMethod(Object.class.getMethod(\"equals\", Object.class)));\n    }\n\n    @Test\n    public void findMethodTest() throws NoSuchMethodException {\n        final Method methodToFind1 = Child.class.getMethod(\"parametrizedMethod1\", Integer.class);\n        final Method method1 = ReflectionUtils.findMethod(methodToFind1, Parent.class);\n        assertNotNull(method1);\n        assertEquals(method1.getParameterTypes()[0], Number.class);\n\n        final Method methodToFind2 = Child.class.getMethod(\"parametrizedMethod4\", Long.class);\n        final Method method2 = ReflectionUtils.findMethod(methodToFind2, Parent.class);\n        assertNull(method2);\n    }\n\n    @Test\n    public void isInjectTest() throws NoSuchMethodException {\n        final Method injectableMethod = Child.class.getMethod(\"injectableMethod\");\n        assertTrue(ReflectionUtils.isInject(Arrays.asList(injectableMethod.getDeclaredAnnotations())));\n\n        final Method methodToFind = Child.class.getMethod(\"parametrizedMethod1\", Integer.class);\n        assertFalse(ReflectionUtils.isInject(Arrays.asList(methodToFind.getDeclaredAnnotations())));\n    }\n\n    @Test\n    public void isConstructorCompatibleTest() throws NoSuchMethodException {\n        assertFalse(ReflectionUtils.isConstructorCompatible(Child.class.getDeclaredConstructor()));\n        assertTrue(ReflectionUtils.isConstructorCompatible(Child.class.getDeclaredConstructor(String.class)));\n    }\n\n    @Test\n    public void getAnnotationTest() throws NoSuchMethodException {\n        final Method method = Child.class.getMethod(\"annotationHolder\");\n        assertNotNull(ReflectionUtils.getAnnotation(method, Schema.class));\n        assertNull(ReflectionUtils.getAnnotation(method, ApiResponse.class));\n    }\n\n    @Test\n    public void isVoidTest() {\n        assertTrue(ReflectionUtils.isVoid(Void.class));\n        assertTrue(ReflectionUtils.isVoid(Void.TYPE));\n        assertFalse(ReflectionUtils.isVoid(String.class));\n    }\n\n    @Test\n    public void testDerivedAnnotation() {\n        final Path annotation = ReflectionUtils.getAnnotation(Child.class, javax.ws.rs.Path.class);\n        assertNotNull(annotation);\n        assertEquals(annotation.value(), \"parentInterfacePath\");\n    }\n\n    @Test\n    public void getDeclaredFieldsFromInterfaceTest() throws NoSuchMethodException {\n        final Class cls = IParent.class;\n        assertEquals(Collections.emptyList(), ReflectionUtils.getDeclaredFields(cls));\n    }\n\n    @Test\n    public void declaredFieldsShouldBeSorted() {\n        final Class cls = ObjectWithManyFields.class;\n        final List<Field> declaredFields = ReflectionUtils.getDeclaredFields(cls);\n        assertEquals(declaredFields.size(), 4);\n        assertEquals(Arrays.asList(\"a\", \"b\", \"c\", \"d\"), declaredFields.stream().map(Field::getName).collect(Collectors.toList()));\n    }\n\n    @Test\n    public void testFindMethodForNullClass() throws Exception {\n        Method method = ReflectionUtilsTest.class.getMethod(\"testFindMethodForNullClass\", (Class<?>[]) null);\n        assertNull(ReflectionUtils.findMethod(method, null));\n    }\n\n    @Test\n    public void getRepeatableAnnotationsArrayTest() {\n        Tag[] annotations = ReflectionUtils.getRepeatableAnnotationsArray(InheritingClass.class, Tag.class);\n        assertNotNull(annotations);\n        assertEquals(annotations.length, 1);\n        assertNotNull(annotations[0]);\n        assertEquals(annotations[0].name(), \"inherited tag\");\n    }\n\n    @Test\n    public void getParameterAnnotationsTest() throws NoSuchMethodException {\n        Method method = SecondLevelSubClass.class.getMethod(\"method\", String.class);\n        Annotation[][] parameterAnnotations = ReflectionUtils.getParameterAnnotations(method);\n        assertEquals(parameterAnnotations.length, 1);\n        assertEquals(parameterAnnotations[0].length, 1);\n        assertTrue(parameterAnnotations[0][0] instanceof AnnotationInterface);\n        assertEquals(((AnnotationInterface)parameterAnnotations[0][0]).value(), \"level1\");\n    }\n\n    @Test\n    public void getParameterAnnotationsForOverriddenAnnotationTest() throws NoSuchMethodException {\n        Method method = ThirdLevelSubClass.class.getMethod(\"method\", String.class);\n        Annotation[][] parameterAnnotations = ReflectionUtils.getParameterAnnotations(method);\n        assertEquals(parameterAnnotations.length, 1);\n        assertEquals(parameterAnnotations[0].length, 1);\n        assertTrue(parameterAnnotations[0][0] instanceof AnnotationInterface);\n        assertEquals(((AnnotationInterface)parameterAnnotations[0][0]).value(), \"level4\");\n    }\n\n    @Tag(name = \"inherited tag\")\n    private interface AnnotatedInterface {}\n\n    private class InheritingClass implements AnnotatedInterface {}\n\n    @Target({PARAMETER})\n    @Retention(RetentionPolicy.RUNTIME)\n    private @interface AnnotationInterface {\n        String value();\n    }\n\n    private static class BaseClass {\n        public void method(@AnnotationInterface(\"level1\") String example) {}\n    }\n\n    private static class FirstLevelSubClass extends BaseClass {\n        @Override\n        public void method(String example){}\n    }\n\n    private static class SecondLevelSubClass extends FirstLevelSubClass {\n        @Override\n        public void method(String example){}\n    }\n\n    private static class ThirdLevelSubClass extends SecondLevelSubClass {\n        @Override\n        public void method(@AnnotationInterface(\"level4\") String example){}\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/reflection/resources/Child.java",
    "content": "package io.swagger.v3.core.util.reflection.resources;\n\nimport javax.inject.Inject;\n\npublic class Child extends Parent<Integer> implements IParent<Long> {\n\n    protected Child() {\n\n    }\n\n    public Child(String arg) {\n\n    }\n\n    @Override\n    public Integer parametrizedMethod1(Integer arg) {\n        return null;\n    }\n\n    @Override\n    public String parametrizedMethod2(Long arg) {\n        return null;\n    }\n\n    public Integer parametrizedMethod3(Long arg) {\n        return null;\n    }\n\n    public Integer parametrizedMethod4(Long arg) {\n        return null;\n    }\n\n    @Override\n    public String parametrizedMethod5(Long arg) {\n        return null;\n    }\n\n    @Override\n    public void annotationHolder() {\n\n    }\n\n    @Deprecated\n    @Inject\n    public void injectableMethod() {\n\n    }\n\n    @IndirectAnnotation\n    public void indirectAnnotationMethod() {\n\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/reflection/resources/IGrandparent.java",
    "content": "package io.swagger.v3.core.util.reflection.resources;\n\npublic interface IGrandparent<T extends Number> {\n    String parametrizedMethod5(T arg);\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/reflection/resources/IParent.java",
    "content": "package io.swagger.v3.core.util.reflection.resources;\n\nimport javax.ws.rs.Path;\n\n@Path(\"parentInterfacePath\")\n@IndirectAnnotation\npublic interface IParent<T extends Number> extends IGrandparent<T> {\n\n    public String parametrizedMethod2(T arg);\n\n    @Override\n    String parametrizedMethod5(T arg);\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/reflection/resources/IndirectAnnotation.java",
    "content": "package io.swagger.v3.core.util.reflection.resources;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n@Target({ElementType.METHOD, ElementType.TYPE})\n@Retention(RetentionPolicy.RUNTIME)\n@interface IndirectAnnotation {\n\n}"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/reflection/resources/ObjectWithManyFields.java",
    "content": "package io.swagger.v3.core.util.reflection.resources;\n\npublic class ObjectWithManyFields {\n\n    public String a;\n    public boolean d;\n    public Integer c;\n    public Object b;\n\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/java/io/swagger/v3/core/util/reflection/resources/Parent.java",
    "content": "package io.swagger.v3.core.util.reflection.resources;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@IndirectAnnotation\npublic class Parent<T extends Number> {\n\n    public T parametrizedMethod1(T arg) {\n        return null;\n    }\n\n    public Long parametrizedMethod3(Integer arg) {\n        return null;\n    }\n\n    public Integer parametrizedMethod4(Integer arg) {\n        return null;\n    }\n\n    public Integer parametrizedMethod4(Integer arg1, Integer arg2) {\n        return null;\n    }\n\n    @Schema(title = \"test\")\n    public void annotationHolder() {\n\n    }\n\n    @Override\n    public boolean equals(Object obj) {\n        return super.equals(obj);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/AbstractBaseModelWithoutFields.json",
    "content": "{\n    \"AbstractBaseModelWithoutFields\": {\n        \"type\": \"object\",\n        \"description\": \"I am an Abstract Base Model without any declared fields and with Sub-Types\"\n    },\n    \"Thing3\": {\n        \"type\": \"object\",\n        \"description\": \"Thing3\",\n        \"allOf\": [\n            {\n                \"$ref\": \"#/components/schemas/AbstractBaseModelWithoutFields\"\n            },\n            {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"a\": {\n                        \"type\": \"string\",\n                        \"description\": \"Additional field a\"\n                    },\n                    \"x\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int32\",\n                        \"description\": \"Additional field x\"\n                    }\n                }\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/Animal.json",
    "content": "{\n    \"Animal\": {\n        \"type\": \"object\",\n        \"properties\": {\n            \"name\": {\n                \"type\": \"string\"\n            },\n            \"type\": {\n                \"type\": \"string\"\n            }\n        },\n        \"discriminator\" : {\n            \"propertyName\" : \"type\"\n        }\n    },\n    \"Human\": {\n        \"type\": \"object\",\n        \"allOf\": [\n            {\n                \"$ref\": \"#/components/schemas/Animal\"\n            },\n            {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"firstName\": {\n                        \"type\": \"string\"\n                    },\n                    \"lastName\": {\n                        \"type\": \"string\"\n                    }\n                }\n            }\n        ]\n    },\n    \"Pet\": {\n        \"type\": \"object\",\n        \"allOf\": [\n            {\n                \"$ref\": \"#/components/schemas/Animal\"\n            },\n            {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"type\": {\n                        \"type\": \"string\",\n                        \"description\": \"The pet type\"\n                    },\n                    \"name\": {\n                        \"type\": \"string\",\n                        \"description\": \"The name of the pet\"\n                    },\n                    \"isDomestic\": {\n                        \"type\": \"boolean\"\n                    }\n                }\n            }\n        ],\n        \"required\": [\n            \"isDomestic\",\n            \"name\",\n            \"type\"\n        ]\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/AnimalClass.json",
    "content": "{\n    \"AnimalClass\": {\n        \"type\": \"object\",\n        \"properties\": {\n            \"name\": {\n                \"type\": \"string\"\n            },\n            \"type\": {\n                \"type\": \"string\"\n            }\n        },\n        \"discriminator\" : {\n            \"propertyName\" : \"type\"\n        }\n    },\n    \"HumanClass\": {\n        \"type\": \"object\",\n        \"allOf\": [\n            {\n                \"$ref\": \"#/components/schemas/AnimalClass\"\n            },\n            {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"firstName\": {\n                        \"type\": \"string\"\n                    },\n                    \"lastName\": {\n                        \"type\": \"string\"\n                    }\n                }\n            }\n        ]\n    },\n    \"PetClass\": {\n        \"type\": \"object\",\n        \"allOf\": [\n            {\n                \"$ref\": \"#/components/schemas/AnimalClass\"\n            },\n            {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"type\": {\n                        \"type\": \"string\",\n                        \"description\": \"The pet type\"\n                    },\n                    \"name\": {\n                        \"type\": \"string\",\n                        \"description\": \"The name of the pet\"\n                    },\n                    \"isDomestic\": {\n                        \"type\": \"boolean\"\n                    }\n                }\n            }\n        ],\n        \"required\": [\n            \"isDomestic\",\n            \"name\",\n            \"type\"\n        ]\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/AnimalWithSchemaSubtypes.json",
    "content": "{\n    \"AnimalWithSchemaSubtypes\": {\n        \"type\": \"object\",\n        \"properties\": {\n            \"name\": {\n                \"type\": \"string\"\n            },\n            \"type\": {\n                \"type\": \"string\"\n            }\n        },\n        \"discriminator\" : {\n            \"propertyName\" : \"type\"\n        }\n    },\n    \"HumanWithSchemaSubtypes\": {\n        \"type\": \"object\",\n        \"allOf\": [\n            {\n                \"$ref\": \"#/components/schemas/AnimalWithSchemaSubtypes\"\n            },\n            {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"firstName\": {\n                        \"type\": \"string\"\n                    },\n                    \"lastName\": {\n                        \"type\": \"string\"\n                    }\n                }\n            }\n        ]\n    },\n    \"PetWithSchemaSubtypes\": {\n        \"type\": \"object\",\n        \"allOf\": [\n            {\n                \"$ref\": \"#/components/schemas/AnimalWithSchemaSubtypes\"\n            },\n            {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"type\": {\n                        \"type\": \"string\",\n                        \"description\": \"The pet type\"\n                    },\n                    \"name\": {\n                        \"type\": \"string\",\n                        \"description\": \"The name of the pet\"\n                    },\n                    \"isDomestic\": {\n                        \"type\": \"boolean\"\n                    }\n                }\n\n            }\n        ],\n        \"required\": [\n            \"isDomestic\",\n            \"name\",\n            \"type\"\n        ]\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/Cat.json",
    "content": "{\n    \"Cat\": {\n        \"required\": [\n            \"isDomestic\",\n            \"name\",\n            \"type\"\n        ],\n        \"type\": \"object\",\n        \"properties\": {\n            \"clawCount\": {\n                \"type\": \"integer\",\n                \"format\": \"int32\"\n            },\n            \"type\": {\n                \"type\": \"string\",\n                \"description\": \"The pet type\"\n            },\n            \"name\": {\n                \"type\": \"string\",\n                \"description\": \"The name of the pet\"\n            },\n            \"isDomestic\": {\n                \"type\": \"boolean\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/GuavaTestModel.json",
    "content": "{\n    \"GuavaModel\": {\n        \"type\": \"object\",\n        \"properties\": {\n            \"name\": {\n                \"type\": \"string\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/Human.json",
    "content": "{\n    \"Human\": {\n        \"type\": \"object\",\n        \"properties\": {\n            \"name\": {\n                \"type\": \"string\"\n            },\n            \"type\": {\n                \"type\": \"string\"\n            },\n            \"firstName\": {\n                \"type\": \"string\"\n            },\n            \"lastName\": {\n                \"type\": \"string\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/JodaDateTimeModel.json",
    "content": "{\n    \"JodaDateTimeModel\": {\n        \"type\": \"object\",\n        \"properties\": {\n            \"createdAt\": {\n                \"type\": \"string\",\n                \"format\": \"date-time\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/ModelWithFieldWithSubTypes.json",
    "content": "{\n    \"AbstractBaseModelWithSubTypes\": {\n        \"type\": \"object\",\n        \"discriminator\" : {\n            \"propertyName\" : \"_type\"\n        },\n        \"properties\": {\n            \"_type\": {\n                \"type\": \"string\",\n                \"description\": \"This value is used as a discriminator for serialization\"\n            },\n            \"a\": {\n                \"type\": \"string\",\n                \"description\": \"An arbitrary field\"\n            },\n            \"b\": {\n                \"type\": \"string\",\n                \"description\": \"An arbitrary field\"\n            }\n        },\n        \"description\": \"I am an Abstract Base Model with Sub-Types\"\n    },\n    \"ModelWithFieldWithSubTypes\": {\n        \"type\": \"object\",\n        \"properties\": {\n            \"z\": {\n                \"$ref\": \"#/components/schemas/AbstractBaseModelWithSubTypes\"\n            }\n        },\n        \"description\": \"Class that has a field that is the AbstractBaseModelWithSubTypes\"\n    },\n    \"Thing1\": {\n        \"type\": \"object\",\n        \"description\": \"Shake hands with Thing1\",\n        \"allOf\": [\n            {\n                \"$ref\": \"#/components/schemas/AbstractBaseModelWithSubTypes\"\n            },\n            {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"a\": {\n                        \"type\": \"string\",\n                        \"description\": \"Override the abstract a\"\n                    },\n                    \"x\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int32\",\n                        \"description\": \"Thing1 has an additional field\"\n                    }\n                }\n            }\n        ]\n    },\n    \"Thing2\": {\n        \"type\": \"object\",\n        \"description\": \"and Thing2\",\n        \"allOf\": [\n            {\n                \"$ref\": \"#/components/schemas/AbstractBaseModelWithSubTypes\"\n            },\n            {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"a\": {\n                        \"type\": \"string\",\n                        \"description\": \"Override the abstract a\"\n                    },\n                    \"s\": {\n                        \"type\": \"string\",\n                        \"description\": \"Thing2 has an additional field\"\n                    }\n                }\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/ModelWithFormattedStrings.json",
    "content": "{\n    \"type\": \"object\",\n    \"properties\": {\n        \"uuid\": {\n            \"type\": \"string\",\n            \"format\": \"uuid\"\n        },\n        \"uri\": {\n            \"type\": \"string\",\n            \"format\": \"uri\"\n        },\n        \"url\": {\n            \"type\": \"string\",\n            \"format\": \"url\"\n        },\n        \"date\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n        },\n        \"aByte\": {\n            \"type\": \"string\",\n            \"format\": \"byte\"\n        },\n        \"aByteObject\": {\n            \"type\": \"string\",\n            \"format\": \"byte\"\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/ModelWithSecurityRequirements.json",
    "content": "{\n  \"openapi\": \"3.0.1\",\n  \"info\": {\n    \"title\": \"Swagger Petstore\",\n    \"contact\": {\n      \"name\": \"Swagger API Team\",\n      \"url\": \"http://swagger.io\",\n      \"email\": \"foo@bar.baz\"\n    },\n    \"version\": \"1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"http://petstore.swagger.io\"\n    }\n  ],\n  \"paths\": {\n    \"/pets\": {\n      \"get\": {\n        \"tags\": [\n          \"Pet Operations\"\n        ],\n        \"summary\": \"finds pets in the system\",\n        \"description\": \"a longer description\",\n        \"operationId\": \"get pet by id\",\n        \"parameters\": [\n          {\n            \"name\": \"tags\",\n            \"in\": \"query\",\n            \"description\": \"tags to filter by\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"pet to fetch\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"pets returned\",\n            \"content\": {\n              \"*/*\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Person\"\n                }\n              }\n            }\n          },\n          \"default\": {\n            \"description\": \"error response\",\n            \"content\": {\n              \"*/*\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        },\n        \"security\": [\n          {\n            \"internal_oauth2\": [\"user:email\"]\n          },\n          {\n            \"api_key\": []\n          }\n        ]\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Person\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          \"firstName\": {\n            \"type\": \"string\"\n          },\n          \"address\": {\n            \"$ref\": \"#/components/schemas/Address\"\n          },\n          \"properties\": {\n            \"type\": \"object\",\n            \"additionalProperties\": {\n              \"type\": \"string\"\n            }\n          },\n          \"birthDate\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"float\": {\n            \"type\": \"number\",\n            \"format\": \"float\"\n          },\n          \"double\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        }\n      }\n    },\n    \"securitySchemes\": {\n      \"githubAccessCode\": {\n        \"flows\": {\n          \"authorizationCode\": {\n            \"scopes\": {\n              \"user:email\": \"Grants read access to a user’s email addresses.\"\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/Person.json",
    "content": "{\n    \"Person\": {\n        \"type\": \"object\",\n        \"properties\": {\n            \"id\": {\n                \"type\": \"integer\",\n                \"format\": \"int64\"\n            },\n            \"firstName\": {\n                \"type\": \"string\"\n            },\n            \"address\": {\n                \"$ref\": \"#/components/schemas/Address\"\n            },\n            \"properties\": {\n                \"type\": \"object\",\n                \"additionalProperties\": {\n                    \"type\": \"string\"\n                }\n            },\n            \"birthDate\": {\n                \"type\": \"string\",\n                \"format\": \"date-time\"\n            },\n            \"float\": {\n                \"type\": \"number\",\n                \"format\": \"float\"\n            },\n            \"double\": {\n                \"type\": \"number\",\n                \"format\": \"double\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/Pet.json",
    "content": "{\n    \"Pet\": {\n        \"required\": [\n            \"isDomestic\",\n            \"name\",\n            \"type\"\n        ],\n        \"type\": \"object\",\n        \"properties\": {\n            \"type\": {\n                \"type\": \"string\",\n                \"description\": \"The pet type\"\n            },\n            \"name\": {\n                \"type\": \"string\",\n                \"description\": \"The name of the pet\"\n            },\n            \"isDomestic\": {\n                \"type\": \"boolean\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/comprehensiveOAS31/comprehensive-openapi.yaml",
    "content": "# Comprehensive OpenAPI 3.1 and JSON Schema 2020/12 Example\n# This file demonstrates a comprehensive OpenAPI 3.1 document with JSON Schema 2020/12 features\n# It includes all keywords defined in both specifications and uses both internal and external references\n\nopenapi: 3.1.0\njsonSchemaDialect: https://json-schema.org/draft/2020-12/schema\n\n# Basic information about the API\ninfo:\n  title: Comprehensive Pet Store API\n  version: 1.0.0\n  summary: A comprehensive example of an OpenAPI 3.1 document with JSON Schema 2020/12 features\n  description: |\n    This is a comprehensive example of an OpenAPI 3.1 document that includes all keywords defined in both\n    OpenAPI 3.1 and JSON Schema 2020/12 specifications. It demonstrates the use of both internal and external\n    references, as well as seldom used constructs like $schema, $id, and $dynamicAnchor.\n\n    The API allows you to manage pets, users, and orders in a pet store.\n  termsOfService: https://example.com/terms/\n  contact:\n    name: API Support\n    url: https://example.com/support\n    email: support@example.com\n  license:\n    name: Apache 2.0\n    url: https://www.apache.org/licenses/LICENSE-2.0.html\n    identifier: Apache-2.0\n\n# Server information\nservers:\n  - url: https://api.example.com/v1\n    description: Production server\n  - url: https://staging-api.example.com/v1\n    description: Staging server\n    variables:\n      port:\n        enum:\n          - '8443'\n          - '443'\n        default: '443'\n      basePath:\n        default: v1\n  - url: https://dev-api.example.com/v1\n    description: Development server\n  - url: http://localhost:{port}/{basePath}\n    description: Local development server\n    variables:\n      port:\n        enum:\n          - '8080'\n          - '8081'\n        default: '8080'\n      basePath:\n        default: v1\n\n# External documentation\nexternalDocs:\n  description: Find more info here\n  url: https://example.com/docs\n\n# Tags for API documentation control and organization\ntags:\n  - name: pets\n    description: Pet operations\n    externalDocs:\n      description: Find more info about pets\n      url: https://example.com/docs/pets\n  - name: users\n    description: User operations\n    externalDocs:\n      description: Find more info about users\n      url: https://example.com/docs/users\n  - name: orders\n    description: Order operations\n    externalDocs:\n      description: Find more info about orders\n      url: https://example.com/docs/orders\n\n# Security schemes\nsecurity:\n  - petstore_auth:\n      - read:pets\n      - write:pets\n  - user_auth:\n      - read:users\n      - write:users\n  - order_auth:\n      - read:orders\n      - write:orders\n  - api_key: []\n\n# Paths\npaths:\n  # Pet paths\n  /pets:\n    $ref: \"./paths/pet-paths.yaml#/~1pets\"\n  /pets/{petId}:\n    $ref: \"./paths/pet-paths.yaml#/~1pets~1{petId}\"\n  /pets/findByStatus:\n    $ref: \"./paths/pet-paths.yaml#/~1pets~1findByStatus\"\n  /pets/findByTags:\n    $ref: \"./paths/pet-paths.yaml#/~1pets~1findByTags\"\n  /pets/{petId}/uploadImage:\n    $ref: \"./paths/pet-paths.yaml#/~1pets~1{petId}~1uploadImage\"\n\n  # User paths\n  /users:\n    $ref: \"./paths/user-paths.yaml#/~1users\"\n  /users/{userId}:\n    $ref: \"./paths/user-paths.yaml#/~1users~1{userId}\"\n  /users/login:\n    $ref: \"./paths/user-paths.yaml#/~1users~1login\"\n  /users/logout:\n    $ref: \"./paths/user-paths.yaml#/~1users~1logout\"\n  /users/{userId}/preferences:\n    $ref: \"./paths/user-paths.yaml#/~1users~1{userId}~1preferences\"\n\n  # Order paths\n  /orders:\n    $ref: \"./paths/order-paths.yaml#/~1orders\"\n  /orders/{orderId}:\n    $ref: \"./paths/order-paths.yaml#/~1orders~1{orderId}\"\n  /orders/{orderId}/status:\n    $ref: \"./paths/order-paths.yaml#/~1orders~1{orderId}~1status\"\n  /orders/{orderId}/invoice:\n    $ref: \"./paths/order-paths.yaml#/~1orders~1{orderId}~1invoice\"\n  /orders/{orderId}/shipment:\n    $ref: \"./paths/order-paths.yaml#/~1orders~1{orderId}~1shipment\"\n\n  # Additional path with inline definition\n  /health:\n    get:\n      summary: Health check\n      description: Returns the health status of the API\n      operationId: healthCheck\n      tags:\n        - system\n      responses:\n        '200':\n          description: Health check response\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  status:\n                    type: string\n                    enum: [ok, degraded, down]\n                  version:\n                    type: string\n                  timestamp:\n                    type: string\n                    format: date-time\n                required:\n                  - status\n                  - version\n                  - timestamp\n              examples:\n                healthy:\n                  summary: Healthy response\n                  value:\n                    status: ok\n                    version: 1.0.0\n                    timestamp: \"2023-01-01T12:00:00Z\"\n                degraded:\n                  summary: Degraded response\n                  value:\n                    status: degraded\n                    version: 1.0.0\n                    timestamp: \"2023-01-01T12:00:00Z\"\n      security: []\n\n# Webhooks\nwebhooks:\n  newPet:\n    post:\n      summary: New pet webhook\n      description: Webhook for when a new pet is created\n      operationId: newPetWebhook\n      tags:\n        - pets\n        - webhooks\n      requestBody:\n        description: Information about the new pet\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: \"./schemas/pet-schemas.yaml#/Pet\"\n      responses:\n        '200':\n          description: Webhook processed successfully\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: \"./schemas/common-schemas.yaml#/Error\"\n  updatedPet:\n    post:\n      summary: Updated pet webhook\n      description: Webhook for when a pet is updated\n      operationId: updatedPetWebhook\n      tags:\n        - pets\n        - webhooks\n      requestBody:\n        description: Information about the updated pet\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: \"./schemas/pet-schemas.yaml#/Pet\"\n      responses:\n        '200':\n          description: Webhook processed successfully\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: \"./schemas/common-schemas.yaml#/Error\"\n  newOrder:\n    post:\n      summary: New order webhook\n      description: Webhook for when a new order is created\n      operationId: newOrderWebhook\n      tags:\n        - orders\n        - webhooks\n      requestBody:\n        description: Information about the new order\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: \"./schemas/order-schemas.yaml#/Order\"\n      responses:\n        '200':\n          description: Webhook processed successfully\n        '400':\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: \"./schemas/common-schemas.yaml#/Error\"\n\n# Components\ncomponents:\n  # Schemas\n  schemas:\n    # Common schemas\n    Error:\n      $ref: \"./schemas/common-schemas.yaml#/Error\"\n    Identifiable:\n      $ref: \"./schemas/common-schemas.yaml#/Identifiable\"\n    ExtendedSchema:\n      $ref: \"./schemas/common-schemas.yaml#/ExtendedSchema\"\n    CommentedSchema:\n      $ref: \"./schemas/common-schemas.yaml#/CommentedSchema\"\n    SchemaWithDefs:\n      $ref: \"./schemas/common-schemas.yaml#/SchemaWithDefs\"\n    ValidationSchema:\n      $ref: \"./schemas/common-schemas.yaml#/ValidationSchema\"\n    ApplicatorSchema:\n      $ref: \"./schemas/common-schemas.yaml#/ApplicatorSchema\"\n\n    # Pet schemas\n    Pet:\n      $ref: \"./schemas/pet-schemas.yaml#/Pet\"\n    Category:\n      $ref: \"./schemas/pet-schemas.yaml#/Category\"\n    Tag:\n      $ref: \"./schemas/pet-schemas.yaml#/Tag\"\n    Dog:\n      $ref: \"./schemas/pet-schemas.yaml#/Dog\"\n    Cat:\n      $ref: \"./schemas/pet-schemas.yaml#/Cat\"\n    Bird:\n      $ref: \"./schemas/pet-schemas.yaml#/Bird\"\n    Pets:\n      $ref: \"./schemas/pet-schemas.yaml#/Pets\"\n    PetWithValidation:\n      $ref: \"./schemas/pet-schemas.yaml#/PetWithValidation\"\n    PetWithConditional:\n      $ref: \"./schemas/pet-schemas.yaml#/PetWithConditional\"\n\n    # User schemas\n    User:\n      $ref: \"./schemas/user-schemas.yaml#/User\"\n    Address:\n      $ref: \"./schemas/user-schemas.yaml#/Address\"\n    UserArray:\n      $ref: \"./schemas/user-schemas.yaml#/UserArray\"\n    UserWithRoles:\n      $ref: \"./schemas/user-schemas.yaml#/UserWithRoles\"\n    Role:\n      $ref: \"./schemas/user-schemas.yaml#/Role\"\n    Permission:\n      $ref: \"./schemas/user-schemas.yaml#/Permission\"\n    UserCredentials:\n      $ref: \"./schemas/user-schemas.yaml#/UserCredentials\"\n    UserPreferences:\n      $ref: \"./schemas/user-schemas.yaml#/UserPreferences\"\n    UserWithPreferences:\n      $ref: \"./schemas/user-schemas.yaml#/UserWithPreferences\"\n\n    # Order schemas\n    Order:\n      $ref: \"./schemas/order-schemas.yaml#/Order\"\n    OrderItem:\n      $ref: \"./schemas/order-schemas.yaml#/OrderItem\"\n    OrderWithItems:\n      $ref: \"./schemas/order-schemas.yaml#/OrderWithItems\"\n    OrderStatus:\n      $ref: \"./schemas/order-schemas.yaml#/OrderStatus\"\n    OrderArray:\n      $ref: \"./schemas/order-schemas.yaml#/OrderArray\"\n    OrderSummary:\n      $ref: \"./schemas/order-schemas.yaml#/OrderSummary\"\n    Invoice:\n      $ref: \"./schemas/order-schemas.yaml#/Invoice\"\n    Payment:\n      $ref: \"./schemas/order-schemas.yaml#/Payment\"\n    Shipment:\n      $ref: \"./schemas/order-schemas.yaml#/Shipment\"\n\n    # External JSON Schema reference\n    JsonSchema:\n      $ref: \"./schemas/json-schema.yaml\"\n\n    # Additional inline schemas with JSON Schema 2020/12 features\n    BooleanSchema:\n      $schema: \"https://json-schema.org/draft/2020-12/schema\"\n      $id: \"https://example.com/schemas/BooleanSchema\"\n      $anchor: \"BooleanSchema\"\n      title: \"Boolean Schema\"\n      description: \"A schema that is just a boolean value\"\n      type: boolean\n\n    NullSchema:\n      $schema: \"https://json-schema.org/draft/2020-12/schema\"\n      $id: \"https://example.com/schemas/NullSchema\"\n      $anchor: \"NullSchema\"\n      title: \"Null Schema\"\n      description: \"A schema that is just a null value\"\n      type: \"null\"\n\n    MultiTypeSchema:\n      $schema: \"https://json-schema.org/draft/2020-12/schema\"\n      $id: \"https://example.com/schemas/MultiTypeSchema\"\n      $anchor: \"MultiTypeSchema\"\n      title: \"Multi-Type Schema\"\n      description: \"A schema that accepts multiple types\"\n      type: [string, number, boolean, \"null\"]\n\n    RecursiveSchema:\n      $schema: \"https://json-schema.org/draft/2020-12/schema\"\n      $id: \"https://example.com/schemas/RecursiveSchema\"\n      $anchor: \"RecursiveSchema\"\n      title: \"Recursive Schema\"\n      description: \"A schema that references itself\"\n      type: object\n      properties:\n        id:\n          type: string\n        name:\n          type: string\n        children:\n          type: array\n          items:\n            $ref: \"#/components/schemas/RecursiveSchema\"\n      required:\n        - id\n        - name\n\n    UnevaluatedSchema:\n      $schema: \"https://json-schema.org/draft/2020-12/schema\"\n      $id: \"https://example.com/schemas/UnevaluatedSchema\"\n      $anchor: \"UnevaluatedSchema\"\n      title: \"Unevaluated Schema\"\n      description: \"A schema that uses unevaluatedProperties and unevaluatedItems\"\n      type: object\n      properties:\n        id:\n          type: string\n        name:\n          type: string\n      unevaluatedProperties: false\n      allOf:\n        - properties:\n            age:\n              type: integer\n          unevaluatedProperties: false\n\n    ContentSchema:\n      $schema: \"https://json-schema.org/draft/2020-12/schema\"\n      $id: \"https://example.com/schemas/ContentSchema\"\n      $anchor: \"ContentSchema\"\n      title: \"Content Schema\"\n      description: \"A schema that uses contentEncoding and contentMediaType\"\n      type: string\n      contentEncoding: base64\n      contentMediaType: image/png\n\n    DynamicRefSchema:\n      $schema: \"https://json-schema.org/draft/2020-12/schema\"\n      $id: \"https://example.com/schemas/DynamicRefSchema\"\n      $anchor: \"DynamicRefSchema\"\n      title: \"Dynamic Ref Schema\"\n      description: \"A schema that uses $dynamicRef\"\n      type: object\n      properties:\n        entity:\n          $dynamicRef: \"#Identifiable\"\n      required:\n        - entity\n\n  # Path items\n  pathItems:\n    petPath:\n      summary: Pet path item\n      description: Path item for pet operations\n      get:\n        summary: Get pet\n        description: Returns a pet\n        operationId: getPet\n        tags:\n          - pets\n        parameters:\n          - name: petId\n            in: path\n            description: ID of pet to return\n            required: true\n            schema:\n              type: integer\n              format: int64\n              minimum: 1\n        responses:\n          '200':\n            description: Successful operation\n            content:\n              application/json:\n                schema:\n                  $ref: \"./schemas/pet-schemas.yaml#/Pet\"\n          '400':\n            description: Invalid ID supplied\n            content:\n              application/json:\n                schema:\n                  $ref: \"./schemas/common-schemas.yaml#/Error\"\n          '404':\n            description: Pet not found\n            content:\n              application/json:\n                schema:\n                  $ref: \"./schemas/common-schemas.yaml#/Error\"\n        security:\n          - petstore_auth:\n              - read:pets\n          - api_key: []\n    userPath:\n      summary: User path item\n      description: Path item for user operations\n      get:\n        summary: Get user\n        description: Returns a user\n        operationId: getUser\n        tags:\n          - users\n        parameters:\n          - name: userId\n            in: path\n            description: ID of user to return\n            required: true\n            schema:\n              type: integer\n              format: int64\n              minimum: 1\n        responses:\n          '200':\n            description: Successful operation\n            content:\n              application/json:\n                schema:\n                  $ref: \"./schemas/user-schemas.yaml#/User\"\n          '400':\n            description: Invalid ID supplied\n            content:\n              application/json:\n                schema:\n                  $ref: \"./schemas/common-schemas.yaml#/Error\"\n          '404':\n            description: User not found\n            content:\n              application/json:\n                schema:\n                  $ref: \"./schemas/common-schemas.yaml#/Error\"\n        security:\n          - user_auth:\n              - read:users\n          - api_key: []\n    orderPath:\n      summary: Order path item\n      description: Path item for order operations\n      get:\n        summary: Get order\n        description: Returns an order\n        operationId: getOrder\n        tags:\n          - orders\n        parameters:\n          - name: orderId\n            in: path\n            description: ID of order to return\n            required: true\n            schema:\n              type: integer\n              format: int64\n              minimum: 1\n        responses:\n          '200':\n            description: Successful operation\n            content:\n              application/json:\n                schema:\n                  $ref: \"./schemas/order-schemas.yaml#/Order\"\n          '400':\n            description: Invalid ID supplied\n            content:\n              application/json:\n                schema:\n                  $ref: \"./schemas/common-schemas.yaml#/Error\"\n          '404':\n            description: Order not found\n            content:\n              application/json:\n                schema:\n                  $ref: \"./schemas/common-schemas.yaml#/Error\"\n        security:\n          - order_auth:\n              - read:orders\n          - api_key: []\n\n  # Parameters\n  parameters:\n    limitParam:\n      name: limit\n      in: query\n      description: Maximum number of items to return\n      required: false\n      schema:\n        type: integer\n        format: int32\n        minimum: 1\n        maximum: 100\n        default: 20\n    offsetParam:\n      name: offset\n      in: query\n      description: Offset for pagination\n      required: false\n      schema:\n        type: integer\n        format: int32\n        minimum: 0\n        default: 0\n    petIdParam:\n      name: petId\n      in: path\n      description: ID of pet to return\n      required: true\n      schema:\n        type: integer\n        format: int64\n        minimum: 1\n    userIdParam:\n      name: userId\n      in: path\n      description: ID of user to return\n      required: true\n      schema:\n        type: integer\n        format: int64\n        minimum: 1\n    orderIdParam:\n      name: orderId\n      in: path\n      description: ID of order to return\n      required: true\n      schema:\n        type: integer\n        format: int64\n        minimum: 1\n\n  # Request bodies\n  requestBodies:\n    petRequestBody:\n      description: Pet object that needs to be added to the store\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: \"./schemas/pet-schemas.yaml#/Pet\"\n    userRequestBody:\n      description: User object that needs to be added to the system\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: \"./schemas/user-schemas.yaml#/User\"\n    orderRequestBody:\n      description: Order object that needs to be added to the store\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: \"./schemas/order-schemas.yaml#/Order\"\n\n  # Responses\n  responses:\n    notFound:\n      description: The specified resource was not found\n      content:\n        application/json:\n          schema:\n            $ref: \"./schemas/common-schemas.yaml#/Error\"\n    badRequest:\n      description: The request was invalid\n      content:\n        application/json:\n          schema:\n            $ref: \"./schemas/common-schemas.yaml#/Error\"\n    unauthorized:\n      description: Authentication information is missing or invalid\n      headers:\n        WWW-Authenticate:\n          schema:\n            type: string\n      content:\n        application/json:\n          schema:\n            $ref: \"./schemas/common-schemas.yaml#/Error\"\n    forbidden:\n      description: The server understood the request but refuses to authorize it\n      content:\n        application/json:\n          schema:\n            $ref: \"./schemas/common-schemas.yaml#/Error\"\n    serverError:\n      description: An unexpected error occurred\n      content:\n        application/json:\n          schema:\n            $ref: \"./schemas/common-schemas.yaml#/Error\"\n\n  # Headers\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    X-Total-Count:\n      description: Total number of items\n      schema:\n        type: integer\n        format: int32\n        minimum: 0\n\n  # Security schemes\n  securitySchemes:\n    petstore_auth:\n      type: oauth2\n      description: OAuth2 authentication for pet operations\n      flows:\n        implicit:\n          authorizationUrl: https://example.com/oauth/authorize\n          scopes:\n            read:pets: read your pets\n            write:pets: modify pets in your account\n    user_auth:\n      type: oauth2\n      description: OAuth2 authentication for user operations\n      flows:\n        implicit:\n          authorizationUrl: https://example.com/oauth/authorize\n          scopes:\n            read:users: read user information\n            write:users: modify user information\n    order_auth:\n      type: oauth2\n      description: OAuth2 authentication for order operations\n      flows:\n        implicit:\n          authorizationUrl: https://example.com/oauth/authorize\n          scopes:\n            read:orders: read your orders\n            write:orders: modify orders in your account\n    api_key:\n      type: apiKey\n      description: API key authentication\n      name: api_key\n      in: header\n\n  # Examples\n  examples:\n    pet:\n      summary: Example of a pet\n      value:\n        id: 1\n        name: Fluffy\n        status: available\n    user:\n      summary: Example of a user\n      value:\n        id: 1\n        username: john_doe\n        email: john@example.com\n    order:\n      summary: Example of an order\n      value:\n        id: 1\n        petId: 1\n        quantity: 1\n        shipDate: \"2023-01-01T12:00:00Z\"\n        status: placed\n        complete: false\n\n  # Links\n  links:\n    getPetById:\n      operationId: getPetById\n      parameters:\n        petId: $response.body#/id\n      description: The `id` value returned in the response can be used as the `petId` parameter in `GET /pets/{petId}`\n    getUserById:\n      operationId: getUserById\n      parameters:\n        userId: $response.body#/id\n      description: The `id` value returned in the response can be used as the `userId` parameter in `GET /users/{userId}`\n    getOrderById:\n      operationId: getOrderById\n      parameters:\n        orderId: $response.body#/id\n      description: The `id` value returned in the response can be used as the `orderId` parameter in `GET /orders/{orderId}`\n\n  # Callbacks\n  callbacks:\n    petStatusChanged:\n      '{$request.body#/status}':\n        post:\n          summary: Pet status changed callback\n          description: Callback for when a pet's status changes\n          operationId: petStatusChangedCallback\n          requestBody:\n            description: Pet status change information\n            required: true\n            content:\n              application/json:\n                schema:\n                  type: object\n                  properties:\n                    petId:\n                      type: integer\n                      format: int64\n                    oldStatus:\n                      type: string\n                    newStatus:\n                      type: string\n                  required:\n                    - petId\n                    - oldStatus\n                    - newStatus\n          responses:\n            '200':\n              description: Callback processed successfully\n            '400':\n              description: Bad request\n              content:\n                application/json:\n                  schema:\n                    $ref: \"./schemas/common-schemas.yaml#/Error\"\n    orderStatusChanged:\n      '{$request.body#/status}':\n        post:\n          summary: Order status changed callback\n          description: Callback for when an order's status changes\n          operationId: orderStatusChangedCallback\n          requestBody:\n            description: Order status change information\n            required: true\n            content:\n              application/json:\n                schema:\n                  type: object\n                  properties:\n                    orderId:\n                      type: integer\n                      format: int64\n                    oldStatus:\n                      type: string\n                    newStatus:\n                      type: string\n                  required:\n                    - orderId\n                    - oldStatus\n                    - newStatus\n          responses:\n            '200':\n              description: Callback processed successfully\n            '400':\n              description: Bad request\n              content:\n                application/json:\n                  schema:\n                    $ref: \"./schemas/common-schemas.yaml#/Error\"\n\n# Extensions\nx-api-version: 1.0.0\nx-generated-at: \"2023-01-01T12:00:00Z\"\nx-generated-by: \"OpenAPI Generator\"\nx-logo:\n  url: \"https://example.com/logo.png\"\n  backgroundColor: \"#FFFFFF\"\n  altText: \"Example API Logo\"\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/comprehensiveOAS31/paths/order-paths.yaml",
    "content": "# Order Paths for OpenAPI 3.1\n# This file contains order-related paths referenced by the root file\n\n# Path for /orders\n/orders:\n  get:\n    summary: List all orders\n    description: Returns all orders from the system that the user has access to\n    operationId: listOrders\n    tags:\n      - orders\n    parameters:\n      - name: limit\n        in: query\n        description: Maximum number of orders to return\n        required: false\n        schema:\n          type: integer\n          format: int32\n          minimum: 1\n          maximum: 100\n          default: 20\n      - name: offset\n        in: query\n        description: Offset for pagination\n        required: false\n        schema:\n          type: integer\n          format: int32\n          minimum: 0\n          default: 0\n      - name: status\n        in: query\n        description: Status values that need to be considered for filter\n        required: false\n        schema:\n          type: string\n          enum: [placed, approved, delivered, cancelled]\n      - name: userId\n        in: query\n        description: User ID to filter by\n        required: false\n        schema:\n          type: integer\n          format: int64\n          minimum: 1\n      - name: sort\n        in: query\n        description: Sort order\n        required: false\n        schema:\n          type: string\n          enum: [id, status, createdAt]\n          default: createdAt\n    responses:\n      '200':\n        description: A paged array of orders\n        headers:\n          x-next:\n            description: A link to the next page of responses\n            schema:\n              type: string\n              format: uri\n          x-total-count:\n            description: Total number of orders\n            schema:\n              type: integer\n              format: int32\n              minimum: 0\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/order-schemas.yaml#/OrderArray\"\n            examples:\n              orders:\n                summary: Example of orders\n                value:\n                  - id: 1\n                    petId: 1\n                    quantity: 1\n                    shipDate: \"2023-01-01T12:00:00Z\"\n                    status: placed\n                    complete: false\n                  - id: 2\n                    petId: 2\n                    quantity: 2\n                    shipDate: \"2023-01-02T12:00:00Z\"\n                    status: approved\n                    complete: false\n      '400':\n        description: Bad request\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '401':\n        description: Unauthorized\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '403':\n        description: Forbidden\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - order_auth:\n          - read:orders\n  post:\n    summary: Create an order\n    description: Creates a new order in the store\n    operationId: createOrder\n    tags:\n      - orders\n    requestBody:\n      description: Order to add to the store\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: \"../schemas/order-schemas.yaml#/Order\"\n          examples:\n            order:\n              summary: Example of an order\n              value:\n                id: 0\n                petId: 1\n                quantity: 1\n                shipDate: \"2023-01-01T12:00:00Z\"\n                status: placed\n                complete: false\n    responses:\n      '201':\n        description: Order created\n        headers:\n          Location:\n            description: URL of the newly created order\n            schema:\n              type: string\n              format: uri\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/order-schemas.yaml#/Order\"\n      '400':\n        description: Bad request\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '401':\n        description: Unauthorized\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '403':\n        description: Forbidden\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - order_auth:\n          - write:orders\n\n# Path for /orders/{orderId}\n/orders/{orderId}:\n  parameters:\n    - name: orderId\n      in: path\n      description: ID of order to return\n      required: true\n      schema:\n        type: integer\n        format: int64\n        minimum: 1\n  get:\n    summary: Find order by ID\n    description: Returns a single order\n    operationId: getOrderById\n    tags:\n      - orders\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/order-schemas.yaml#/Order\"\n            examples:\n              order:\n                summary: Example of an order\n                value:\n                  id: 1\n                  petId: 1\n                  quantity: 1\n                  shipDate: \"2023-01-01T12:00:00Z\"\n                  status: placed\n                  complete: false\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: Order not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - order_auth:\n          - read:orders\n      - api_key: []\n  put:\n    summary: Update an existing order\n    description: Updates an order in the store\n    operationId: updateOrder\n    tags:\n      - orders\n    requestBody:\n      description: Order to update\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: \"../schemas/order-schemas.yaml#/Order\"\n          examples:\n            order:\n              summary: Example of an order\n              value:\n                id: 1\n                petId: 1\n                quantity: 1\n                shipDate: \"2023-01-01T12:00:00Z\"\n                status: approved\n                complete: false\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/order-schemas.yaml#/Order\"\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: Order not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '405':\n        description: Validation exception\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - order_auth:\n          - write:orders\n  delete:\n    summary: Deletes an order\n    description: Deletes an order from the store\n    operationId: deleteOrder\n    tags:\n      - orders\n    responses:\n      '204':\n        description: Order deleted\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: Order not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - order_auth:\n          - write:orders\n\n# Path for /orders/{orderId}/status\n/orders/{orderId}/status:\n  parameters:\n    - name: orderId\n      in: path\n      description: ID of order to update status\n      required: true\n      schema:\n        type: integer\n        format: int64\n        minimum: 1\n  get:\n    summary: Get order status\n    description: Returns the status of an order\n    operationId: getOrderStatus\n    tags:\n      - orders\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/order-schemas.yaml#/OrderStatus\"\n            examples:\n              status:\n                summary: Example of order status\n                value:\n                  id: 1\n                  status: placed\n                  timestamp: \"2023-01-01T12:00:00Z\"\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: Order not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - order_auth:\n          - read:orders\n  put:\n    summary: Update order status\n    description: Updates the status of an order\n    operationId: updateOrderStatus\n    tags:\n      - orders\n    requestBody:\n      description: Status to update\n      required: true\n      content:\n        application/json:\n          schema:\n            type: object\n            required:\n              - status\n            properties:\n              status:\n                type: string\n                description: Order status\n                enum: [placed, approved, delivered, cancelled]\n              notes:\n                type: string\n                description: Status notes\n                maxLength: 500\n          examples:\n            status:\n              summary: Example of status update\n              value:\n                status: approved\n                notes: \"Approved by manager\"\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/order-schemas.yaml#/OrderStatus\"\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: Order not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - order_auth:\n          - write:orders\n\n# Path for /orders/{orderId}/invoice\n/orders/{orderId}/invoice:\n  parameters:\n    - name: orderId\n      in: path\n      description: ID of order to get invoice for\n      required: true\n      schema:\n        type: integer\n        format: int64\n        minimum: 1\n  get:\n    summary: Get order invoice\n    description: Returns the invoice for an order\n    operationId: getOrderInvoice\n    tags:\n      - orders\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/order-schemas.yaml#/Invoice\"\n            examples:\n              invoice:\n                summary: Example of an invoice\n                value:\n                  id: 1\n                  orderId: 1\n                  amount: 100.0\n                  tax: 10.0\n                  shipping: 5.0\n                  total: 115.0\n                  status: pending\n                  createdAt: \"2023-01-01T12:00:00Z\"\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: Order not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - order_auth:\n          - read:orders\n  post:\n    summary: Create order invoice\n    description: Creates an invoice for an order\n    operationId: createOrderInvoice\n    tags:\n      - orders\n    requestBody:\n      description: Invoice to create\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: \"../schemas/order-schemas.yaml#/Invoice\"\n          examples:\n            invoice:\n              summary: Example of an invoice\n              value:\n                id: 0\n                orderId: 1\n                amount: 100.0\n                tax: 10.0\n                shipping: 5.0\n                total: 115.0\n                status: pending\n    responses:\n      '201':\n        description: Invoice created\n        headers:\n          Location:\n            description: URL of the newly created invoice\n            schema:\n              type: string\n              format: uri\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/order-schemas.yaml#/Invoice\"\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: Order not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - order_auth:\n          - write:orders\n\n# Path for /orders/{orderId}/shipment\n/orders/{orderId}/shipment:\n  parameters:\n    - name: orderId\n      in: path\n      description: ID of order to get shipment for\n      required: true\n      schema:\n        type: integer\n        format: int64\n        minimum: 1\n  get:\n    summary: Get order shipment\n    description: Returns the shipment for an order\n    operationId: getOrderShipment\n    tags:\n      - orders\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/order-schemas.yaml#/Shipment\"\n            examples:\n              shipment:\n                summary: Example of a shipment\n                value:\n                  id: 1\n                  orderId: 1\n                  status: shipped\n                  trackingNumber: \"1Z999AA10123456784\"\n                  carrier: ups\n                  estimatedDelivery: \"2023-01-05\"\n                  createdAt: \"2023-01-01T12:00:00Z\"\n                  shippedAt: \"2023-01-02T12:00:00Z\"\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: Order not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - order_auth:\n          - read:orders\n  post:\n    summary: Create order shipment\n    description: Creates a shipment for an order\n    operationId: createOrderShipment\n    tags:\n      - orders\n    requestBody:\n      description: Shipment to create\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: \"../schemas/order-schemas.yaml#/Shipment\"\n          examples:\n            shipment:\n              summary: Example of a shipment\n              value:\n                id: 0\n                orderId: 1\n                status: pending\n                carrier: ups\n                estimatedDelivery: \"2023-01-05\"\n    responses:\n      '201':\n        description: Shipment created\n        headers:\n          Location:\n            description: URL of the newly created shipment\n            schema:\n              type: string\n              format: uri\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/order-schemas.yaml#/Shipment\"\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: Order not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - order_auth:\n          - write:orders"
  },
  {
    "path": "modules/swagger-core/src/test/resources/comprehensiveOAS31/paths/pet-paths.yaml",
    "content": "# Pet Paths for OpenAPI 3.1\n# This file contains pet-related paths referenced by the root file\n\n# Path for /pets\n/pets:\n  get:\n    summary: List all pets\n    description: Returns all pets from the system that the user has access to\n    operationId: listPets\n    tags:\n      - pets\n    parameters:\n      - name: limit\n        in: query\n        description: Maximum number of pets to return\n        required: false\n        schema:\n          type: integer\n          format: int32\n          minimum: 1\n          maximum: 100\n          default: 20\n      - name: offset\n        in: query\n        description: Offset for pagination\n        required: false\n        schema:\n          type: integer\n          format: int32\n          minimum: 0\n          default: 0\n      - name: status\n        in: query\n        description: Status values that need to be considered for filter\n        required: false\n        schema:\n          type: string\n          enum: [available, pending, sold]\n      - name: tags\n        in: query\n        description: Tags to filter by\n        required: false\n        schema:\n          type: array\n          items:\n            type: string\n          minItems: 1\n          maxItems: 10\n          uniqueItems: true\n      - name: sort\n        in: query\n        description: Sort order\n        required: false\n        schema:\n          type: string\n          enum: [name, id, status]\n          default: name\n    responses:\n      '200':\n        description: A paged array of pets\n        headers:\n          x-next:\n            description: A link to the next page of responses\n            schema:\n              type: string\n              format: uri\n          x-total-count:\n            description: Total number of pets\n            schema:\n              type: integer\n              format: int32\n              minimum: 0\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/pet-schemas.yaml#/Pets\"\n            examples:\n              pets:\n                summary: Example of pets\n                value:\n                  - id: 1\n                    name: Fluffy\n                    status: available\n                  - id: 2\n                    name: Rex\n                    status: pending\n      '400':\n        description: Bad request\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '401':\n        description: Unauthorized\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '403':\n        description: Forbidden\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - petstore_auth:\n          - read:pets\n  post:\n    summary: Create a pet\n    description: Creates a new pet in the store\n    operationId: createPet\n    tags:\n      - pets\n    requestBody:\n      description: Pet to add to the store\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: \"../schemas/pet-schemas.yaml#/Pet\"\n          examples:\n            pet:\n              summary: Example of a pet\n              value:\n                id: 0\n                name: Fluffy\n                status: available\n    responses:\n      '201':\n        description: Pet created\n        headers:\n          Location:\n            description: URL of the newly created pet\n            schema:\n              type: string\n              format: uri\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/pet-schemas.yaml#/Pet\"\n      '400':\n        description: Bad request\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '401':\n        description: Unauthorized\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '403':\n        description: Forbidden\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - petstore_auth:\n          - write:pets\n\n# Path for /pets/{petId}\n/pets/{petId}:\n  parameters:\n    - name: petId\n      in: path\n      description: ID of pet to return\n      required: true\n      schema:\n        type: integer\n        format: int64\n        minimum: 1\n  get:\n    summary: Find pet by ID\n    description: Returns a single pet\n    operationId: getPetById\n    tags:\n      - pets\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/pet-schemas.yaml#/Pet\"\n            examples:\n              pet:\n                summary: Example of a pet\n                value:\n                  id: 1\n                  name: Fluffy\n                  status: available\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: Pet not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - petstore_auth:\n          - read:pets\n      - api_key: []\n  put:\n    summary: Update an existing pet\n    description: Updates a pet in the store with form data\n    operationId: updatePet\n    tags:\n      - pets\n    requestBody:\n      description: Pet to update\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: \"../schemas/pet-schemas.yaml#/Pet\"\n          examples:\n            pet:\n              summary: Example of a pet\n              value:\n                id: 1\n                name: Fluffy\n                status: available\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/pet-schemas.yaml#/Pet\"\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: Pet not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '405':\n        description: Validation exception\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - petstore_auth:\n          - write:pets\n  delete:\n    summary: Deletes a pet\n    description: Deletes a pet from the store\n    operationId: deletePet\n    tags:\n      - pets\n    responses:\n      '204':\n        description: Pet deleted\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: Pet not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - petstore_auth:\n          - write:pets\n\n# Path for /pets/findByStatus\n/pets/findByStatus:\n  get:\n    summary: Finds pets by status\n    description: Multiple status values can be provided with comma separated strings\n    operationId: findPetsByStatus\n    tags:\n      - pets\n    parameters:\n      - name: status\n        in: query\n        description: Status values that need to be considered for filter\n        required: true\n        schema:\n          type: array\n          items:\n            type: string\n            enum: [available, pending, sold]\n          minItems: 1\n          maxItems: 3\n          uniqueItems: true\n        style: form\n        explode: false\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/pet-schemas.yaml#/Pets\"\n      '400':\n        description: Invalid status value\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - petstore_auth:\n          - read:pets\n\n# Path for /pets/findByTags\n/pets/findByTags:\n  get:\n    summary: Finds pets by tags\n    description: Multiple tags can be provided with comma separated strings\n    operationId: findPetsByTags\n    tags:\n      - pets\n    parameters:\n      - name: tags\n        in: query\n        description: Tags to filter by\n        required: true\n        schema:\n          type: array\n          items:\n            type: string\n          minItems: 1\n          maxItems: 10\n          uniqueItems: true\n        style: form\n        explode: false\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/pet-schemas.yaml#/Pets\"\n      '400':\n        description: Invalid tag value\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - petstore_auth:\n          - read:pets\n    deprecated: true\n\n# Path for /pets/{petId}/uploadImage\n/pets/{petId}/uploadImage:\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        minimum: 1\n  post:\n    summary: Uploads an image for a pet\n    description: Uploads an image for a pet\n    operationId: uploadPetImage\n    tags:\n      - pets\n    requestBody:\n      content:\n        multipart/form-data:\n          schema:\n            type: object\n            properties:\n              additionalMetadata:\n                type: string\n                description: Additional data to pass to server\n              file:\n                type: string\n                format: binary\n                description: File to upload\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                code:\n                  type: integer\n                  format: int32\n                type:\n                  type: string\n                message:\n                  type: string\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: Pet not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - petstore_auth:\n          - write:pets"
  },
  {
    "path": "modules/swagger-core/src/test/resources/comprehensiveOAS31/paths/user-paths.yaml",
    "content": "# User Paths for OpenAPI 3.1\n# This file contains user-related paths referenced by the root file\n\n# Path for /users\n/users:\n  get:\n    summary: List all users\n    description: Returns all users from the system that the requester has access to\n    operationId: listUsers\n    tags:\n      - users\n    parameters:\n      - name: limit\n        in: query\n        description: Maximum number of users to return\n        required: false\n        schema:\n          type: integer\n          format: int32\n          minimum: 1\n          maximum: 100\n          default: 20\n      - name: offset\n        in: query\n        description: Offset for pagination\n        required: false\n        schema:\n          type: integer\n          format: int32\n          minimum: 0\n          default: 0\n      - name: status\n        in: query\n        description: Status values that need to be considered for filter\n        required: false\n        schema:\n          type: integer\n          format: int32\n          enum: [0, 1, 2]\n      - name: sort\n        in: query\n        description: Sort order\n        required: false\n        schema:\n          type: string\n          enum: [username, id, status]\n          default: username\n    responses:\n      '200':\n        description: A paged array of users\n        headers:\n          x-next:\n            description: A link to the next page of responses\n            schema:\n              type: string\n              format: uri\n          x-total-count:\n            description: Total number of users\n            schema:\n              type: integer\n              format: int32\n              minimum: 0\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/user-schemas.yaml#/UserArray\"\n            examples:\n              users:\n                summary: Example of users\n                value:\n                  - id: 1\n                    username: john_doe\n                    email: john@example.com\n                  - id: 2\n                    username: jane_doe\n                    email: jane@example.com\n      '400':\n        description: Bad request\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '401':\n        description: Unauthorized\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '403':\n        description: Forbidden\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - user_auth:\n          - read:users\n  post:\n    summary: Create a user\n    description: Creates a new user in the system\n    operationId: createUser\n    tags:\n      - users\n    requestBody:\n      description: User to add to the system\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: \"../schemas/user-schemas.yaml#/User\"\n          examples:\n            user:\n              summary: Example of a user\n              value:\n                id: 0\n                username: john_doe\n                firstName: John\n                lastName: Doe\n                email: john@example.com\n                password: password123\n                phone: \"+1234567890\"\n                userStatus: 0\n    responses:\n      '201':\n        description: User created\n        headers:\n          Location:\n            description: URL of the newly created user\n            schema:\n              type: string\n              format: uri\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/user-schemas.yaml#/User\"\n      '400':\n        description: Bad request\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '401':\n        description: Unauthorized\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '403':\n        description: Forbidden\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - user_auth:\n          - write:users\n\n# Path for /users/{userId}\n/users/{userId}:\n  parameters:\n    - name: userId\n      in: path\n      description: ID of user to return\n      required: true\n      schema:\n        type: integer\n        format: int64\n        minimum: 1\n  get:\n    summary: Find user by ID\n    description: Returns a single user\n    operationId: getUserById\n    tags:\n      - users\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/user-schemas.yaml#/User\"\n            examples:\n              user:\n                summary: Example of a user\n                value:\n                  id: 1\n                  username: john_doe\n                  firstName: John\n                  lastName: Doe\n                  email: john@example.com\n                  phone: \"+1234567890\"\n                  userStatus: 0\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: User not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - user_auth:\n          - read:users\n      - api_key: []\n  put:\n    summary: Update an existing user\n    description: Updates a user in the system\n    operationId: updateUser\n    tags:\n      - users\n    requestBody:\n      description: User to update\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: \"../schemas/user-schemas.yaml#/User\"\n          examples:\n            user:\n              summary: Example of a user\n              value:\n                id: 1\n                username: john_doe\n                firstName: John\n                lastName: Doe\n                email: john@example.com\n                phone: \"+1234567890\"\n                userStatus: 0\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/user-schemas.yaml#/User\"\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: User not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '405':\n        description: Validation exception\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - user_auth:\n          - write:users\n  delete:\n    summary: Deletes a user\n    description: Deletes a user from the system\n    operationId: deleteUser\n    tags:\n      - users\n    responses:\n      '204':\n        description: User deleted\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: User not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - user_auth:\n          - write:users\n\n# Path for /users/login\n/users/login:\n  post:\n    summary: User login\n    description: Logs user into the system\n    operationId: loginUser\n    tags:\n      - users\n    requestBody:\n      description: User credentials\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: \"../schemas/user-schemas.yaml#/UserCredentials\"\n          examples:\n            credentials:\n              summary: Example of user credentials\n              value:\n                username: john_doe\n                password: password123\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: object\n              properties:\n                token:\n                  type: string\n                  description: Authentication token\n                expiresAt:\n                  type: string\n                  format: date-time\n                  description: Token expiration time\n      '400':\n        description: Invalid username/password supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n\n# Path for /users/logout\n/users/logout:\n  post:\n    summary: User logout\n    description: Logs out current logged in user session\n    operationId: logoutUser\n    tags:\n      - users\n    responses:\n      '200':\n        description: Successful operation\n      '401':\n        description: Unauthorized\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - user_auth: []\n\n# Path for /users/{userId}/preferences\n/users/{userId}/preferences:\n  parameters:\n    - name: userId\n      in: path\n      description: ID of user to return preferences for\n      required: true\n      schema:\n        type: integer\n        format: int64\n        minimum: 1\n  get:\n    summary: Get user preferences\n    description: Returns user preferences\n    operationId: getUserPreferences\n    tags:\n      - users\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/user-schemas.yaml#/UserPreferences\"\n            examples:\n              preferences:\n                summary: Example of user preferences\n                value:\n                  theme: dark\n                  language: en\n                  notifications:\n                    email: true\n                    push: true\n                    sms: false\n                  timezone: UTC\n                  currency: USD\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: User not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - user_auth:\n          - read:users\n  put:\n    summary: Update user preferences\n    description: Updates user preferences\n    operationId: updateUserPreferences\n    tags:\n      - users\n    requestBody:\n      description: User preferences to update\n      required: true\n      content:\n        application/json:\n          schema:\n            $ref: \"../schemas/user-schemas.yaml#/UserPreferences\"\n          examples:\n            preferences:\n              summary: Example of user preferences\n              value:\n                theme: dark\n                language: en\n                notifications:\n                  email: true\n                  push: true\n                  sms: false\n                timezone: UTC\n                currency: USD\n    responses:\n      '200':\n        description: Successful operation\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/user-schemas.yaml#/UserPreferences\"\n      '400':\n        description: Invalid ID supplied\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '404':\n        description: User not found\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n      '500':\n        description: Internal server error\n        content:\n          application/json:\n            schema:\n              $ref: \"../schemas/common-schemas.yaml#/Error\"\n    security:\n      - user_auth:\n          - write:users"
  },
  {
    "path": "modules/swagger-core/src/test/resources/comprehensiveOAS31/schemas/common-schemas.yaml",
    "content": "# Common Schemas for OpenAPI 3.1 and JSON Schema 2020/12\n# This file contains common schemas referenced by the root file\n\n# Basic schema with JSON Schema 2020/12 keywords\nError:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Error\"\n  $anchor: \"Error\"\n  title: \"Error\"\n  description: \"Error response\"\n  type: \"object\"\n  required:\n    - \"code\"\n    - \"message\"\n  properties:\n    code:\n      type: \"integer\"\n      format: \"int32\"\n      description: \"Error code\"\n      minimum: 100\n      maximum: 600\n    message:\n      type: \"string\"\n      description: \"Error message\"\n      minLength: 1\n    details:\n      type: \"array\"\n      description: \"Error details\"\n      items:\n        type: \"string\"\n      minItems: 0\n      maxItems: 10\n      uniqueItems: true\n\n# Schema with $dynamicAnchor and $dynamicRef\nIdentifiable:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Identifiable\"\n  $dynamicAnchor: \"Identifiable\"\n  title: \"Identifiable\"\n  description: \"Base schema for objects with an ID\"\n  type: \"object\"\n  required:\n    - \"id\"\n  properties:\n    id:\n      type: \"string\"\n      format: \"uuid\"\n      description: \"Unique identifier\"\n\n# Schema with $vocabulary\nExtendedSchema:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/ExtendedSchema\"\n  $vocabulary:\n    \"https://json-schema.org/draft/2020-12/vocab/core\": true\n    \"https://json-schema.org/draft/2020-12/vocab/applicator\": true\n    \"https://json-schema.org/draft/2020-12/vocab/validation\": true\n    \"https://json-schema.org/draft/2020-12/vocab/meta-data\": true\n    \"https://json-schema.org/draft/2020-12/vocab/format-annotation\": true\n    \"https://json-schema.org/draft/2020-12/vocab/content\": true\n    \"https://json-schema.org/draft/2020-12/vocab/unevaluated\": true\n  title: \"Extended Schema\"\n  description: \"Schema with vocabulary\"\n  type: \"object\"\n  properties:\n    name:\n      type: \"string\"\n    value:\n      type: \"string\"\n\n# Schema with $comment\nCommentedSchema:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/CommentedSchema\"\n  $comment: \"This is a schema with comments\"\n  title: \"Commented Schema\"\n  description: \"Schema with comments\"\n  type: \"object\"\n  properties:\n    name:\n      $comment: \"The name property\"\n      type: \"string\"\n    value:\n      $comment: \"The value property\"\n      type: \"string\"\n\n# Schema with $defs\nSchemaWithDefs:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/SchemaWithDefs\"\n  title: \"Schema with Definitions\"\n  description: \"Schema with $defs\"\n  type: \"object\"\n  properties:\n    person:\n      $ref: \"#/$defs/Person\"\n    address:\n      $ref: \"#/$defs/Address\"\n  $defs:\n    Person:\n      type: \"object\"\n      properties:\n        firstName:\n          type: \"string\"\n        lastName:\n          type: \"string\"\n        age:\n          type: \"integer\"\n          minimum: 0\n    Address:\n      type: \"object\"\n      properties:\n        street:\n          type: \"string\"\n        city:\n          type: \"string\"\n        zipCode:\n          type: \"string\"\n          pattern: \"^[0-9]{5}(?:-[0-9]{4})?$\"\n\n# Schema with validation keywords\nValidationSchema:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/ValidationSchema\"\n  title: \"Validation Schema\"\n  description: \"Schema with validation keywords\"\n  type: \"object\"\n  required:\n    - \"name\"\n    - \"email\"\n  properties:\n    name:\n      type: \"string\"\n      minLength: 1\n      maxLength: 100\n    email:\n      type: \"string\"\n      format: \"email\"\n      pattern: \"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\\\.[a-zA-Z]{2,}$\"\n    age:\n      type: \"integer\"\n      minimum: 0\n      maximum: 120\n      exclusiveMaximum: 121\n    score:\n      type: \"number\"\n      multipleOf: 0.5\n      minimum: 0\n      maximum: 10\n    tags:\n      type: \"array\"\n      items:\n        type: \"string\"\n      minItems: 0\n      maxItems: 10\n      uniqueItems: true\n    metadata:\n      type: \"object\"\n      minProperties: 0\n      maxProperties: 10\n      propertyNames:\n        pattern: \"^[a-zA-Z0-9_]+$\"\n    status:\n      enum: [\"active\", \"inactive\", \"pending\"]\n    role:\n      const: \"user\"\n\n# Schema with applicator keywords\nApplicatorSchema:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/ApplicatorSchema\"\n  title: \"Applicator Schema\"\n  description: \"Schema with applicator keywords\"\n  allOf:\n    - type: \"object\"\n      properties:\n        id:\n          type: \"string\"\n          format: \"uuid\"\n    - required:\n      - \"name\"\n  anyOf:\n    - properties:\n        type:\n          const: \"personal\"\n    - properties:\n        type:\n          const: \"business\"\n  oneOf:\n    - properties:\n        status:\n          const: \"active\"\n    - properties:\n        status:\n          const: \"inactive\"\n  not:\n    properties:\n      status:\n        const: \"deleted\"\n  if:\n    properties:\n      type:\n        const: \"personal\"\n  then:\n    properties:\n      personalId:\n        type: \"string\"\n    required:\n      - \"personalId\"\n  else:\n    properties:\n      businessId:\n        type: \"string\"\n    required:\n      - \"businessId\"\n  dependentSchemas:\n    creditCard:\n      properties:\n        creditCardNumber:\n          type: \"string\"\n          pattern: \"^[0-9]{16}$\"\n      required:\n        - \"creditCardNumber\"\n  properties:\n    name:\n      type: \"string\"\n    type:\n      type: \"string\"\n    status:\n      type: \"string\"\n    items:\n      type: \"array\"\n      prefixItems:\n        - type: \"string\"\n        - type: \"number\"\n      items: false\n    contains:\n      type: \"array\"\n      contains:\n        type: \"string\"\n        const: \"special\"\n      minContains: 1\n      maxContains: 3\n  patternProperties:\n    \"^x-\":\n      type: \"string\"\n  additionalProperties: false\n  unevaluatedProperties: false"
  },
  {
    "path": "modules/swagger-core/src/test/resources/comprehensiveOAS31/schemas/json-schema.yaml",
    "content": "# JSON Schema 2020/12 Example\n# This file demonstrates a comprehensive JSON Schema 2020/12 document\n# It includes all keywords defined in the JSON Schema 2020/12 specification\n\n$schema: https://json-schema.org/draft/2020-12/schema\n$id: https://example.com/schemas/json-schema\n$vocabulary:\n  https://json-schema.org/draft/2020-12/vocab/core: true\n  https://json-schema.org/draft/2020-12/vocab/applicator: true\n  https://json-schema.org/draft/2020-12/vocab/validation: true\n  https://json-schema.org/draft/2020-12/vocab/meta-data: true\n  https://json-schema.org/draft/2020-12/vocab/format-annotation: true\n  https://json-schema.org/draft/2020-12/vocab/content: true\n  https://json-schema.org/draft/2020-12/vocab/unevaluated: true\n$comment: This is a comprehensive JSON Schema 2020/12 document\n\n# Root schema\ntitle: Comprehensive JSON Schema\ndescription: A comprehensive JSON Schema 2020/12 document\ntype: object\nproperties:\n  id:\n    $anchor: id\n    title: ID\n    description: Unique identifier\n    type: string\n    format: uuid\n  name:\n    $anchor: name\n    title: Name\n    description: Name of the entity\n    type: string\n    minLength: 1\n    maxLength: 100\n  description:\n    $anchor: description\n    title: Description\n    description: Description of the entity\n    type: string\n    maxLength: 1000\n  createdAt:\n    $anchor: createdAt\n    title: Created At\n    description: Creation date\n    type: string\n    format: date-time\n  updatedAt:\n    $anchor: updatedAt\n    title: Updated At\n    description: Last update date\n    type: string\n    format: date-time\n  tags:\n    $anchor: tags\n    title: Tags\n    description: Tags for the entity\n    type: array\n    items:\n      type: string\n      minLength: 1\n      maxLength: 50\n    minItems: 0\n    maxItems: 10\n    uniqueItems: true\n  metadata:\n    $anchor: metadata\n    title: Metadata\n    description: Additional metadata\n    type: object\n    additionalProperties:\n      type: string\n    propertyNames:\n      pattern: \"^[a-zA-Z0-9_]+$\"\n    minProperties: 0\n    maxProperties: 10\n  status:\n    $anchor: status\n    title: Status\n    description: Status of the entity\n    type: string\n    enum: [\"active\", \"inactive\", \"pending\", \"deleted\"]\n  priority:\n    $anchor: priority\n    title: Priority\n    description: Priority of the entity\n    type: integer\n    minimum: 1\n    maximum: 5\n    default: 3\n  score:\n    $anchor: score\n    title: Score\n    description: Score of the entity\n    type: number\n    minimum: 0\n    maximum: 100\n    multipleOf: 0.1\n  isPublic:\n    $anchor: isPublic\n    title: Is Public\n    description: Whether the entity is public\n    type: boolean\n    default: false\n  nullableField:\n    $anchor: nullableField\n    title: Nullable Field\n    description: A field that can be null\n    type: [\"string\", \"null\"]\n  constField:\n    $anchor: constField\n    title: Const Field\n    description: A field with a constant value\n    const: \"constant\"\n  contentField:\n    $anchor: contentField\n    title: Content Field\n    description: A field with content encoding and media type\n    type: string\n    contentEncoding: base64\n    contentMediaType: image/png\n  dependentField1:\n    $anchor: dependentField1\n    title: Dependent Field 1\n    description: A field that depends on another field\n    type: string\n  dependentField2:\n    $anchor: dependentField2\n    title: Dependent Field 2\n    description: A field that depends on another field\n    type: string\n  conditionalField:\n    $anchor: conditionalField\n    title: Conditional Field\n    description: A field that is conditional\n    type: string\n  refField:\n    $anchor: refField\n    title: Ref Field\n    description: A field that references another schema\n    $ref: \"#/$defs/RefSchema\"\n  dynamicRefField:\n    $anchor: dynamicRefField\n    title: Dynamic Ref Field\n    description: A field that uses dynamic reference\n    $dynamicRef: \"#Entity\"\n  recursiveField:\n    $anchor: recursiveField\n    title: Recursive Field\n    description: A field that references itself\n    $ref: \"#\"\n  prefixItems:\n    $anchor: prefixItems\n    title: Prefix Items\n    description: An array with prefix items\n    type: array\n    prefixItems:\n      - type: string\n      - type: number\n      - type: boolean\n    items: false\n  containsField:\n    $anchor: containsField\n    title: Contains Field\n    description: An array that contains a specific item\n    type: array\n    contains:\n      type: string\n      const: \"special\"\n    minContains: 1\n    maxContains: 3\n  patternProperties:\n    $anchor: patternProperties\n    title: Pattern Properties\n    description: An object with pattern properties\n    type: object\n    patternProperties:\n      \"^x-\": \n        type: string\n      \"^y-\":\n        type: number\n    additionalProperties: false\n  unevaluatedProperties:\n    $anchor: unevaluatedProperties\n    title: Unevaluated Properties\n    description: An object with unevaluated properties\n    type: object\n    properties:\n      prop1:\n        type: string\n    unevaluatedProperties: false\n  unevaluatedItems:\n    $anchor: unevaluatedItems\n    title: Unevaluated Items\n    description: An array with unevaluated items\n    type: array\n    prefixItems:\n      - type: string\n    unevaluatedItems: false\nrequired:\n  - id\n  - name\n  - createdAt\ndependentRequired:\n  dependentField1: [\"dependentField2\"]\ndependentSchemas:\n  isPublic:\n    properties:\n      publicationDate:\n        type: string\n        format: date\n    required:\n      - publicationDate\n\n# Conditional validation\nif:\n  properties:\n    status:\n      const: \"active\"\n  required:\n    - status\nthen:\n  properties:\n    activatedAt:\n      type: string\n      format: date-time\n  required:\n    - activatedAt\nelse:\n  properties:\n    deactivatedAt:\n      type: string\n      format: date-time\n\n# Applicator keywords\nallOf:\n  - properties:\n      allOfField:\n        type: string\n    required:\n      - allOfField\nanyOf:\n  - properties:\n      anyOfField1:\n        type: string\n    required:\n      - anyOfField1\n  - properties:\n      anyOfField2:\n        type: string\n    required:\n      - anyOfField2\noneOf:\n  - properties:\n      oneOfField1:\n        type: string\n    required:\n      - oneOfField1\n  - properties:\n      oneOfField2:\n        type: string\n    required:\n      - oneOfField2\nnot:\n  properties:\n    notField:\n      type: string\n  required:\n    - notField\n\n# Definitions\n$defs:\n  RefSchema:\n    $anchor: RefSchema\n    title: Ref Schema\n    description: A schema that is referenced\n    type: object\n    properties:\n      id:\n        type: string\n        format: uuid\n      name:\n        type: string\n        minLength: 1\n        maxLength: 100\n    required:\n      - id\n      - name\n  \n  Entity:\n    $dynamicAnchor: Entity\n    title: Entity\n    description: A base entity schema\n    type: object\n    properties:\n      id:\n        type: string\n        format: uuid\n      name:\n        type: string\n        minLength: 1\n        maxLength: 100\n      createdAt:\n        type: string\n        format: date-time\n      updatedAt:\n        type: string\n        format: date-time\n    required:\n      - id\n      - name\n      - createdAt\n  \n  Person:\n    $anchor: Person\n    title: Person\n    description: A person schema\n    allOf:\n      - $dynamicRef: \"#Entity\"\n      - type: object\n        properties:\n          firstName:\n            type: string\n            minLength: 1\n            maxLength: 50\n          lastName:\n            type: string\n            minLength: 1\n            maxLength: 50\n          email:\n            type: string\n            format: email\n          phone:\n            type: string\n            pattern: \"^\\\\+?[0-9]{10,15}$\"\n        required:\n          - firstName\n          - lastName\n          - email\n  \n  Organization:\n    $anchor: Organization\n    title: Organization\n    description: An organization schema\n    allOf:\n      - $dynamicRef: \"#Entity\"\n      - type: object\n        properties:\n          legalName:\n            type: string\n            minLength: 1\n            maxLength: 100\n          taxId:\n            type: string\n            minLength: 1\n            maxLength: 50\n          website:\n            type: string\n            format: uri\n          employees:\n            type: integer\n            minimum: 1\n        required:\n          - legalName\n  \n  Address:\n    $anchor: Address\n    title: Address\n    description: An address schema\n    type: object\n    properties:\n      street:\n        type: string\n        minLength: 1\n        maxLength: 100\n      city:\n        type: string\n        minLength: 1\n        maxLength: 50\n      state:\n        type: string\n        minLength: 1\n        maxLength: 50\n      zipCode:\n        type: string\n        pattern: \"^[0-9]{5}(?:-[0-9]{4})?$\"\n      country:\n        type: string\n        minLength: 1\n        maxLength: 50\n    required:\n      - street\n      - city\n      - zipCode\n      - country\n  \n  Contact:\n    $anchor: Contact\n    title: Contact\n    description: A contact schema\n    type: object\n    properties:\n      name:\n        type: string\n        minLength: 1\n        maxLength: 100\n      email:\n        type: string\n        format: email\n      phone:\n        type: string\n        pattern: \"^\\\\+?[0-9]{10,15}$\"\n      address:\n        $ref: \"#/$defs/Address\"\n    required:\n      - name\n      - email\n  \n  Event:\n    $anchor: Event\n    title: Event\n    description: An event schema\n    type: object\n    properties:\n      id:\n        type: string\n        format: uuid\n      name:\n        type: string\n        minLength: 1\n        maxLength: 100\n      description:\n        type: string\n        maxLength: 1000\n      startDate:\n        type: string\n        format: date-time\n      endDate:\n        type: string\n        format: date-time\n      location:\n        $ref: \"#/$defs/Address\"\n      organizer:\n        $ref: \"#/$defs/Contact\"\n      attendees:\n        type: array\n        items:\n          $ref: \"#/$defs/Contact\"\n        minItems: 0\n        maxItems: 1000\n        uniqueItems: true\n    required:\n      - id\n      - name\n      - startDate\n      - endDate"
  },
  {
    "path": "modules/swagger-core/src/test/resources/comprehensiveOAS31/schemas/order-schemas.yaml",
    "content": "# Order Schemas for OpenAPI 3.1 and JSON Schema 2020/12\n# This file contains order-related schemas referenced by the root file\n\n# Base Order schema\nOrder:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Order\"\n  $anchor: \"Order\"\n  $dynamicAnchor: \"Order\"\n  title: \"Order\"\n  description: \"Order object\"\n  type: \"object\"\n  required:\n    - \"id\"\n    - \"petId\"\n    - \"quantity\"\n    - \"shipDate\"\n    - \"status\"\n  properties:\n    id:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Order ID\"\n      minimum: 1\n    petId:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Pet ID\"\n      minimum: 1\n    userId:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"User ID\"\n      minimum: 1\n    quantity:\n      type: \"integer\"\n      format: \"int32\"\n      description: \"Order quantity\"\n      minimum: 1\n      maximum: 100\n    shipDate:\n      type: \"string\"\n      format: \"date-time\"\n      description: \"Shipping date\"\n    status:\n      type: \"string\"\n      description: \"Order status\"\n      enum: [\"placed\", \"approved\", \"delivered\", \"cancelled\"]\n    complete:\n      type: \"boolean\"\n      description: \"Whether the order is complete\"\n      default: false\n    createdAt:\n      type: \"string\"\n      format: \"date-time\"\n      description: \"Order creation date\"\n      readOnly: true\n    updatedAt:\n      type: \"string\"\n      format: \"date-time\"\n      description: \"Order last update date\"\n      readOnly: true\n  additionalProperties: false\n  x-extension-example: \"Example of an extension\"\n\n# OrderItem schema\nOrderItem:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/OrderItem\"\n  $anchor: \"OrderItem\"\n  title: \"Order Item\"\n  description: \"Order item object\"\n  type: \"object\"\n  required:\n    - \"id\"\n    - \"petId\"\n    - \"quantity\"\n    - \"price\"\n  properties:\n    id:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Order item ID\"\n      minimum: 1\n    petId:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Pet ID\"\n      minimum: 1\n    quantity:\n      type: \"integer\"\n      format: \"int32\"\n      description: \"Item quantity\"\n      minimum: 1\n      maximum: 100\n    price:\n      type: \"number\"\n      format: \"double\"\n      description: \"Item price\"\n      minimum: 0\n      exclusiveMinimum: true\n    discount:\n      type: \"number\"\n      format: \"double\"\n      description: \"Item discount\"\n      minimum: 0\n      maximum: 100\n      default: 0\n    notes:\n      type: \"string\"\n      description: \"Additional notes\"\n      maxLength: 500\n\n# OrderWithItems schema\nOrderWithItems:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/OrderWithItems\"\n  $anchor: \"OrderWithItems\"\n  title: \"Order with Items\"\n  description: \"Order object with items\"\n  allOf:\n    - $ref: \"#/Order\"\n    - type: \"object\"\n      properties:\n        items:\n          type: \"array\"\n          description: \"Order items\"\n          items:\n            $ref: \"#/OrderItem\"\n          minItems: 1\n          maxItems: 100\n          uniqueItems: true\n      required:\n        - \"items\"\n\n# OrderStatus schema\nOrderStatus:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/OrderStatus\"\n  $anchor: \"OrderStatus\"\n  title: \"Order Status\"\n  description: \"Order status object\"\n  type: \"object\"\n  required:\n    - \"id\"\n    - \"status\"\n  properties:\n    id:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Order ID\"\n      minimum: 1\n    status:\n      type: \"string\"\n      description: \"Order status\"\n      enum: [\"placed\", \"approved\", \"delivered\", \"cancelled\"]\n    timestamp:\n      type: \"string\"\n      format: \"date-time\"\n      description: \"Status update timestamp\"\n      readOnly: true\n    notes:\n      type: \"string\"\n      description: \"Status notes\"\n      maxLength: 500\n\n# OrderArray schema\nOrderArray:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/OrderArray\"\n  $anchor: \"OrderArray\"\n  title: \"Order Array\"\n  description: \"Array of orders\"\n  type: \"array\"\n  items:\n    $ref: \"#/Order\"\n  minItems: 0\n  maxItems: 100\n  uniqueItems: true\n\n# OrderSummary schema\nOrderSummary:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/OrderSummary\"\n  $anchor: \"OrderSummary\"\n  title: \"Order Summary\"\n  description: \"Order summary object\"\n  type: \"object\"\n  required:\n    - \"id\"\n    - \"petId\"\n    - \"status\"\n    - \"createdAt\"\n  properties:\n    id:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Order ID\"\n      minimum: 1\n    petId:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Pet ID\"\n      minimum: 1\n    status:\n      type: \"string\"\n      description: \"Order status\"\n      enum: [\"placed\", \"approved\", \"delivered\", \"cancelled\"]\n    createdAt:\n      type: \"string\"\n      format: \"date-time\"\n      description: \"Order creation date\"\n      readOnly: true\n  additionalProperties: false\n\n# Invoice schema\nInvoice:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Invoice\"\n  $anchor: \"Invoice\"\n  title: \"Invoice\"\n  description: \"Invoice object\"\n  type: \"object\"\n  required:\n    - \"id\"\n    - \"orderId\"\n    - \"amount\"\n    - \"status\"\n    - \"createdAt\"\n  properties:\n    id:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Invoice ID\"\n      minimum: 1\n    orderId:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Order ID\"\n      minimum: 1\n    amount:\n      type: \"number\"\n      format: \"double\"\n      description: \"Invoice amount\"\n      minimum: 0\n      exclusiveMinimum: true\n    tax:\n      type: \"number\"\n      format: \"double\"\n      description: \"Tax amount\"\n      minimum: 0\n      default: 0\n    shipping:\n      type: \"number\"\n      format: \"double\"\n      description: \"Shipping amount\"\n      minimum: 0\n      default: 0\n    total:\n      type: \"number\"\n      format: \"double\"\n      description: \"Total amount\"\n      minimum: 0\n      exclusiveMinimum: true\n    status:\n      type: \"string\"\n      description: \"Invoice status\"\n      enum: [\"pending\", \"paid\", \"cancelled\"]\n    paymentMethod:\n      type: \"string\"\n      description: \"Payment method\"\n      enum: [\"credit_card\", \"debit_card\", \"paypal\", \"bank_transfer\", \"cash\"]\n    createdAt:\n      type: \"string\"\n      format: \"date-time\"\n      description: \"Invoice creation date\"\n      readOnly: true\n    paidAt:\n      type: \"string\"\n      format: \"date-time\"\n      description: \"Invoice payment date\"\n      readOnly: true\n  additionalProperties: false\n\n# Payment schema\nPayment:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Payment\"\n  $anchor: \"Payment\"\n  title: \"Payment\"\n  description: \"Payment object\"\n  type: \"object\"\n  required:\n    - \"id\"\n    - \"invoiceId\"\n    - \"amount\"\n    - \"method\"\n    - \"status\"\n    - \"createdAt\"\n  properties:\n    id:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Payment ID\"\n      minimum: 1\n    invoiceId:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Invoice ID\"\n      minimum: 1\n    amount:\n      type: \"number\"\n      format: \"double\"\n      description: \"Payment amount\"\n      minimum: 0\n      exclusiveMinimum: true\n    method:\n      type: \"string\"\n      description: \"Payment method\"\n      enum: [\"credit_card\", \"debit_card\", \"paypal\", \"bank_transfer\", \"cash\"]\n    status:\n      type: \"string\"\n      description: \"Payment status\"\n      enum: [\"pending\", \"completed\", \"failed\", \"refunded\"]\n    transactionId:\n      type: \"string\"\n      description: \"Payment transaction ID\"\n      minLength: 1\n      maxLength: 100\n    createdAt:\n      type: \"string\"\n      format: \"date-time\"\n      description: \"Payment creation date\"\n      readOnly: true\n    completedAt:\n      type: \"string\"\n      format: \"date-time\"\n      description: \"Payment completion date\"\n      readOnly: true\n  additionalProperties: false\n\n# Shipment schema\nShipment:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Shipment\"\n  $anchor: \"Shipment\"\n  title: \"Shipment\"\n  description: \"Shipment object\"\n  type: \"object\"\n  required:\n    - \"id\"\n    - \"orderId\"\n    - \"status\"\n    - \"createdAt\"\n  properties:\n    id:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Shipment ID\"\n      minimum: 1\n    orderId:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Order ID\"\n      minimum: 1\n    status:\n      type: \"string\"\n      description: \"Shipment status\"\n      enum: [\"pending\", \"shipped\", \"delivered\", \"returned\"]\n    trackingNumber:\n      type: \"string\"\n      description: \"Shipment tracking number\"\n      minLength: 1\n      maxLength: 100\n    carrier:\n      type: \"string\"\n      description: \"Shipping carrier\"\n      enum: [\"ups\", \"fedex\", \"dhl\", \"usps\"]\n    estimatedDelivery:\n      type: \"string\"\n      format: \"date\"\n      description: \"Estimated delivery date\"\n    actualDelivery:\n      type: \"string\"\n      format: \"date\"\n      description: \"Actual delivery date\"\n    createdAt:\n      type: \"string\"\n      format: \"date-time\"\n      description: \"Shipment creation date\"\n      readOnly: true\n    shippedAt:\n      type: \"string\"\n      format: \"date-time\"\n      description: \"Shipment shipping date\"\n      readOnly: true\n    deliveredAt:\n      type: \"string\"\n      format: \"date-time\"\n      description: \"Shipment delivery date\"\n      readOnly: true\n  additionalProperties: false"
  },
  {
    "path": "modules/swagger-core/src/test/resources/comprehensiveOAS31/schemas/pet-schemas.yaml",
    "content": "# Pet Schemas for OpenAPI 3.1 and JSON Schema 2020/12\n# This file contains pet-related schemas referenced by the root file\n\n# Base Pet schema\nPet:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Pet\"\n  $anchor: \"Pet\"\n  $dynamicAnchor: \"Pet\"\n  title: \"Pet\"\n  description: \"Pet object\"\n  type: \"object\"\n  required:\n    - \"id\"\n    - \"name\"\n    - \"status\"\n  properties:\n    id:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Pet ID\"\n      minimum: 1\n    name:\n      type: \"string\"\n      description: \"Pet name\"\n      minLength: 1\n      maxLength: 100\n    category:\n      $ref: \"#/Category\"\n    photoUrls:\n      type: \"array\"\n      description: \"Pet photo URLs\"\n      items:\n        type: \"string\"\n        format: \"uri\"\n      minItems: 0\n      maxItems: 10\n      uniqueItems: true\n    tags:\n      type: \"array\"\n      description: \"Pet tags\"\n      items:\n        $ref: \"#/Tag\"\n      minItems: 0\n      maxItems: 10\n      uniqueItems: true\n    status:\n      type: \"string\"\n      description: \"Pet status in the store\"\n      enum: [\"available\", \"pending\", \"sold\"]\n    metadata:\n      type: \"object\"\n      description: \"Additional metadata\"\n      additionalProperties:\n        type: \"string\"\n      propertyNames:\n        pattern: \"^[a-zA-Z0-9_]+$\"\n      minProperties: 0\n      maxProperties: 10\n  discriminator:\n    propertyName: \"petType\"\n    mapping:\n      \"dog\": \"#/Dog\"\n      \"cat\": \"#/Cat\"\n      \"bird\": \"#/Bird\"\n  x-extension-example: \"Example of an extension\"\n\n# Category schema\nCategory:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Category\"\n  $anchor: \"Category\"\n  title: \"Category\"\n  description: \"Pet category\"\n  type: \"object\"\n  required:\n    - \"id\"\n    - \"name\"\n  properties:\n    id:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Category ID\"\n      minimum: 1\n    name:\n      type: \"string\"\n      description: \"Category name\"\n      minLength: 1\n      maxLength: 50\n\n# Tag schema\nTag:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Tag\"\n  $anchor: \"Tag\"\n  title: \"Tag\"\n  description: \"Pet tag\"\n  type: \"object\"\n  required:\n    - \"id\"\n    - \"name\"\n  properties:\n    id:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"Tag ID\"\n      minimum: 1\n    name:\n      type: \"string\"\n      description: \"Tag name\"\n      minLength: 1\n      maxLength: 50\n\n# Dog schema\nDog:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Dog\"\n  $anchor: \"Dog\"\n  title: \"Dog\"\n  description: \"Dog object\"\n  allOf:\n    - $ref: \"#/Pet\"\n    - type: \"object\"\n      required:\n        - \"petType\"\n        - \"breed\"\n      properties:\n        petType:\n          type: \"string\"\n          const: \"dog\"\n        breed:\n          type: \"string\"\n          description: \"Dog breed\"\n          minLength: 1\n          maxLength: 50\n        bark:\n          type: \"boolean\"\n          description: \"Whether the dog can bark\"\n          default: true\n        vaccinated:\n          type: \"boolean\"\n          description: \"Whether the dog is vaccinated\"\n          default: false\n\n# Cat schema\nCat:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Cat\"\n  $anchor: \"Cat\"\n  title: \"Cat\"\n  description: \"Cat object\"\n  allOf:\n    - $ref: \"#/Pet\"\n    - type: \"object\"\n      required:\n        - \"petType\"\n        - \"breed\"\n      properties:\n        petType:\n          type: \"string\"\n          const: \"cat\"\n        breed:\n          type: \"string\"\n          description: \"Cat breed\"\n          minLength: 1\n          maxLength: 50\n        declawed:\n          type: \"boolean\"\n          description: \"Whether the cat is declawed\"\n          default: false\n        indoor:\n          type: \"boolean\"\n          description: \"Whether the cat is an indoor cat\"\n          default: true\n\n# Bird schema\nBird:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Bird\"\n  $anchor: \"Bird\"\n  title: \"Bird\"\n  description: \"Bird object\"\n  allOf:\n    - $ref: \"#/Pet\"\n    - type: \"object\"\n      required:\n        - \"petType\"\n        - \"species\"\n      properties:\n        petType:\n          type: \"string\"\n          const: \"bird\"\n        species:\n          type: \"string\"\n          description: \"Bird species\"\n          minLength: 1\n          maxLength: 50\n        canFly:\n          type: \"boolean\"\n          description: \"Whether the bird can fly\"\n          default: true\n        canTalk:\n          type: \"boolean\"\n          description: \"Whether the bird can talk\"\n          default: false\n\n# Pets array schema\nPets:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Pets\"\n  $anchor: \"Pets\"\n  title: \"Pets\"\n  description: \"Array of pets\"\n  type: \"array\"\n  items:\n    $ref: \"#/Pet\"\n  minItems: 0\n  maxItems: 100\n  uniqueItems: true\n\n# Pet with validation\nPetWithValidation:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/PetWithValidation\"\n  $anchor: \"PetWithValidation\"\n  title: \"Pet with Validation\"\n  description: \"Pet object with additional validation\"\n  allOf:\n    - $ref: \"#/Pet\"\n    - type: \"object\"\n      properties:\n        age:\n          type: \"integer\"\n          description: \"Pet age in years\"\n          minimum: 0\n          maximum: 30\n        weight:\n          type: \"number\"\n          description: \"Pet weight in kilograms\"\n          minimum: 0.1\n          maximum: 100\n          multipleOf: 0.1\n        height:\n          type: \"number\"\n          description: \"Pet height in centimeters\"\n          minimum: 1\n          maximum: 200\n          multipleOf: 0.1\n        birthDate:\n          type: \"string\"\n          format: \"date\"\n          description: \"Pet birth date\"\n        microchipped:\n          type: \"boolean\"\n          description: \"Whether the pet is microchipped\"\n          default: false\n      dependentRequired:\n        microchipped: [\"microchipNumber\"]\n      dependentSchemas:\n        microchipped:\n          properties:\n            microchipNumber:\n              type: \"string\"\n              description: \"Microchip number\"\n              pattern: \"^[0-9]{15}$\"\n          required:\n            - \"microchipNumber\"\n\n# Pet with conditional schema\nPetWithConditional:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/PetWithConditional\"\n  $anchor: \"PetWithConditional\"\n  title: \"Pet with Conditional Schema\"\n  description: \"Pet object with conditional schema\"\n  allOf:\n    - $ref: \"#/Pet\"\n    - type: \"object\"\n      properties:\n        type:\n          type: \"string\"\n          enum: [\"domestic\", \"wild\"]\n        dangerous:\n          type: \"boolean\"\n          description: \"Whether the pet is dangerous\"\n      if:\n        properties:\n          type:\n            const: \"wild\"\n        required:\n          - \"type\"\n      then:\n        properties:\n          dangerous:\n            const: true\n        required:\n          - \"dangerous\"\n      else:\n        properties:\n          dangerous:\n            default: false"
  },
  {
    "path": "modules/swagger-core/src/test/resources/comprehensiveOAS31/schemas/user-schemas.yaml",
    "content": "# User Schemas for OpenAPI 3.1 and JSON Schema 2020/12\n# This file contains user-related schemas referenced by the root file\n\n# Base User schema\nUser:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/User\"\n  $anchor: \"User\"\n  $dynamicAnchor: \"User\"\n  title: \"User\"\n  description: \"User object\"\n  type: \"object\"\n  required:\n    - \"id\"\n    - \"username\"\n    - \"email\"\n  properties:\n    id:\n      type: \"integer\"\n      format: \"int64\"\n      description: \"User ID\"\n      minimum: 1\n    username:\n      type: \"string\"\n      description: \"User name\"\n      minLength: 3\n      maxLength: 50\n      pattern: \"^[a-zA-Z0-9_]+$\"\n    firstName:\n      type: \"string\"\n      description: \"User first name\"\n      minLength: 1\n      maxLength: 50\n    lastName:\n      type: \"string\"\n      description: \"User last name\"\n      minLength: 1\n      maxLength: 50\n    email:\n      type: \"string\"\n      format: \"email\"\n      description: \"User email\"\n      pattern: \"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\\\.[a-zA-Z]{2,}$\"\n    password:\n      type: \"string\"\n      description: \"User password\"\n      minLength: 8\n      maxLength: 100\n      writeOnly: true\n    phone:\n      type: \"string\"\n      description: \"User phone number\"\n      pattern: \"^\\\\+?[0-9]{10,15}$\"\n    userStatus:\n      type: \"integer\"\n      format: \"int32\"\n      description: \"User status\"\n      enum: [0, 1, 2]\n      default: 0\n    address:\n      $ref: \"#/Address\"\n    createdAt:\n      type: \"string\"\n      format: \"date-time\"\n      description: \"User creation date\"\n      readOnly: true\n    updatedAt:\n      type: \"string\"\n      format: \"date-time\"\n      description: \"User last update date\"\n      readOnly: true\n  additionalProperties: false\n  x-extension-example: \"Example of an extension\"\n\n# Address schema\nAddress:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Address\"\n  $anchor: \"Address\"\n  title: \"Address\"\n  description: \"User address\"\n  type: \"object\"\n  properties:\n    street:\n      type: \"string\"\n      description: \"Street address\"\n      minLength: 1\n      maxLength: 100\n    city:\n      type: \"string\"\n      description: \"City\"\n      minLength: 1\n      maxLength: 50\n    state:\n      type: \"string\"\n      description: \"State or province\"\n      minLength: 1\n      maxLength: 50\n    zipCode:\n      type: \"string\"\n      description: \"Zip code\"\n      pattern: \"^[0-9]{5}(?:-[0-9]{4})?$\"\n    country:\n      type: \"string\"\n      description: \"Country\"\n      minLength: 1\n      maxLength: 50\n  required:\n    - \"street\"\n    - \"city\"\n    - \"zipCode\"\n    - \"country\"\n\n# UserArray schema\nUserArray:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/UserArray\"\n  $anchor: \"UserArray\"\n  title: \"User Array\"\n  description: \"Array of users\"\n  type: \"array\"\n  items:\n    $ref: \"#/User\"\n  minItems: 0\n  maxItems: 100\n  uniqueItems: true\n\n# UserWithRoles schema\nUserWithRoles:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/UserWithRoles\"\n  $anchor: \"UserWithRoles\"\n  title: \"User with Roles\"\n  description: \"User object with roles\"\n  allOf:\n    - $ref: \"#/User\"\n    - type: \"object\"\n      properties:\n        roles:\n          type: \"array\"\n          description: \"User roles\"\n          items:\n            $ref: \"#/Role\"\n          minItems: 1\n          maxItems: 10\n          uniqueItems: true\n      required:\n        - \"roles\"\n\n# Role schema\nRole:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Role\"\n  $anchor: \"Role\"\n  title: \"Role\"\n  description: \"User role\"\n  type: \"object\"\n  properties:\n    id:\n      type: \"integer\"\n      format: \"int32\"\n      description: \"Role ID\"\n      minimum: 1\n    name:\n      type: \"string\"\n      description: \"Role name\"\n      enum: [\"admin\", \"user\", \"moderator\", \"guest\"]\n    description:\n      type: \"string\"\n      description: \"Role description\"\n      minLength: 1\n      maxLength: 200\n    permissions:\n      type: \"array\"\n      description: \"Role permissions\"\n      items:\n        $ref: \"#/Permission\"\n      minItems: 0\n      maxItems: 50\n      uniqueItems: true\n  required:\n    - \"id\"\n    - \"name\"\n\n# Permission schema\nPermission:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/Permission\"\n  $anchor: \"Permission\"\n  title: \"Permission\"\n  description: \"User permission\"\n  type: \"object\"\n  properties:\n    id:\n      type: \"integer\"\n      format: \"int32\"\n      description: \"Permission ID\"\n      minimum: 1\n    name:\n      type: \"string\"\n      description: \"Permission name\"\n      minLength: 1\n      maxLength: 50\n    description:\n      type: \"string\"\n      description: \"Permission description\"\n      minLength: 1\n      maxLength: 200\n  required:\n    - \"id\"\n    - \"name\"\n\n# UserCredentials schema\nUserCredentials:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/UserCredentials\"\n  $anchor: \"UserCredentials\"\n  title: \"User Credentials\"\n  description: \"User credentials for authentication\"\n  type: \"object\"\n  properties:\n    username:\n      type: \"string\"\n      description: \"User name\"\n      minLength: 3\n      maxLength: 50\n      pattern: \"^[a-zA-Z0-9_]+$\"\n    password:\n      type: \"string\"\n      description: \"User password\"\n      minLength: 8\n      maxLength: 100\n      writeOnly: true\n  required:\n    - \"username\"\n    - \"password\"\n  additionalProperties: false\n\n# UserPreferences schema\nUserPreferences:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/UserPreferences\"\n  $anchor: \"UserPreferences\"\n  title: \"User Preferences\"\n  description: \"User preferences\"\n  type: \"object\"\n  properties:\n    theme:\n      type: \"string\"\n      description: \"UI theme\"\n      enum: [\"light\", \"dark\", \"system\"]\n      default: \"system\"\n    language:\n      type: \"string\"\n      description: \"UI language\"\n      enum: [\"en\", \"fr\", \"es\", \"de\", \"it\", \"ja\", \"zh\"]\n      default: \"en\"\n    notifications:\n      type: \"object\"\n      description: \"Notification preferences\"\n      properties:\n        email:\n          type: \"boolean\"\n          description: \"Email notifications\"\n          default: true\n        push:\n          type: \"boolean\"\n          description: \"Push notifications\"\n          default: true\n        sms:\n          type: \"boolean\"\n          description: \"SMS notifications\"\n          default: false\n      additionalProperties: false\n    timezone:\n      type: \"string\"\n      description: \"User timezone\"\n      default: \"UTC\"\n    currency:\n      type: \"string\"\n      description: \"Preferred currency\"\n      enum: [\"USD\", \"EUR\", \"GBP\", \"JPY\", \"CAD\", \"AUD\"]\n      default: \"USD\"\n  additionalProperties: false\n\n# UserWithPreferences schema\nUserWithPreferences:\n  $schema: \"https://json-schema.org/draft/2020-12/schema\"\n  $id: \"https://example.com/schemas/UserWithPreferences\"\n  $anchor: \"UserWithPreferences\"\n  title: \"User with Preferences\"\n  description: \"User object with preferences\"\n  allOf:\n    - $ref: \"#/User\"\n    - type: \"object\"\n      properties:\n        preferences:\n          $ref: \"#/UserPreferences\""
  },
  {
    "path": "modules/swagger-core/src/test/resources/converting/ArrayOfSubclassTest_expected30.json",
    "content": "{\n  \"schema\" : {\n    \"description\" : \"The holder\",\n    \"properties\" : {\n      \"name\" : {\n        \"type\" : \"string\"\n      },\n      \"friend\" : {\n        \"type\" : \"string\"\n      },\n      \"baseArray\" : {\n        \"type\" : \"array\",\n        \"description\" : \"Thingy\",\n        \"items\" : {\n          \"$ref\" : \"#/components/schemas/Base\"\n        },\n        \"minItems\" : 0,\n        \"uniqueItems\" : true\n      }\n    }\n  },\n  \"referencedSchemas\" : {\n    \"Base\" : {\n      \"description\" : \"Stuff\",\n      \"discriminator\" : {\n        \"propertyName\" : \"name\",\n        \"mapping\" : {\n          \"a\" : \"#/components/schemas/SubA\",\n          \"b\" : \"#/components/schemas/SubB\"\n        }\n      },\n      \"properties\" : {\n        \"name\" : {\n          \"type\" : \"string\"\n        }\n      }\n    },\n    \"Holder\" : {\n      \"description\" : \"The holder\",\n      \"properties\" : {\n        \"name\" : {\n          \"type\" : \"string\"\n        },\n        \"friend\" : {\n          \"type\" : \"string\"\n        },\n        \"baseArray\" : {\n          \"type\" : \"array\",\n          \"description\" : \"Thingy\",\n          \"items\" : {\n            \"$ref\" : \"#/components/schemas/Base\"\n          },\n          \"minItems\" : 0,\n          \"uniqueItems\" : true\n        }\n      }\n    },\n    \"SubA\" : {\n      \"description\" : \"The SubA class\",\n      \"properties\" : {\n        \"name\" : {\n          \"type\" : \"string\"\n        },\n        \"count\" : {\n          \"type\" : \"integer\",\n          \"format\" : \"int64\"\n        }\n      }\n    },\n    \"SubB\" : {\n      \"description\" : \"The SubB class\",\n      \"properties\" : {\n        \"name\" : {\n          \"type\" : \"string\"\n        },\n        \"friend\" : {\n          \"type\" : \"string\"\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/converting/ArrayOfSubclassTest_expected31.json",
    "content": "{\n  \"schema\" : {\n    \"type\" : \"object\",\n    \"description\" : \"The holder\",\n    \"properties\" : {\n      \"name\" : {\n        \"type\" : \"string\"\n      },\n      \"friend\" : {\n        \"type\" : \"string\"\n      },\n      \"baseArray\" : {\n        \"type\" : \"array\",\n        \"description\" : \"Thingy\",\n        \"items\" : {\n          \"$ref\" : \"#/components/schemas/Base\"\n        },\n        \"minItems\" : 0,\n        \"uniqueItems\" : true\n      }\n    }\n  },\n  \"referencedSchemas\" : {\n    \"Base\" : {\n      \"type\" : \"object\",\n      \"description\" : \"Stuff\",\n      \"discriminator\" : {\n        \"propertyName\" : \"name\",\n        \"mapping\" : {\n          \"a\" : \"#/components/schemas/SubA\",\n          \"b\" : \"#/components/schemas/SubB\"\n        }\n      },\n      \"properties\" : {\n        \"name\" : {\n          \"type\" : \"string\"\n        }\n      }\n    },\n    \"Holder\" : {\n      \"type\" : \"object\",\n      \"description\" : \"The holder\",\n      \"properties\" : {\n        \"name\" : {\n          \"type\" : \"string\"\n        },\n        \"friend\" : {\n          \"type\" : \"string\"\n        },\n        \"baseArray\" : {\n          \"type\" : \"array\",\n          \"description\" : \"Thingy\",\n          \"items\" : {\n            \"$ref\" : \"#/components/schemas/Base\"\n          },\n          \"minItems\" : 0,\n          \"uniqueItems\" : true\n        }\n      }\n    },\n    \"SubA\" : {\n      \"type\" : \"object\",\n      \"description\" : \"The SubA class\",\n      \"properties\" : {\n        \"name\" : {\n          \"type\" : \"string\"\n        },\n        \"count\" : {\n          \"type\" : \"integer\",\n          \"format\" : \"int64\"\n        }\n      }\n    },\n    \"SubB\" : {\n      \"type\" : \"object\",\n      \"description\" : \"The SubB class\",\n      \"properties\" : {\n        \"name\" : {\n          \"type\" : \"string\"\n        },\n        \"friend\" : {\n          \"type\" : \"string\"\n        },\n        \"baseArray\" : {\n          \"type\" : \"array\",\n          \"description\" : \"Thingy\",\n          \"items\" : {\n            \"$ref\" : \"#/components/schemas/Base\"\n          },\n          \"minItems\" : 0,\n          \"uniqueItems\" : true\n        }\n      }\n    }\n  }\n}\n\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/dateSchema.yaml",
    "content": "openapi: 3.0.3\ninfo:\n  version: \"1.0.0\"\n  title: Simple Inventory API\npaths:\n  /inventory:\n    get:\n      operationId: searchInventory\n      parameters:\n        - in: header\n          name: test\n          schema:\n            type: string\n            format: date\n            enum:\n              - 2023-12-12\n            default: 2023-12-12\n      responses:\n        '200':\n          description: search results matching criteria\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/InventoryItem'\ncomponents:\n  schemas:\n    InventoryItem:\n      type: object\n      properties:\n        releaseDate:\n          type: string\n          format: date-time\n          example: '2016-08-29T09:12:33.001Z'\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/json-schema-validation/array.json",
    "content": "{\n  \"type\": \"array\",\n  \"items\": {\n    \"type\": \"string\"\n  },\n  \"minItems\": 1,\n  \"maxItems\": 10,\n  \"uniqueItems\": true\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/json-schema-validation/map.json",
    "content": "{\n  \"type\": \"object\",\n  \"additionalProperties\": {\n    \"type\": \"string\"\n  },\n  \"minProperties\": 1,\n  \"maxProperties\": 10\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/logback-test.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n    <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleAppender\">\n        <layout class=\"ch.qos.logback.classic.PatternLayout\">\n            <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>\n        </layout>\n    </appender>\n    <logger name=\"io.swagger\" level=\"error\"/>\n    <root level=\"error\">\n        <appender-ref ref=\"STDOUT\"/>\n    </root>\n</configuration>\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/3.1.0/changelog-3.1.yaml",
    "content": "openapi: \"3.1.0\"\ninfo:\n  version: 1.0.0\n  title: Swagger Petstore\n  license:\n    name: MIT\n    identifier: test\nservers:\n  - url: http://petstore.swagger.io/v1\nwebhooks:\n  # Each webhook needs a name\n  newPet:\n    # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n    post:\n      requestBody:\n        description: Information about a new pet in the system\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\npaths:\n  /pets:\n    get:\n      summary: List all pets\n      operationId: listPets\n      tags:\n        - pets\n      parameters:\n        - name: limit\n          in: query\n          description: How many items to return at one time (max 100)\n          required: false\n          schema:\n            type: integer\n            format: int32\n      responses:\n        \"200\":\n          description: An paged array of pets\n          headers:\n            x-next:\n              description: A link to the next page of responses\n              schema:\n                type: string\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pets\"\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\n    post:\n      summary: Create a pet\n      operationId: createPets\n      tags:\n        - pets\n      responses:\n        \"201\":\n          description: Null response\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\n  /pets/{petId}:\n    get:\n      summary: Info for a specific pet\n      operationId: showPetById\n      tags:\n        - pets\n      parameters:\n        - name: petId\n          in: path\n          required: true\n          description: The id of the pet to retrieve\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: Expected response to a valid request\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pets\"\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\ncomponents:\n  schemas:\n    Pet:\n      type:\n        - object\n        - string\n      required:\n        - id\n        - name\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n        testenum:\n          type: string\n          enum:\n            - available\n            - pending\n            - sold\n          default: available\n        testconst:\n          type: string\n          const: pending\n        tag:\n          type: string\n    Pets:\n      type: array\n      items:\n        $ref: \"#/components/schemas/Pet\"\n    Error:\n      required:\n        - code\n        - message\n      properties:\n        code:\n          type: integer\n          format: int32\n        message:\n          type: string\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/3.1.0/composed-schema-3.1.json",
    "content": "{\n  \"components\": {\n    \"schemas\": {\n      \"SomeChild1ImplObject\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/SomeChildObject\"\n          }\n        ]\n      },\n      \"SomeChild2ImplObject\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/SomeChildObject\"\n          }\n        ]\n      },\n      \"SomeChildObject\": {\n        \"description\": \"Some child object\"\n      },\n      \"PatternPropertiesReferencedObject\": {\n        \"description\": \"An object schema with is ONLY referenced via pattern properties\"\n      },\n      \"SomeParentObject\": {\n        \"description\": \"Some parent object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"id\",\n            \"format\": \"int64\",\n            \"type\": \"integer\"\n          },\n          \"other\": {\n            \"description\": \"other\",\n            \"oneOf\": [\n              {\n                \"$ref\": \"#/components/schemas/SomeChild1ImplObject\"\n              },\n              {\n                \"$ref\": \"#/components/schemas/SomeChild2ImplObject\"\n              }\n            ]\n          }\n        },\n        \"patternProperties\": {\n          \"somePattern\": {\n            \"$ref\": \"#/components/schemas/PatternPropertiesReferencedObject\"\n          }\n        }\n      }\n    }\n  },\n  \"info\": {\n    \"title\": \"OpenAPI definition\",\n    \"version\": \"v0\"\n  },\n  \"openapi\": \"3.1.0\",\n  \"paths\": {\n    \"/some/call\": {\n      \"get\": {\n        \"description\": \"Some operation description\",\n        \"operationId\": \"getSome\",\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SomeParentObject\"\n                }\n              }\n            },\n            \"description\": \"OK\"\n          }\n        },\n        \"summary\": \"Some summary\",\n        \"tags\": [\n          \"Some\"\n        ]\n      }\n    }\n  },\n  \"servers\": [\n    {\n      \"description\": \"Generated server url\",\n      \"url\": \"http://localhost:8080\"\n    }\n  ],\n  \"tags\": [\n    {\n      \"description\": \"some actions\",\n      \"name\": \"Some\"\n    }\n  ]\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/3.1.0/issue-4737-3.1.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI definition\n  version: v0\nservers:\n  - url: http://localhost\n    description: Generated server url\npaths: {}\ncomponents:\n  schemas:\n    RequestDto:\n      properties:\n        personalNumber:\n          type: string\nwebhooks:\n  newPet:\n    post:\n      requestBody:\n        description: Information about a new pet in the system\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/RequestDto\"\n              description: Webhook Pet\n      responses:\n        '200':\n          description: >-\n            Return a 200 status to indicate that the data was received\n            successfully"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/3.1.0/list-3.1.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAPI definition\",\n    \"version\": \"v0\"\n  },\n  \"paths\": {\n    \"/some/call\": {\n      \"get\": {\n        \"description\": \"Some operation description\",\n        \"operationId\": \"getSome\",\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SomeParentObject\"\n                }\n              }\n            },\n            \"description\": \"OK\"\n          }\n        },\n        \"summary\": \"Some summary\",\n        \"tags\": [\n          \"Some\"\n        ]\n      }\n    }\n  },\n  \"servers\": [\n    {\n      \"description\": \"Generated server url\",\n      \"url\": \"http://localhost:8080\"\n    }\n  ],\n  \"tags\": [\n    {\n      \"description\": \"some actions\",\n      \"name\": \"Some\"\n    }\n  ],\n  \"components\": {\n    \"schemas\": {\n      \"SomeChildObject\": {\n        \"description\": \"Some child object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"id\",\n            \"format\": \"int64\",\n            \"type\": \"integer\"\n          },\n          \"name\": {\n            \"description\": \"name\",\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"SomeParentObject\": {\n        \"description\": \"Some parent object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"id\",\n            \"format\": \"int64\",\n            \"type\": \"integer\"\n          },\n          \"someList\": {\n            \"description\": \"list\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SomeChildObject\"\n            },\n            \"type\": \"array\"\n          }\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/3.1.0/petstore-3.1.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"version\": \"1.0.0\",\n    \"title\": \"Swagger Petstore\",\n    \"license\": {\n      \"name\": \"MIT\",\n      \"identifier\": \"test\"\n    }\n  },\n  \"servers\": [\n    {\n      \"url\": \"http://petstore.swagger.io/v1\"\n    }\n  ],\n  \"webhooks\": {\n    \"newPet\": {\n      \"post\": {\n        \"requestBody\": {\n          \"description\": \"Information about a new pet in the system\",\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      }\n    }\n  },\n  \"paths\": {\n    \"/pets\": {\n      \"get\": {\n        \"summary\": \"List all pets\",\n        \"operationId\": \"listPets\",\n        \"tags\": [\n          \"pets\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"limit\",\n            \"in\": \"query\",\n            \"description\": \"How many items to return at one time (max 100)\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"An paged array of pets\",\n            \"headers\": {\n              \"x-next\": {\n                \"description\": \"A link to the next page of responses\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pets\"\n                }\n              }\n            }\n          },\n          \"default\": {\n            \"description\": \"unexpected error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"post\": {\n        \"summary\": \"Create a pet\",\n        \"operationId\": \"createPets\",\n        \"tags\": [\n          \"pets\"\n        ],\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Null response\"\n          },\n          \"default\": {\n            \"description\": \"unexpected error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/pets/{petId}\": {\n      \"get\": {\n        \"summary\": \"Info for a specific pet\",\n        \"operationId\": \"showPetById\",\n        \"tags\": [\n          \"pets\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"description\": \"The id of the pet to retrieve\",\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Expected response to a valid request\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pets\"\n                }\n              }\n            }\n          },\n          \"default\": {\n            \"description\": \"unexpected error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Pet\": {\n        \"required\": [\n          \"id\",\n          \"name\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          \"name\": {\n            \"type\": [\n              \"string\",\n              \"integer\"\n            ]\n          },\n          \"tag\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Pets\": {\n        \"type\": \"array\",\n        \"items\": {\n          \"$ref\": \"#/components/schemas/Pet\"\n        }\n      },\n      \"Error\": {\n        \"required\": [\n          \"code\",\n          \"message\"\n        ],\n        \"properties\": {\n          \"code\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"message\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/3.1.0/petstore-3.1.yaml",
    "content": "openapi: \"3.1.0\"\ninfo:\n  version: 1.0.0\n  title: Swagger Petstore\n  license:\n    name: MIT\n    identifier: test\nservers:\n  - url: http://petstore.swagger.io/v1\nwebhooks:\n  # Each webhook needs a name\n  newPet:\n    # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n    post:\n      requestBody:\n        description: Information about a new pet in the system\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\npaths:\n  /pets:\n    get:\n      summary: List all pets\n      operationId: listPets\n      tags:\n        - pets\n      parameters:\n        - name: limit\n          in: query\n          description: How many items to return at one time (max 100)\n          required: false\n          schema:\n            type: integer\n            format: int32\n      responses:\n        \"200\":\n          description: An paged array of pets\n          headers:\n            x-next:\n              description: A link to the next page of responses\n              schema:\n                type: string\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pets\"\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\n    post:\n      summary: Create a pet\n      operationId: createPets\n      tags:\n        - pets\n      responses:\n        \"201\":\n          description: Null response\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\n  /pets/{petId}:\n    get:\n      summary: Info for a specific pet\n      operationId: showPetById\n      tags:\n        - pets\n      parameters:\n        - name: petId\n          in: path\n          required: true\n          description: The id of the pet to retrieve\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: Expected response to a valid request\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pets\"\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\ncomponents:\n  schemas:\n    Pet:\n      required:\n        - id\n        - name\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type:\n          - string\n          - integer\n        tag:\n          type: string\n    Pets:\n      type: array\n      items:\n        $ref: \"#/components/schemas/Pet\"\n    Error:\n      required:\n        - code\n        - message\n      properties:\n        code:\n          type: integer\n          format: int32\n        message:\n          type: string\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/3.1.0/petstore-3.1_more.yaml",
    "content": "openapi: \"3.1.0\"\ninfo:\n  version: 1.0.0\n  title: Swagger Petstore\n  license:\n    name: MIT\n    identifier: test\nservers:\n  - url: http://petstore.swagger.io/v1\nwebhooks:\n  # Each webhook needs a name\n  newPet:\n    # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n    post:\n      requestBody:\n        description: Information about a new pet in the system\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\npaths:\n  /pets:\n    get:\n      summary: List all pets\n      operationId: listPets\n      tags:\n        - pets\n      parameters:\n        - name: limit\n          in: query\n          description: How many items to return at one time (max 100)\n          required: false\n          schema:\n            type: integer\n            format: int32\n      responses:\n        \"200\":\n          description: An paged array of pets\n          headers:\n            x-next:\n              description: A link to the next page of responses\n              schema:\n                type: string\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pets\"\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\n    post:\n      summary: Create a pet\n      operationId: createPets\n      tags:\n        - pets\n      responses:\n        \"201\":\n          description: Null response\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\n  /pets/{petId}:\n    get:\n      summary: Info for a specific pet\n      operationId: showPetById\n      tags:\n        - pets\n      parameters:\n        - name: petId\n          in: path\n          required: true\n          description: The id of the pet to retrieve\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: Expected response to a valid request\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pets\"\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\ncomponents:\n  schemas:\n    Pet:\n      required:\n        - id\n        - name\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type:\n          - string\n          - integer\n        tag:\n          type: string\n    Pets:\n      $id: test\n      $anchor: test\n      type: array\n      items:\n        $ref: \"#/components/schemas/Pet\"\n        description: desc\n        format: int32\n    Error:\n      required:\n        - code\n        - message\n      properties:\n        code:\n          type: integer\n          format: int32\n        message:\n          type: string\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/3.1.0/petstore-3.1_refs_siblings.yaml",
    "content": "openapi: \"3.1.0\"\ninfo:\n  version: 1.0.0\n  title: Swagger Petstore\n  summary: petstore sample for OAS 3.1.0\n  license:\n    name: MIT\n    identifier: test\nservers:\n  - url: http://petstore.swagger.io/v1\npaths:\n  /ref_pet:\n    $ref: \"#/components/pathItems/pet\"\n    description: \"ref pathItem description\"\n    summary: \"ref pathItem summary\"\n  /pets:\n    post:\n      tags:\n        - pets\n      summary: Create a pet\n      operationId: createPets\n      parameters:\n        - $ref: \"#/components/parameters/testParameter\"\n          description: \"ref parameter description\"\n          summary: \"ref parameter summary\"\n        - name: randomParam\n          in: query\n          schema:\n            type: string\n          examples:\n            refExample:\n              $ref: \"#/components/examples/testExample\"\n              description: \"ref example description\"\n              summary: \"ref example summary\"\n      callbacks:\n        callIt:\n          $ref: \"#/components/callbacks/TestCallback\"\n      requestBody:\n        $ref: \"#/components/requestBodies/body\"\n        description: \"ref request body description\"\n        summary: \"ref request body summary\"\n      responses:\n        \"201\":\n          $ref: \"#/components/responses/okResponse\"\n          description: \"ref response description\"\n          summary: \"ref response summary\"\n        default:\n          description: 'default response'\n          headers:\n            head:\n              $ref: \"#/components/headers/head\"\n              description: \"ref header description\"\n              summary: \"ref header summary\"\n\n\ncomponents:\n  schemas:\n    Pet:\n      required:\n        - id\n        - name\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n        tag:\n          type: string\n      discriminator:\n        propertyName: tag\n        x-test-extension: extended\n    Pets:\n      type: array\n      items:\n        $ref: \"#/components/schemas/Pet\"\n        description: desc\n        format: int32\n    Error:\n      required:\n        - code\n        - message\n      properties:\n        code:\n          type: integer\n          format: int32\n        message:\n          type: string\n    AnotherPet:\n      title: Another Pet\n      description: Another Pet for petstore referencing Pet schema\n      $ref: \"#/components/schemas/Pet\"\n      properties:\n        category:\n          type: string\n        photoUrl:\n          type: string\n  pathItems:\n    pet:\n      description: get a pet\n      get:\n        operationId: getPet\n        responses:\n          \"200\":\n            description: pet returned\n  links:\n    address:\n      operationId: getUserAddressByUUID\n      parameters:\n        # get the `uuid` field from the `uuid` field in the response body\n        userUuid: $response.body#/uuid\n  callbacks:\n    TestCallback:\n      '{$request.query.queryUrl}':\n        description: test path item\n        post:\n          operationId: testPathItem\n          responses:\n            default:\n              description: ok\n  securitySchemes:\n    basic:\n      $ref: \"#/components/securitySchemes/http\"\n    http:\n      type: http\n      scheme: basic\n  headers:\n    head:\n      schema:\n        type: string\n  requestBodies:\n    body:\n      description: client model\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Pet\"\n  responses:\n    okResponse:\n      description: everything is good\"\n  examples:\n    testExample:\n      value: Example on test\n  parameters:\n    testParameter:\n      name: param\n      in: query\n      schema:\n        type: string\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/3.1.0/petstore-3.1_sample.yaml",
    "content": "\nopenapi: \"3.1.0\"\ninfo:\n  version: 1.0.0\n  title: Swagger Petstore\n  summary: petstore sample for OAS 3.1.0\n  license:\n    name: MIT\n    identifier: test\nservers:\n  - url: http://petstore.swagger.io/v1\nwebhooks:\n  # Each webhook needs a name\n  newPet:\n    # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n    post:\n      requestBody:\n        description: Information about a new pet in the system\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\npaths:\n  /pets:\n    get:\n      summary: List all pets\n      operationId: listPets\n      tags:\n        - pets\n      parameters:\n        - name: limit\n          in: query\n          description: How many items to return at one time (max 100)\n          required: false\n          schema:\n            type: integer\n            format: int32\n      responses:\n        \"200\":\n          description: An paged array of pets\n          headers:\n            x-next:\n              description: A link to the next page of responses\n              schema:\n                type: string\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pets\"\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\n    post:\n      summary: Create a pet\n      operationId: createPets\n      tags:\n        - pets\n      responses:\n        \"201\":\n          description: Null response\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\n  /pets/{petId}:\n    get:\n      summary: Info for a specific pet\n      operationId: showPetById\n      tags:\n        - pets\n      parameters:\n        - name: petId\n          in: path\n          required: true\n          description: The id of the pet to retrieve\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: Expected response to a valid request\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pets\"\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\ncomponents:\n  schemas:\n    Pet:\n      required:\n        - id\n        - name\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n        tag:\n          type: string\n      discriminator:\n        propertyName: tag\n        x-test-extension: extended\n    Pets:\n      $id: test\n      $anchor: test\n      type: array\n      items:\n        $ref: \"#/components/schemas/Pet\"\n        description: desc\n        format: int32\n    Error:\n      required:\n        - code\n        - message\n      properties:\n        code:\n          type: integer\n          format: int32\n        message:\n          type: string\n  responses:\n    \"201\":\n      description: api response description\n      summary: api response summary\n  parameters:\n    param:\n      in: query\n      name: param0\n      description: parameter description\n      summary: parameter summary\n      schema:\n        type: string\n  examples:\n    example:\n      summary: example summary\n      description: example description\n      value: This is an example\n  requestBodies:\n    body:\n      content:\n        application/json:\n          schema: { }\n  headers:\n    test-head:\n      description: test header description\n      summary: test header summary\n  securitySchemes:\n    basic:\n      description: security description\n      summary: security summary\n      type: http\n  links:\n    Link:\n      operationRef: \"#/paths/~12.0~1repositories~1{username}/get\"\n  callbacks:\n    TestCallback:\n      '{$request.query.queryUrl}':\n        description: test path item\n        post:\n          operationId: testPathItem\n  pathItems:\n    /pet:\n      description: get a pet\n      get:\n        operationId: getPet\n        responses:\n          \"200\":\n            description: pet returned\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/3.1.0/specWithDynamicRef.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: Tree API\n  version: 1.0.0\n\npaths:\n  /tree:\n    post:\n      summary: Create a tree structure\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/ExtendedNode'\n      responses:\n        '200':\n          description: Tree accepted\n          content:\n            application/json:\n              schema:\n                type: string\n\ncomponents:\n  schemas:\n    BaseNode:\n      $id: \"https://example.com/schemas/base-node\"\n      $schema: \"https://json-schema.org/draft/2020-12/schema\"\n      $dynamicAnchor: \"node\"\n      type: object\n      properties:\n        name:\n          type: string\n        children:\n          type: array\n          items:\n            $dynamicRef: \"#node\"\n      required: [name]\n\n    ExtendedProperties:\n      $id: \"https://example.com/schemas/extended-properties\"\n      $schema: \"https://json-schema.org/draft/2020-12/schema\"\n      $dynamicAnchor: \"node\"\n      type: object\n      properties:\n        type:\n          type: string\n          enum: [folder, file]\n      required: [type]\n\n    ExtendedNode:\n      $schema: \"https://json-schema.org/draft/2020-12/schema\"\n      $id: \"https://example.com/schemas/extended-node\"\n      allOf:\n        - $ref: \"#/components/schemas/BaseNode\"\n        - $ref: \"#/components/schemas/ExtendedProperties\"\n\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/3.1.0/specWithReferredSchemas-3.1.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: OpenAPI definition\n  version: v0\nservers:\n  - url: http://localhost\n    description: Generated server url\npaths:\n  /users:\n    get:\n      summary: Get list of all users\n      operationId: usersList\n      responses:\n        200:\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: string\n                maxLength: 100\n                minLength: 1\ncomponents:\n  schemas:\n    ResponseDefinition:\n      properties:\n        personalNumber:\n          type: string\n    WebhookResponseDefinition:\n      properties:\n        personalNumber:\n          type: integer\n    WebhookOperationDefinition:\n      properties:\n        personalNumber:\n          type: number\n    RequestBodyDefinition:\n      properties:\n        personalNumber:\n          type: string\n    ParameterDefinition:\n      properties:\n        parameterName:\n          type: string\n    HeaderDefinition:\n      type: string\n      description: header ref\n    CallbackDefinition:\n      description: callback ref\n      type: string\n    PathItemDefinition:\n      description: pathItem ref\n      type: string\n    UnusedDefinition:\n      description: unused definition\n      type: string\n      minLength: 1\n      maxLength: 100\n  responses:\n    OK:\n      description: OK\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/ResponseDefinition\"\n  requestBodies:\n    requestBody1:\n      description: request body\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/RequestBodyDefinition\"\n  parameters:\n    parameter1:\n      description: request body\n      name: parameter\n      in: query\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/ParameterDefinition\"\n  headers:\n    header1:\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/HeaderDefinition\"\n  callbacks:\n      myEvent: # Event name\n        \"{$request.body#/callbackUrl}\":\n          post:\n            requestBody:\n              required: true\n              content:\n                application/json:\n                  schema:\n                    $ref: \"#/components/schemas/CallbackDefinition\"\n  pathItems:\n    pathItem1:\n      get:\n        summary: Get list of all users\n        operationId: usersList\n        responses:\n          200:\n            description: OK\n            content:\n              application/json:\n                schema:\n                  $ref: \"#/components/schemas/PathItemDefinition\"\nwebhooks:\n  newPet:\n    post:\n      requestBody:\n        description: Information about a new pet in the system\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/WebhookOperationDefinition\"\n              description: Webhook Pet\n      responses:\n        '200':\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/WebhookResponseDefinition\"\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/additionalpropsmodel.json",
    "content": "{\n  \"swagger\" : \"2.0\",\n  \"tags\" : [ {\n    \"name\" : \"Test Api\"\n  } ],\n  \"paths\" : {\n    \"/test\" : {\n      \"get\" : {\n        \"tags\" : [ \"Test Api\" ],\n        \"operationId\" : \"getA\",\n        \"parameters\" : [ ],\n        \"responses\" : {\n          \"200\" : {\n            \"description\" : \"successful operation\",\n            \"schema\" : {\n              \"$ref\" : \"#/definitions/A\"\n            },\n            \"headers\" : { }\n          }\n        }\n      }\n    }\n  },\n  \"definitions\" : {\n    \"A\" : {\n      \"type\" : \"object\",\n      \"properties\" : {\n        \"id\" : {\n          \"type\" : \"integer\",\n          \"format\" : \"int32\"\n        },\n        \"aggregates\" : {\n          \"type\" : \"object\",\n          \"additionalProperties\" : {\n            \"$ref\" : \"#/definitions/B\"\n          }\n        }\n      }\n    },\n    \"B\" : {\n      \"type\" : \"object\",\n      \"properties\" : {\n        \"id\" : {\n          \"type\" : \"integer\",\n          \"format\" : \"int32\"\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/brokenrefmodel.json",
    "content": "{\n  \"swagger\" : \"2.0\",\n  \"tags\" : [ {\n    \"name\" : \"Broken References Resource\"\n  } ],\n  \"paths\" : {\n    \"/r/nested\" : {\n      \"get\" : {\n        \"tags\" : [ \"Broken References Resource\" ],\n        \"operationId\" : \"getNestedModel\",\n        \"parameters\" : [ ],\n        \"responses\" : {\n          \"200\" : {\n            \"description\" : \"successful operation\",\n            \"schema\" : {\n              \"$ref\" : \"#/definitions/refname\"\n            },\n            \"headers\" : { }\n          }\n        }\n      }\n    },\n    \"/r/root\" : {\n      \"get\" : {\n        \"tags\" : [ \"Broken References Resource\" ],\n        \"operationId\" : \"getRootModel\",\n        \"parameters\" : [ ],\n        \"responses\" : {\n          \"200\" : {\n            \"description\" : \"successful operation\",\n            \"schema\" : {\n              \"$ref\" : \"#/definitions/RootModel\"\n            },\n            \"headers\" : { }\n          }\n        }\n      }\n    }\n  },\n  \"definitions\" : {\n    \"RootModel\" : {\n      \"type\" : \"object\",\n      \"properties\" : {\n        \"nested\" : {\n          \"$ref\" : \"#/definitions/refname\"\n        }\n      }\n    },\n    \"NestedModel\" : {\n      \"type\" : \"object\"\n    }\n  }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/compositionTest-3.0.json",
    "content": "{\n  \"openapi\": \"3.0.1\",\n  \"info\": {\n    \"version\": \"1.0.0\",\n    \"license\": {\n      \"name\": \"MIT\"\n    },\n    \"title\": \"Swagger Petstore\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"http://petstore.swagger.io/v1\"\n    }\n  ],\n  \"paths\": {},\n  \"components\": {\n    \"schemas\": {\n      \"Pet\": {\n        \"discriminator\": {\n          \"propertyName\": \"pet_type\",\n          \"mapping\": {\n            \"cachorro\": \"#/components/schemas/Dog\"\n          }\n        },\n        \"required\": [\n          \"pet_type\"\n        ],\n        \"type\": \"object\",\n        \"properties\": {\n          \"pet_type\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Lizard\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"lovesRocks\": {\n                \"type\": \"boolean\"\n              }\n            }\n          }\n        ]\n      },\n      \"Dog\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"bark\": {\n                \"type\": \"string\"\n              }\n            }\n          }\n        ]\n      },\n      \"Cat\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"name\": {\n                \"type\": \"string\"\n              }\n            }\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/compositionTest.json",
    "content": "{\n  \"swagger\": 2.0,\n  \"info\": {\n    \"description\": \"This is a sample server Petstore server.  You can find out more about Swagger at <a href=\\\"http://swagger.io\\\">http://swagger.io</a> or on irc.freenode.net, #swagger.  For this sample, you can use the api key \\\"special-key\\\" to test the authorization filters\",\n    \"version\": \"1.0.0\",\n    \"title\": \"Swagger Petstore\",\n    \"termsOfService\": \"http://swagger.io/terms/\",\n    \"contact\": {\n      \"name\": \"apiteam@swagger.io\"\n    },\n    \"license\": {\n      \"name\": \"Apache 2.0\",\n      \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\"\n    }\n  },\n  \"basePath\": \"petstore.swagger.io:80/api\",\n  \"paths\": {},\n  \"definitions\": {\n    \"Pet\": {\n      \"allOf\": [\n        {\n          \"$ref\": \"Human\"\n        },\n        {\n          \"$ref\": \"Animal\"\n        },\n        {\n          \"$ref\": \"Bird\"\n        },\n        {\n          \"properties\": {\n            \"isDomestic\": {\n              \"type\": \"boolean\"\n            }\n          }\n        }\n      ]\n    },\n    \"Human\": {\n      \"required\": [\n        \"name\"\n      ],\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the human\"\n        },\n        \"type\": {\n          \"type\": \"string\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        }\n      },\n      \"discriminator\": \"type\"\n    },\n    \"Animal\": {\n      \"required\": [\n        \"hasLegs\"\n      ],\n      \"properties\": {\n        \"hasLegs\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"discriminator\": \"hasLegs\"\n    },\n    \"Bird\": {\n      \"required\": [\n        \"hasWings\"\n      ],\n      \"properties\": {\n        \"hasWings\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"discriminator\": \"hasWings\"\n    }\n  }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/deprecatedoperationmodel.json",
    "content": "{\n  \"openapi\": \"3.0.1\",\n  \"tags\" : [ {\n    \"name\" : \"Test Api\"\n  } ],\n  \"paths\" : {\n    \"/test\" : {\n      \"get\" : {\n        \"tags\" : [ \"Test Api\" ],\n        \"operationId\" : \"getA\",\n        \"parameters\" : [ ],\n        \"responses\" : {\n          \"200\" : {\n            \"description\" : \"successful operation\",\n            \"schema\" : {\n              \"$ref\" : \"#/definitions/EmptyModel\"\n            },\n            \"headers\" : { }\n          }\n        },\n        \"deprecated\" : true\n      }\n    }\n  },\n  \"components\" : {\n    \"EmptyModel\" : {\n      \"type\" : \"object\"\n    }\n  }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/jsonSerialization-expected-petstore-3.0.json",
    "content": "{\n  \"openapi\": \"3.0.1\",\n  \"info\": {\n    \"title\": \"Swagger Petstore\",\n    \"license\": {\n      \"name\": \"MIT\"\n    },\n    \"version\": \"1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"http://petstore.swagger.io/v1\"\n    }\n  ],\n  \"paths\": {\n    \"/pets\": {\n      \"get\": {\n        \"tags\": [\n          \"pets\"\n        ],\n        \"summary\": \"List all pets\",\n        \"operationId\": \"listPets\",\n        \"parameters\": [\n          {\n            \"name\": \"limit\",\n            \"in\": \"query\",\n            \"description\": \"How many items to return at one time (max 100)\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"An paged array of pets\",\n            \"headers\": {\n              \"x-next\": {\n                \"description\": \"A link to the next page of responses\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pets\"\n                }\n              }\n            }\n          },\n          \"default\": {\n            \"description\": \"unexpected error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\n          \"pets\"\n        ],\n        \"summary\": \"Create a pet\",\n        \"operationId\": \"createPets\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Null response\"\n          },\n          \"default\": {\n            \"description\": \"unexpected error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/pets/{petId}\": {\n      \"get\": {\n        \"tags\": [\n          \"pets\"\n        ],\n        \"summary\": \"Info for a specific pet\",\n        \"operationId\": \"showPetById\",\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"The id of the pet to retrieve\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Expected response to a valid request\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pets\"\n                }\n              }\n            }\n          },\n          \"default\": {\n            \"description\": \"unexpected error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Pet\": {\n        \"required\": [\n          \"id\",\n          \"name\"\n        ],\n        \"type\": \"object\",\n        \"properties\": {\n          \"tag\": {\n            \"type\": \"string\"\n          },\n          \"id\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          \"name\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Pets\": {\n        \"type\": \"array\",\n        \"items\": {\n          \"$ref\": \"#/components/schemas/Pet\"\n        }\n      },\n      \"Error\": {\n        \"required\": [\n          \"code\",\n          \"message\"\n        ],\n        \"type\": \"object\",\n        \"properties\": {\n          \"message\": {\n            \"type\": \"string\"\n          },\n          \"code\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          }\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/media-type-null-example.yaml",
    "content": "openapi: \"3.0.1\"\ninfo:\n  version: 1.0.0\n  title: Swagger Petstore\n  license:\n    name: MIT\nservers:\n  - url: https://petstore3.swagger.io/api/v3\npaths:\n  /pet:\n    post:\n      tags:\n      - pet\n      summary: Add a new pet to the store\n      operationId: addPet\n      requestBody:\n        description: Pet object that needs to be added to the store\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/Pet\"\n            example:\n              id: 10\n              name: kitty\n              tag: something\n        required: true\n      responses:\n        200:\n          description: Expected response to a valid request\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n  /pets/{petId}:\n    get:\n      summary: Info for a specific pet\n      operationId: showPetById\n      tags:\n        - pets\n      parameters:\n        - name: petId\n          in: path\n          required: true\n          description: The id of the pet to retrieve\n          schema:\n            type: string\n      responses:\n        200:\n          description: Expected response to a valid request\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n              example: null\ncomponents:\n  schemas:\n    Pet:\n      required:\n        - id\n        - name\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n        tag:\n          type: string\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/noModels.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"info\": {\n    \"description\": \"This is a sample server Petstore server.  You can find out more about Swagger at <a href=\\\"http://swagger.io\\\">http://swagger.io</a> or on irc.freenode.net, #swagger.  For this sample, you can use the api key \\\"special-key\\\" to test the authorization filters\",\n    \"version\": \"1.0.0\",\n    \"title\": \"Swagger Petstore\",\n    \"termsOfService\": \"http://swagger.io/terms/\",\n    \"contact\": {\n      \"email\": \"apiteam@swagger.io\"\n    },\n    \"license\": {\n      \"name\": \"Apache 2.0\",\n      \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\"\n    }\n  },\n  \"host\": \"localhost:8002\",\n  \"basePath\": \"/api\",\n  \"tags\": [\n    {\n      \"name\": \"pet\",\n      \"description\": \"Everything about your Pets\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    },\n    {\n      \"name\": \"store\",\n      \"description\": \"Access to Petstore orders\"\n    },\n    {\n      \"name\": \"user\",\n      \"description\": \"Operations about user\",\n      \"externalDocs\": {\n        \"description\": \"Find out more about our store\",\n        \"url\": \"http://swagger.io\"\n      }\n    }\n  ],\n  \"schemes\": [\n    \"http\"\n  ],\n  \"paths\": {\n    \"/pet\": {\n      \"post\": {\n        \"operationId\": \"addPet\",\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      },\n      \"put\": {\n        \"operationId\": \"updatePet\",\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/pet/findByStatus\": {\n      \"get\": {\n        \"operationId\": \"findPetsByStatus\",\n        \"parameters\": [\n          {\n            \"name\": \"status\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/pet/findByTags\": {\n      \"get\": {\n        \"operationId\": \"findPetsByTags\",\n        \"parameters\": [\n          {\n            \"name\": \"tags\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/pet/{petId}\": {\n      \"get\": {\n        \"operationId\": \"getPetById\",\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/store/order\": {\n      \"post\": {\n        \"operationId\": \"placeOrder\",\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/store/order/{orderId}\": {\n      \"get\": {\n        \"operationId\": \"getOrderById\",\n        \"parameters\": [\n          {\n            \"name\": \"orderId\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      },\n      \"delete\": {\n        \"operationId\": \"deleteOrder\",\n        \"parameters\": [\n          {\n            \"name\": \"orderId\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user\": {\n      \"post\": {\n        \"operationId\": \"createUser\",\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithArray\": {\n      \"post\": {\n        \"operationId\": \"createUsersWithArrayInput\",\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/createWithList\": {\n      \"post\": {\n        \"operationId\": \"createUsersWithListInput\",\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/login\": {\n      \"get\": {\n        \"operationId\": \"loginUser\",\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"password\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/logout\": {\n      \"get\": {\n        \"operationId\": \"logoutUser\",\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/user/{username}\": {\n      \"get\": {\n        \"operationId\": \"getUserByName\",\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      },\n      \"put\": {\n        \"operationId\": \"updateUser\",\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"path\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      },\n      \"delete\": {\n        \"operationId\": \"deleteUser\",\n        \"parameters\": [],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    }\n  },\n  \"securityDefinitions\": {\n    \"api_key\": {\n      \"type\": \"apiKey\",\n      \"name\": \"api_key\",\n      \"in\": \"header\"\n    },\n    \"petstore_auth\": {\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      }\n    }\n  },\n  \"externalDocs\": {\n    \"description\": \"Find out more about Swagger\",\n    \"url\": \"http://swagger.io\"\n  }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/null-example.yaml",
    "content": "openapi: 3.0.2\ninfo:\n  title: VirtServer support for null examples\n  version: 1.0.0\npaths:\n\n  /object-with-null-example:\n    get:\n      description: Response should be `null`\n      responses:\n        '200':\n          description: Should be `null`\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ObjectWithNullExample\"\n\n  /object-with-null-in-schema-example:\n    get:\n      description: 'Response should be `{..., \"d\": null}`'\n      responses:\n        '200':\n          description: 'Should be `{..., \"d\": null}`'\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ObjectWithNullInSchemaExample\"\n\n  /object-with-null-property-example:\n    get:\n      description: 'Response should be `{\"a\": 5, \"b\": null}`'\n      responses:\n        '200':\n          description: 'Should be `{\"a\": 5, \"b\": null}`'\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ObjectWithNullPropertyExample\"\n\n  /string-with-null-example:\n    get:\n      description: Response should be `null`\n      responses:\n        '200':\n          description: Should be `null`\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/StringWithNullExample\"\n\n  /array-with-null-array-example:\n    get:\n      description: Response should be `null`\n      responses:\n        '200':\n          description: Should be `null`\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ArrayWithNullArrayExample\"\n\n  /array-with-null-item-example:\n    get:\n      description: Response should be `[null]`\n      responses:\n        '200':\n          description: Should be `[null]`\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ArrayWithNullItemExample\"\n\n  /arrey-with-null-in-array-example:\n    get:\n      description: Response should be `[\"foo\", null]`\n      responses:\n        '200':\n          description: Should be `[\"foo\", null]`\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ArrayWithNullInArrayExample\"\n\n  /object-without-null-example:\n    get:\n      description: Response should be `null`\n      responses:\n        '200':\n          description: Should be `null`\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ObjectWithoutNullExample\"\n\n  /object-without-null-in-schema-example:\n    get:\n      description: 'Response should be `{..., \"d\": null}`'\n      responses:\n        '200':\n          description: 'Should be `{..., \"d\": null}`'\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ObjectWithoutNullInSchemaExample\"\n\n  /object-without-null-property-example:\n    get:\n      description: 'Response should be `{\"a\": 5, \"b\": null}`'\n      responses:\n        '200':\n          description: 'Should be `{\"a\": 5, \"b\": null}`'\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ObjectWithoutNullPropertyExample\"\n\n  /string-without-null-example:\n    get:\n      description: Response should be `null`\n      responses:\n        '200':\n          description: Should be `null`\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/StringWithoutNullExample\"\n\n  /array-without-null-array-example:\n    get:\n      description: Response should be `null`\n      responses:\n        '200':\n          description: Should be `null`\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ArrayWithoutNullArrayExample\"\n\n  /array-without-null-item-example:\n    get:\n      description: Response should be `[null]`\n      responses:\n        '200':\n          description: Should be `[null]`\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ArrayWithoutNullItemExample\"\n\n  /arrey-without-null-in-array-example:\n    get:\n      description: Response should be `[\"foo\", null]`\n      responses:\n        '200':\n          description: Should be `[\"foo\", null]`\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ArrayWithoutNullInArrayExample\"\ncomponents:\n  schemas:\n    ObjectWithNullExample:\n      type: object\n      properties:\n        foo:\n          type: string\n      nullable: true\n      example: null\n\n    ObjectWithNullInSchemaExample:\n      type: object\n      example:\n        a: 5\n        b: test\n        c: true\n        d: null\n\n    ObjectWithNullPropertyExample:\n      type: object\n      properties:\n        a:\n          type: integer\n          example: 5\n        b:\n          type: string\n          nullable: true\n          example: null\n\n    StringWithNullExample:\n      type: string\n      nullable: true\n      example: null\n\n    ArrayWithNullArrayExample:\n      type: array\n      items:\n        type: string\n      nullable: true\n      example: null\n\n    ArrayWithNullItemExample:\n      type: array\n      items:\n        type: string\n        nullable: true\n        example: null\n\n    ArrayWithNullInArrayExample:\n      type: array\n      items:\n        type: string\n        nullable: true\n      example: [foo, null]\n\n    ObjectWithoutNullExample:\n      type: object\n      properties:\n        foo:\n          type: string\n      nullable: true\n\n    ObjectWithoutNullInSchemaExample:\n      type: object\n      example:\n        a: 5\n        b: test\n        c: true\n\n    ObjectWithoutNullPropertyExample:\n      type: object\n      properties:\n        a:\n          type: integer\n          example: 5\n        b:\n          type: string\n          nullable: true\n\n    StringWithoutNullExample:\n      type: string\n      nullable: true\n\n    ArrayWithoutNullArrayExample:\n      type: array\n      items:\n        type: string\n      nullable: true\n\n    ArrayWithoutNullItemExample:\n      type: array\n      items:\n        type: string\n        nullable: true\n\n    ArrayWithoutNullInArrayExample:\n      type: array\n      items:\n        type: string\n        nullable: true\n      example: [foo]\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/null-in-schema-example.yaml",
    "content": "openapi: 3.0.2\ninfo:\n  title: VirtServer support for null examples\n  version: 1.0.0\npaths:\n\n  /object-with-null-in-schema-example:\n    get:\n      description: 'Response should be `{..., \"d\": null}`'\n      responses:\n        '200':\n          description: 'Should be `{..., \"d\": null}`'\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ObjectWithNullInSchemaExample\"\n\ncomponents:\n  schemas:\n    ObjectWithNullInSchemaExample:\n      type: object\n      example:\n        a: 5\n        b: test\n        c: true\n        d: null\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/oas3.yaml",
    "content": "---\nopenapi: 3.0.1\nservers:\n- url: http://petstore.swagger.io/v2\n- url: https://development.gigantic-server.com/v1\n  description: Development server\n- url: https://{username}.gigantic-server.com:{port}/{basePath}\n  x-server: server extension\n  description: The production API server\n  variables:\n      username:\n        # note! no enum here means it is an open value\n        default: demo\n        description: this value is assigned by the service provider, in this example `gigantic-server.com`\n      port:\n        enum:\n          - 8443\n          - 443\n        default: 8443\n      basePath:\n        # open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`\n        default: v2\n        description: testing overwriting\n        enum:\n          - 2222\n          - 333\nx-origin:\n- url: http://petstore.swagger.io/v2/swagger.json\n  format: swagger\n  version: '2.0'\n  converter:\n    url: https://github.com/mermade/swagger2openapi\n    version: 1.2.1\nx-api-title: pet store test api\nsecurity:\n  - api_key: []\n  - tokenAuth: []\ninfo:\n  description: 'This is a sample server Petstore'\n  title: Sample Pet Store App\n  termsOfService: http://swagger.io/terms/\n  x-info: info extension\n  contact:\n    name: API Support\n    url: http://www.example.com/support\n    email: support@example.com\n    x-contact: contact extension\n  license:\n    name: Apache 2.0\n    url: http://www.apache.org/licenses/LICENSE-2.0.html\n    x-license: license extension\n  version: 1.0.1\ntags:\n- name: pet\n  description: Everything about your Pets\n  externalDocs:\n    description: Find out more\n    url: http://swagger.io\n- name: store\n  description: Access to Petstore orders\n- name: user\n  description: Operations about user\n  externalDocs:\n    description: Find out more about our store\n    url: http://swagger.io\npaths:\n  \"/pathItemRef\":\n    \"$ref\": 'http://localhost:${dynamicPort}/remote/path'\n  \"/pathItemRef2\":\n      \"$ref\": \"#/paths/~1pet\"\n  \"/pet\":\n    summary: summary\n    description: description\n    post:\n      externalDocs:\n        description: Find out more\n        url: http://swagger.io\n      tags:\n      - pet\n      summary: Add a new pet to the store\n      description: ''\n      operationId: addPet\n      parameters: []\n      responses:\n        '405':\n          description: Invalid input\n          headers:\n            X-Rate-Limit:\n              description: calls per hour allowed by the user\n              schema:\n                title: header 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      security:\n      - petstore_auth:\n        - write:pets\n        - read:pets\n      requestBody:\n        \"$ref\": \"#/components/requestBodies/requestBody1\"\n        description: user to add to the system\n        required: true\n        content:\n          'application/json':\n            schema:\n              $ref: \"#/components/schemas/User\"\n            examples:\n              user:\n                summary: User Example\n                externalValue: 'http://foo.bar/examples/user-example.json'\n          'application/xml':\n            schema:\n              $ref: \"#/components/schemas/User\"\n            examples:\n              user:\n                summary: User Example in XML\n                externalValue: 'http://foo.bar/examples/user-example.xml'\n          'text/plain':\n            examples:\n              user:\n                summary: User example in text plain format\n                externalValue: 'http://foo.bar/examples/user-example.txt'\n          '*/*':\n            examples:\n              user:\n                summary: User example in other format\n                externalValue: 'http://foo.bar/examples/user-example.whatever'\n    servers:\n    - url: http://petstore.swagger.io/v2\n    parameters:\n    - name: status\n      in: query\n      description: Status values that need to be considered for filter\n      required: true\n      schema:\n        type: array\n        items:\n          type: string\n          enum:\n          - available\n          - pending\n          - sold\n          default: available\n    - \"$ref\": \"#/components/parameters/skipParam\"\n    put:\n      tags:\n      - pet\n      summary: Update an existing pet\n      description: ''\n      operationId: updatePet\n      parameters: []\n      responses:\n        '400':\n          description: A complex object array response\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/VeryComplexType\"\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      requestBody:\n        \"$ref\": \"#/components/requestBodies/requestBody1\"\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        example: \"example\"\n        schema:\n          title: title test\n          format: int64\n          minimum: 1\n          maximum: 10\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                enum:\n                - clueless\n                - lazy\n                - adventurous\n                - aggressive\n          xml:\n            namespace: http://example.com/schema/sample\n            prefix: sample\n          enum:\n          - available\n          - pending\n          - sold\n          type: object\n          properties:\n            id:\n              type: integer\n              format: int64\n            name:\n              type: string\n              xml:\n                namespace: http://inside/properties/schema\n                prefix: inside properties schema\n          required:\n          - name\n          - pet\n          example:\n            name: Puma\n            id: 1\n          externalDocs:\n            description: External Docs Inside Schema\n            url: http://swagger.io inside Schema\n          items:\n            type: string\n            enum:\n            - available\n            - pending\n            - sold\n            default: available\n        content:\n          'application/json':\n            schema:\n              type: array\n              items:\n                type: string\n            example: example string\n            examples:\n              list:\n                summary: List of Names\n                value:\n                  - Bob\n                  - Diane\n                  - Mary\n                  - Bill\n              empty:\n                summary: Empty\n                value: {}\n            encoding:\n              historyMetadata:\n                # require XML Content-Type in utf-8 encoding\n                contentType: application/xml; charset=utf-8\n              profileImage:\n                # only accept png/jpeg\n                contentType: image/png, image/jpeg\n                headers:\n                  X-Rate-Limit:\n                    description: calls per hour allowed by the user\n                    schema:\n                      type: integer\n                      format: int32\n          'application/xml':\n            examples:\n              list:\n                summary: List of names\n                value: \"<Users><User name='Bob'/><User name='Diane'/><User name='Mary'/><User name='Bill'/></Users>\"\n              empty:\n                summary: Empty list\n                value: \"<Users/>\"\n          'text/plain':\n            examples:\n              list:\n                summary: List of names\n                value: \"Bob,Diane,Mary,Bill\"\n              empty:\n                summary: Empty\n                value: \"\"\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/xml:\n              schema:\n                type: array\n                items:\n                  \"$ref\": \"#/components/schemas/Pet\"\n            application/json:\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      requestBody:\n        description: pet store to add to the system\n        required: true\n        content:\n          multipart/mixed:\n            schema:\n              type: object\n              properties:\n                id:\n                  # default is text/plain\n                  type: string\n                  format: uuid\n                address:\n                  # default is application/json\n                  type: object\n                  properties: {}\n                historyMetadata:\n                  # need to declare XML format!\n                  description: metadata in XML format\n                  type: object\n                  properties: {}\n                profileImage:\n                  # default is application/octet-stream, need to declare an image type only!\n                  type: string\n                  format: binary\n            encoding:\n              historyMetadata:\n                # require XML Content-Type in utf-8 encoding\n                contentType: application/xml; charset=utf-8\n              profileImage:\n                # only accept png/jpeg\n                contentType: image/png, image/jpeg\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      callbacks:\n        mainHook:\n          '$request.body#/url':\n            post:\n              responses:\n                '200':\n                  description: webhook successfully processed operation\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\n        tag1, tag2, tag3 for testing.\n      operationId: findPetsByTags\n      parameters:\n      - name: tags\n        in: query\n        description: Tags to filter by\n        required: true\n        schema:\n          type: array\n          items:\n            type: string\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/xml:\n              schema:\n                type: array\n                items:\n                  \"$ref\": \"#/components/schemas/Pet\"\n            application/json:\n              schema:\n                type: array\n                items:\n                  \"$ref\": \"#/components/schemas/Pet\"\n        '400':\n          description: Invalid tag value\n      callbacks:\n        mainHook:\n          '$ref': \"#/components/callbacks/failed\"\n      security:\n      - petstore_auth:\n        - write:pets\n        - read:pets\n      deprecated: true\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        schema:\n          type: integer\n          format: int64\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/xml:\n              schema:\n                \"$ref\": \"#/components/schemas/Pet\"\n            application/json:\n              schema:\n                \"$ref\": \"#/components/schemas/Pet\"\n        '400':\n          description: Invalid ID supplied\n        '404':\n          description: Pet not found\n      callbacks:\n        mainHook:\n          '$request.body#/url':\n            post:\n              responses:\n                '200':\n                  description: successful operation\n                  content:\n                    application/xml:\n                      schema:\n                        \"$ref\": \"#/components/schemas/Pet\"\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                  required: false\n                status:\n                  description: Updated status of the pet\n                  type: string\n                  required: false\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      - 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 ID supplied\n        '404':\n          description: Pet not found\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  \"/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      parameters: []\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      parameters: []\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/xml:\n              schema:\n                \"$ref\": \"#/components/schemas/Order\"\n            application/json:\n              schema:\n                \"$ref\": \"#/components/schemas/Order\"\n        '400':\n          description: Invalid Order\n      requestBody:\n        content:\n          application/json:\n            description: order placed for purchasing the pet\n            schema:\n              \"$ref\": \"#/components/schemas/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 >= 1 and <= 10. Other\n        values 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: 10\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/xml:\n              schema:\n                \"$ref\": \"#/components/schemas/Order\"\n            application/json:\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: For valid response try integer IDs with positive integer value.\n        Negative or non-integer values 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: integer\n          format: int64\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      parameters: []\n      responses:\n        default:\n          description: successful operation\n      requestBody:\n        content:\n          application/json:\n            description: Created user object\n            schema:\n              \"$ref\": \"#/components/schemas/User\"\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      parameters: []\n      responses:\n        default:\n          description: successful operation\n      requestBody:\n        \"$ref\": \"#/components/requestBodies/requestBody2\"\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      parameters: []\n      responses:\n        default:\n          description: successful operation\n      requestBody:\n        \"$ref\": \"#/components/requestBodies/requestBody2\"\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          format: password\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/xml:\n              schema:\n                type: string\n            application/json:\n              schema:\n                type: string\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      parameters: []\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      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/xml:\n              schema:\n                \"$ref\": \"#/components/schemas/User\"\n            application/json:\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        '400':\n          description: Invalid user supplied\n        '404':\n          description: User not found\n      requestBody:\n        content:\n          application/json:\n            description: Updated user object\n            schema:\n              \"$ref\": \"#/components/schemas/User\"\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\nexternalDocs:\n  description: Find out more about Swagger\n  url: http://swagger.io\ncomponents:\n  schemas:\n    VeryComplexType:\n      type: integer\n      format: int32\n    ExtendedErrorModel:\n      allOf:\n      - type: object\n        required:\n        - rootCause\n        properties:\n          rootCause:\n            type: string\n            \"$ref\": \"#/components/schemas/Category\"\n    Order:\n      type: object\n      not:\n        type: integer\n        format: int32\n      additionalProperties:\n        type: integer\n      properties:\n        id:\n          type: integer\n          format: int64\n        petId:\n          type: integer\n          format: int64\n        quantity:\n          type: integer\n          format: int32\n        shipDate:\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          type: boolean\n          default: false\n      xml:\n        name: Order\n    OrderRef:\n      type: object\n      not:\n        type: integer\n        format: int32\n        \"$ref\": \"#/components/schemas/Category\"\n      additionalProperties:\n        type: integer\n        \"$ref\": \"http://localhost:${dynamicPort}/remote/schema#/components/schemas/User\"\n      properties:\n        id:\n          type: integer\n          format: int64\n        petId:\n          type: integer\n          format: int64\n        quantity:\n          type: integer\n          format: int32\n        shipDate:\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          type: boolean\n          default: false\n      xml:\n        name: Order\n    Category:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Category\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          format: int32\n          description: User Status\n      xml:\n        name: User\n    Tag:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Tag\n    Pet:\n      type: object\n      required:\n      - name\n      - photoUrls\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          \"$ref\": \"#/components/schemas/Category\"\n        user:\n          type: string\n          example: doggie\n          \"$ref\": \"http://localhost:${dynamicPort}/remote/schema#/components/schemas/User\"\n        photoUrls:\n          type: array\n          xml:\n            name: photoUrl\n            wrapped: true\n          items:\n            type: string\n        tags:\n          type: array\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      xml:\n        name: Pet\n    ApiResponse:\n      type: object\n      required:\n      - name\n      - photoUrls\n      properties:\n        code:\n          type: integer\n          format: int32\n        type:\n          type: string\n        message:\n          type: string\n  responses:\n    Found:\n      description: Entity not found.\n      \"$ref\": \"http://localhost:${dynamicPort}/remote/response#/responses/NotFound\"\n    NotFound:\n      description: Entity not found.\n    IllegalInput:\n        description: Illegal input for operation.\n    GeneralError:\n      description: General Error\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/ExtendedErrorModel\"\n  parameters:\n    refParam:\n      \"$ref\": \"#/components/parameters/limitParam/\"\n    newParam:\n      name: skip\n      in: query\n      description: number of items to skip\n      required: true\n      schema:\n        type: integer\n        format: int32\n        \"$ref\": \"#/components/schemas/Tag\"\n    skipParam:\n      name: skip\n      in: query\n      description: number of items to skip\n      required: true\n      schema:\n        type: integer\n        format: int32\n    limitParam:\n      name: limit\n      in: query\n      description: max records to return\n      required: true\n      schema:\n        type: integer\n        format: int32\n  examples:\n    cat:\n      summary: An example of a cat\n      value:\n        name: Fluffy\n        petType: Cat\n        color: White\n        gender: male\n        breed: Persian\n    dog:\n      summary: An example of a dog with a cat's name\n      value:\n        name: Puma\n        petType: Dog\n        color: Black\n        gender: Female\n        breed: Mixed\n    frog:\n      $ref: \"#/components/examples/cat\"\n  requestBodies:\n    requestBody1:\n      description: request body in components\n      content:\n        application/json:\n          description: Pet object that needs to be added to the store\n          schema:\n            \"$ref\": \"#/components/schemas/Pet\"\n        application/xml:\n          description: Pet object that needs to be added to the store\n          schema:\n            \"$ref\": \"#/components/schemas/Pet\"\n    requestBody2:\n      content:\n        application/json:\n          description: List of user object\n          schema:\n            type: array\n            items:\n              \"$ref\": \"#/components/schemas/User\"\n    requestBody3:\n      \"$ref\": \"#/components/requestBodies/requestBody2\"\n  securitySchemes:\n    reference:\n      \"$ref\": \"#/components/securitySchemes/api_key\"\n    petstore_auth:\n      type: oauth2\n      flows:\n        implicit:\n          authorizationUrl: http://petstore.swagger.io/oauth/dialog\n          scopes:\n            write:pets: modify pets in your account\n            read:pets: read your pets\n    api_key:\n      type: apiKey\n      name: api_key\n      in: header\n  headers:\n    X-Ref-Limit-Limit:\n      \"$ref\": \"#/components/headers/X-Rate-Limit-Reset\"\n    X-Rate-Limit-Limit:\n      description: The number of allowed requests in the current period\n      schema:\n        type: integer\n      example: \"This is a header example\"\n    X-Rate-Limit-Remaining:\n      description: The number of remaining requests in the current period\n      schema:\n        type: integer\n        \"$ref\": \"http://localhost:${dynamicPort}/remote/schema#/components/schemas/User\"\n    X-Rate-Limit-Reset:\n      description: The number of seconds left in the current period\n      schema:\n        type: integer\n  links:\n    referenced:\n      \"$ref\": \"#/components/links/unsubscribe\"\n    unsubscribe:\n      operationId: cancelHookCallback\n      parameters:\n        id: $response.body#/hookId\n      x-link: link extension\n  callbacks:\n    referenced:\n      \"$ref\": \"#/components/callbacks/failed\"\n    heartbeat:\n      '$request.query.heartbeat-url':\n        post:\n          requestBody:\n            $ref: \"#/components/requestBodies/requestBody3\"\n          responses:\n            '200':\n              description: Consumer acknowledged the callback\n    failed:\n      '$response.body#/failedUrl':\n        post:\n          requestBody:\n            $ref: \"#/components/requestBodies/requestBody3\"\n          responses:\n            '200':\n              description: Consumer acknowledged the callback failed\n    success:\n      '$response.body#/successUrl':\n        post:\n          requestBody:\n            $ref: \"#/components/requestBodies/requestBody1\"\n          responses:\n            '200':\n              description: Consumer acknowledged the callback\n  x-component:\n  - url: http://component.swagger.io/v2/swagger.json\n    format: OAS\n    version: '3.0'\n    converter:\n      url: https://github.com/mermade/oas3\n      version: 1.2.3\n  x-api-title: pet store test api in components\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/oas3_2.yaml",
    "content": "openapi: 3.0.0\nservers:\n- url: http://petstore.swagger.io/api\n- url: https://development.gigantic-server.com/api\n  description: Development server\n- url: https://{username}.gigantic-server.com:{port}/{basePath}\n  x-server: server extension\n  description: The production API server\n  variables:\n      username:\n        # note! no enum here means it is an open value\n        default: demo\n        description: this value is assigned by the service provider, in this example `gigantic-server.com`\n      port:\n        enum:\n          - 8443\n          - 443\n        default: 8443\n      basePath:\n        # open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`\n        default: v2\n        description: testing overwriting\n        enum:\n          - 2222\n          - 333\nx-origin:\n- url: http://petstore.swagger.io/v2/swagger.json\n  format: swagger\n  version: '2.0'\n  converter:\n    url: https://github.com/mermade/swagger2openapi\n    version: 1.2.1\nx-api-title: pet store test api\nsecurity:\n  - api_key: []\n  - tokenAuth: []\ninfo:\n  description: 'This is a sample server Petstore'\n  version: 1.0.0\n  title: testing source file\n  termsOfService: http://swagger.io/terms/\n  x-info: info extension\n  contact:\n    name: API Support\n    url: http://www.example.com/support\n    email: support@example.com\n    x-contact: contact extension\n  license:\n    name: Apache 2.0\n    url: http://www.apache.org/licenses/LICENSE-2.0.html\n    x-license: license extension\ntags:\n- name: pet\n  description: Everything about your Pets\n  externalDocs:\n    description: Find out more\n    url: http://swagger.io\n- name: store\n  description: Access to Petstore orders\n- name: user\n  description: Operations about user\n  externalDocs:\n    description: Find out more about our store\n    url: http://swagger.io\npaths:\n  \"/pet\":\n    summary: summary\n    description: description\n    post:\n      x-swagger-router-controller: TestController\n      externalDocs:\n        description: Find out more\n        url: http://swagger.io\n      tags:\n      - pet\n      summary: Add a new pet to the store\n      description: ''\n      operationId: addPet\n      parameters: []\n      responses:\n        '200':\n          description: party time!\n          content:\n            \"application/json\":\n              schema:\n                \"$ref\": \"#/components/schemas/Dog\"\n        '405':\n          description: Invalid input\n          headers:\n            X-Rate-Limit:\n              description: calls per hour allowed by the user\n              schema:\n                title: header 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      security:\n      - petstore_auth:\n        - write:pets\n        - read:pets\n      requestBody:\n        description: user to add to the system\n        required: true\n        content:\n          'application/json':\n            schema:\n              $ref: \"#/components/schemas/Dog\"\n    servers:\n    - url: http://petstore.swagger.io/v2\n    put:\n      tags:\n      - pet\n      summary: Update an existing pet\n      description: ''\n      operationId: updatePet\n      parameters: []\n      responses:\n        '400':\n          description: A complex object array response\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/VeryComplexType\"\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      requestBody:\n        \"$ref\": \"#/components/requestBodies/requestBody1\"\n  \"/producesTest\":\n      get:\n        parameters: []\n        responses:\n          '200':\n            description: it works\n            content:\n              application/json:\n                schema:\n                  type: object\n                  properties:\n                    name:\n                      type: string\n  \"/fileUpload\":\n      post:\n        x-swagger-router-controller: TestController\n        operationId: uploadFile\n        requestBody:\n          content:\n            multipart/form-data:\n              schema:\n                properties:\n                  theFile:\n                    type: string\n                    format: binary\n                  stringMetadata:\n                    type: string\n                  intMetadata:\n                    type: integer\n                    format: int32\n        responses:\n          '200':\n            description: the stringMetadata passed in\n            content:\n              \"*/*\":\n                schema:\n                  type: string\n  \"/primitiveBody/inline\":\n    post:\n      x-swagger-router-controller: TestController\n      operationId: inlineRequiredBody\n      requestBody:\n        content:\n          \"application/json\":\n            schema:\n              type: object\n              properties:\n                name:\n                  type: string\n        required: true\n      responses:\n        '200':\n          description: ok!\n  \"/primitiveBody/string\":\n    post:\n      x-swagger-router-controller: TestController\n      operationId: stringBody\n      requestBody:\n        content:\n          \"application/yaml\":\n            schema:\n              type: string\n        required: false\n      responses:\n        '200':\n          description: ok!\n  \"/primitiveBody/integer\":\n    post:\n      x-swagger-router-controller: TestController\n      operationId: integerBody\n      requestBody:\n        content:\n          \"*/*\":\n            schema:\n              type: integer\n              format: int32\n        required: false\n      responses:\n        '200':\n          description: ok!\n  \"/primitiveBody/binary\":\n    post:\n      x-swagger-router-controller: TestController\n      operationId: binaryBody\n      requestBody:\n        content:\n          application/octet-stream:\n            schema:\n              type: string\n              format: binary\n        required: false\n      responses:\n        '200':\n          description: ok!\n          content:\n            application/octet-stream:\n              schema:\n                type: string\n                format: binary\n  \"/hidden\":\n    get:\n      x-inflector-hidden: true\n      responses:\n        default:\n          description: ok\n  \"/arrayInputTest\":\n    get:\n      x-swagger-router-controller: TestController\n      operationId: arrayInputTest\n      tags:\n      - inputTest\n      parameters:\n      - name: users\n        in: query\n        required: true\n        style: form\n        schema:\n          type: array\n          items:\n            type: string\n      responses:\n        '200':\n          description: success!\n  \"/formTest\":\n    post:\n      operationId: formTest\n      x-swagger-router-controller: TestController\n      requestBody:\n        content:\n          x-www-form-urlencoded:\n            schema:\n              properties:\n                user:\n                  type: string\n      responses:\n        '200':\n          description: success!\n  \"/mockResponses\":\n      get:\n        tags:\n          - mockResponses\n        parameters:\n        - name: user\n          in: query\n          required: true\n          schema:\n            type: string\n        responses:\n          '200':\n            description: success!\n  \"/mockResponses/primitiveFloatResponse\":\n    get:\n      tags:\n        - mockResponses\n      parameters:\n      - name: user\n        in: query\n        required: false\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                type: number\n                format: float\n  \"/mockResponses/primitiveDoubleResponse\":\n    get:\n      tags:\n        - mockResponses\n      parameters:\n      - name: user\n        in: query\n        required: false\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                type: number\n                format: double\n  \"/mockResponses/primitiveStringResponse\":\n    get:\n      tags:\n        - mockResponses\n      parameters:\n      - name: user\n        in: query\n        required: false\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                type: string\n  \"/mockResponses/primitiveStringResponseWithExample\":\n    get:\n      tags:\n        - mockResponses\n      parameters:\n      - name: user\n        in: query\n        required: false\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                type: string\n                example: fun\n  \"/mockResponses/responseWithExamples\":\n    get:\n      tags:\n      - mockResponses\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              examples:\n                application/json:\n                  value: {\"test\":\"jsonvalue\"}\n            application/yaml:\n              examples:\n                application/yaml:\n                  value:\n                    test: yamlvalue\n  \"/mockResponses/primitiveDateResponse\":\n    get:\n      tags:\n        - mockResponses\n      parameters:\n      - name: user\n        in: query\n        required: false\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                type: string\n                format: date\n  \"/mockResponses/primitiveDateTimeResponse\":\n    get:\n      tags:\n        - mockResponses\n      parameters:\n      - name: user\n        in: query\n        required: false\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                type: string\n                format: date-time\n  \"/mockResponses/primitiveBigDecimalResponse\":\n    get:\n      tags:\n        - mockResponses\n      parameters:\n      - name: user\n        in: query\n        required: false\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                type: number\n  \"/mockResponses/primitiveEmailResponse\":\n    get:\n      tags:\n        - mockResponses\n      parameters:\n      - name: user\n        in: query\n        required: false\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                type: string\n                format: email\n  \"/mockResponses/primitiveUUIDResponse\":\n    get:\n      tags:\n        - mockResponses\n      parameters:\n      - name: user\n        in: query\n        required: false\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                type: string\n                format: uuid\n  \"/mockResponses/primitiaveMapResponse\":\n    get:\n      tags:\n        - mockResponses\n      parameters:\n      - name: user\n        in: query\n        required: false\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                type: object\n                additionalProperties:\n                  type: string\n  \"/mockResponses/complexResponse\":\n    get:\n      tags:\n        - mockResponses\n      parameters:\n      - name: user\n        in: query\n        required: false\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                \"$ref\": \"#/components/schemas/Address\"\n  \"/mockResponses/complexResponseWithExample\":\n    get:\n      tags:\n        - mockResponses\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                \"$ref\": \"#/components/schemas/User\"\n  \"/mockResponses/complexArrayResponse\":\n    get:\n      tags:\n      - mockResponses\n      parameters:\n      - name: user\n        in: query\n        required: false\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  \"$ref\": \"#/components/schemas/Address\"\n  \"/mockResponses/complexArrayResponseWithExample\":\n    get:\n      tags:\n        - mockResponses\n      parameters:\n      - name: user\n        in: query\n        required: false\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: \"#/components/schemas/User\"\n  \"/issue-125\":\n      get:\n        parameters: []\n        responses:\n          '200':\n            description: int16\n            content:\n              \"*/*\":\n                schema:\n                  type: integer\n                  format: int16\n  \"/issue-128\":\n    get:\n      responses:\n        '303':\n          description: issue 128\n          content:\n            \"application/json\":\n              schema:\n                type: string\n                format: url\n                example: http://foo.bar/other\n  \"/issue-130\":\n    get:\n      responses:\n        '200':\n          description: issue 130\n          content:\n            \"application/json\":\n              schema:\n                type: object\n                description: an object with array properties\n                properties:\n                  aStringArray:\n                    type: array\n                    items:\n                      type: string\n                      example: a string value\n                  anIntegerArray:\n                    type: array\n                    items:\n                      type: integer\n                      format: int32\n                      example: 99\n  \"/issue-132\":\n    get:\n      responses:\n        '303':\n          description: issue 132\n          headers:\n            Location:\n              schema:\n                type: string\n                format: url\n              example: 'http://foo.bar/other'\n              description: URI of the entity affected by the property change\n  \"/issue-132.2\":\n    get:\n      responses:\n        '303':\n          description: issue 133, alternate example\n          headers:\n            _links:\n              description: array of locations\n              schema:\n                type: array\n                items:\n                  type: string\n                  format: url\n                  example: 'http://foo.bar/other'\n  \"/form\":\n    post:\n      x-swagger-router-controller: TestController\n      operationId: postFormData\n      requestBody:\n        content: {}\n      responses:\n        '200':\n          description: ok\n  \"/goodbye\":\n    get:\n      operationId: goodbye\n      x-swagger-router-controller: TestController\n      parameters:\n      - name: happy\n        in: query\n        required: true\n        style: form\n        schema:\n          type: array\n          items:\n            type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            application/json:\n              schema:\n                \"$ref\": \"#/components/schemas/User\"\n  \"/hello\":\n    get:\n      tags:\n      - test1\n      operationId: testMe\n      parameters:\n      - name: limit\n        in: query\n        required: true\n        schema:\n          minimum: 0\n          type: integer\n          format: int32\n      - name: min\n        in: query\n        required: true\n        schema:\n          minimum: 10\n          type: integer\n          format: int32\n      responses:\n        '200':\n          description: fun!\n          content:\n            application/json:\n              schema:\n                type: string\n  \"/withModelArray/{id}\":\n    post:\n      operationId: withModelArray\n      x-swagger-router-controller: TestController\n      parameters:\n      - name: id\n        in: path\n        required: true\n        schema:\n          type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: array\n              items:\n                $ref: \"#/components/schemas/Address\"\n        required: true\n      responses:\n        '200':\n          description: success!\n          content:\n            \"application/json\":\n              schema:\n                \"$ref\": \"#/components/schemas/Animal\"\n  \"/withModel/{id}\":\n    get:\n      tags:\n        - test2\n      operationId: withModel\n      x-swagger-router-controller: TestController\n      parameters:\n      - name: id\n        in: path\n        required: true\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            \"*/*\":\n              schema:\n                \"$ref\": \"#/components/schemas/Animal\"\n    post:\n      tags:\n        - test2\n      operationId: withModel\n      x-swagger-router-controller: TestController\n      parameters:\n      - name: id\n        in: path\n        required: true\n        schema:\n          type: string\n      requestBody:\n        content:\n          \"*/*\":\n            schema:\n              \"$ref\": \"#/components/schemas/Address\"\n        required: false\n      responses:\n        '200':\n          description: success!\n          content:\n            \"*/*\":\n              schema:\n                \"$ref\": \"#/components/schemas/Address\"\n  \"/withInvalidComposedModel\":\n    post:\n      operationId: withInvalidComposedModel\n      x-swagger-router-controller: TestController\n      requestBody:\n        content:\n          \"*/*\":\n            schema:\n              \"$ref\": \"#/components/schemas/ExtendedAddress\"\n        required: false\n      responses:\n        '200':\n          description: success!\n  \"/withValidComposedModel\":\n    post:\n      operationId: withValidComposedModel\n      x-swagger-router-controller: TestController\n      requestBody:\n        content:\n          \"application/json\":\n            schema:\n              \"$ref\": \"#/components/schemas/ExtendedAddress\"\n        required: false\n      responses:\n        '200':\n          description: success!\n  \"/withInvalidComposedModelArray\":\n    post:\n      operationId: withInvalidComposedModelArray\n      x-swagger-router-controller: TestController\n      requestBody:\n        content:\n          \"*/*\":\n            schema:\n              type: array\n              items:\n                $ref: \"#/components/schemas/ExtendedAddress\"\n        required: false\n      responses:\n        '200':\n          description: success!\n  \"/unmappedWithModel/{id}\":\n    post:\n      tags:\n      - test2\n      operationId: unmappedWithModelInput\n      x-swagger-router-controller: TestController\n      parameters:\n      - name: id\n        in: path\n        required: true\n        schema:\n          type: string\n      requestBody:\n        content:\n          \"application/json\":\n            schema:\n              \"$ref\": \"#/components/schemas/Address\"\n        required: false\n      responses:\n        '200':\n          description: success!\n          content:\n            \"application/json\":\n              schema:\n                \"$ref\": \"#/components/schemas/Address\"\n  \"/mappedWithDefinedModel/{id}\":\n    post:\n      tags:\n      - test2\n      operationId: mappedWithDefinedModel\n      x-swagger-router-controller: TestController\n      parameters:\n      - name: id\n        in: path\n        required: true\n        schema:\n          type: string\n      requestBody:\n        content:\n          \"application/json\":\n            schema:\n              \"$ref\": \"#/components/schemas/Dog\"\n        required: false\n      responses:\n        '200':\n          description: success!\n          content:\n            \"application/json\":\n              schema:\n                \"$ref\": \"#/components/schemas/Dog\"\n  \"/unmappedWithUndefinedModel/{id}\":\n    post:\n      tags:\n      - test2\n      operationId: unmappedWithUndefinedModel\n      x-swagger-router-controller: TestController\n      parameters:\n      - name: id\n        in: path\n        required: true\n        schema:\n          type: string\n      requestBody:\n        content:\n          \"application/json\":\n            schema:\n              \"$ref\": \"#/components/schemas/UnmappedModel\"\n        required: false\n      responses:\n        '200':\n          description: success!\n  \"/withPath/{id}\":\n    get:\n      tags:\n      - test1\n      operationId: withPath\n      x-swagger-router-controller: TestController\n      parameters:\n      - name: id\n        in: path\n        required: true\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            \"*/*\":\n              schema:\n                \"$ref\": \"#/components/schemas/User\"\n  \"/withDate/{date}\":\n    get:\n      tags:\n      - test1\n      operationId: withDateTime\n      x-swagger-router-controller: TestController\n      parameters:\n      - name: date\n        in: path\n        required: true\n        schema:\n          type: string\n          format: date-time\n      responses:\n        '200':\n          description: success!\n          content:\n            \"application/json\":\n              schema:\n                \"$ref\": \"#/components/schemas/User\"\n  \"/withIntegerEnum/{stage}\":\n    get:\n      tags:\n        - test1\n      operationId: withDateTime\n      x-swagger-router-controller: TestController\n      parameters:\n      - name: stage\n        in: path\n        required: true\n        schema:\n          type: integer\n          format: int64\n          enum:\n          - 2147483647\n          - 3147483647\n          - 31474836475505055\n          - -9223372036854775808\n      responses:\n        '200':\n          description: success!\n          content:\n            \"*/*\":\n              schema:\n                \"$ref\": \"#/components/schemas/User\"\n  \"/overloaded\":\n    get:\n      tags:\n      - overloaded\n      operationId: overloadedResponse\n      x-swagger-router-controller: TestController\n      parameters:\n      - name: arg1\n        in: query\n        schema:\n          type: string\n      responses:\n        '200':\n          description: success!\n          content:\n            \"*/*\":\n              schema:\n                \"$ref\": \"#/components/schemas/User\"\n  \"/throwApiException\":\n    get:\n      tags:\n      - throw\n      operationId: throwApiException\n      x-swagger-router-controller: TestController\n      responses:\n        '200':\n          description: success!\n  \"/throwApiExceptionAsCause\":\n    get:\n      tags:\n      - throw\n      operationId: throwApiExceptionAsCause\n      x-swagger-router-controller: TestController\n      responses:\n        '200':\n          description: success!\n  \"/throwNonApiException\":\n    get:\n      tags:\n      - throw\n      operationId: throwNonApiException\n      x-swagger-router-controller: TestController\n      responses:\n        '200':\n          description: success!\n  \"/returnNonRfc2616Status\":\n    get:\n      tags:\n        - throw\n      operationId: returnNonRfc2616Status\n      x-swagger-router-controller: TestController\n      responses:\n        '200':\n          description: success!\n  \"/responseHeaders\":\n    get:\n      tags:\n        - response\n      operationId: returnWithResponseHeaders\n      x-swagger-router-controller: TestController\n      responses:\n        '200':\n          description: success\nexternalDocs:\n  description: Find out more about Swagger\n  url: http://swagger.io\ncomponents:\n  schemas:\n    Water:\n      properties:\n        clear:\n          type: boolean\n        name:\n          type: string\n        prices:\n          type: array\n        id:\n          type: string\n          format: uuid\n    ExtendedAddress:\n      type: object\n      x-swagger-router-model: io.swagger.oas.test.models.ExtendedAddress\n      allOf:\n        - $ref: \"#/components/schemas/Address\"\n        - type: object\n          required:\n          - gps\n          properties:\n            gps:\n              type: string\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      description: the name!\n      example: |\n            {\n              \"foo\":\"bar\"\n            }\n    Address:\n      required:\n      - street\n      type: object\n      x-swagger-router-model: io.swagger.oas.test.models.Address\n      properties:\n        street:\n          type: string\n          example: 12345 El Monte Road\n        city:\n          type: string\n          example: Los Altos Hills\n        state:\n          type: string\n          example: CA\n        zip:\n          type: string\n          example: '94022'\n    UnmappedModel:\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n    Animal:\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n        address:\n          \"$ref\": \"#/components/schemas/Address\"\n      description: the name!\n    Dog:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n        dogType:\n          type: string\n    VeryComplexType:\n      type: integer\n      format: int32\n    ExtendedErrorModel:\n      allOf:\n      - type: object\n        required:\n        - rootCause\n        properties:\n          rootCause:\n            type: string\n            \"$ref\": \"#/components/schemas/Category\"\n    Order:\n      type: object\n      not:\n        type: integer\n        format: int32\n      additionalProperties:\n        type: integer\n      properties:\n        id:\n          type: integer\n          format: int64\n        petId:\n          type: integer\n          format: int64\n        quantity:\n          type: integer\n          format: int32\n        shipDate:\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          type: boolean\n          default: false\n      xml:\n        name: Order\n    Category:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Category\n    Tag:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Tag\n    Pet:\n      type: object\n      required:\n      - name\n      - photoUrls\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          \"$ref\": \"#/components/schemas/Category\"\n        user:\n          type: string\n          example: doggie\n        photoUrls:\n          type: array\n          xml:\n            name: photoUrl\n            wrapped: true\n          items:\n            type: string\n        tags:\n          type: array\n          xml:\n            name: tag\n            wrapped: true\n        status:\n          type: string\n          description: pet status in the store\n          enum:\n          - available\n          - pending\n          - sold\n      xml:\n        name: Pet\n    ApiResponse:\n      type: object\n      required:\n      - name\n      - photoUrls\n      properties:\n        code:\n          type: integer\n          format: int32\n        type:\n          type: string\n        message:\n          type: string\n  responses:\n    NotFound:\n      description: Entity not found.\n    IllegalInput:\n      description: Illegal input for operation.\n      headers:\n        X-Ref-Limit-Limit:\n          \"$ref\": \"#/components/headers/X-Rate-Limit-Reset\"\n      links:\n        address:\n          \"$ref\": \"#/components/links/unsubscribe\"\n    GeneralError:\n      description: General Error\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/ExtendedErrorModel\"\n  parameters:\n    contentParameter:\n      in: query\n      name: coordinates\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/ExtendedErrorModel\"\n      examples:\n        cat:\n          summary: An example of a cat\n          value:\n            name: Fluffy\n            petType: Cat\n            color: White\n            gender: male\n            breed: Persian\n    refParam:\n      \"$ref\": \"#/components/parameters/limitParam\"\n    newParam:\n      name: skip\n      in: query\n      description: number of items to skip\n      required: true\n      schema:\n        type: integer\n        format: int32\n        \"$ref\": \"#/components/schemas/Tag\"\n    skipParam:\n      name: skip\n      in: query\n      description: number of items to skip\n      required: true\n      schema:\n        type: integer\n        format: int32\n    limitParam:\n      name: limit\n      in: query\n      description: max records to return\n      required: true\n      schema:\n        type: integer\n        format: int32\n  examples:\n    cat:\n      summary: An example of a cat\n      value:\n        name: Fluffy\n        petType: Cat\n        color: White\n        gender: male\n        breed: Persian\n    dog:\n      summary: An example of a dog with a cat's name\n      value:\n        name: Puma\n        petType: Dog\n        color: Black\n        gender: Female\n        breed: Mixed\n    frog:\n      $ref: \"#/components/examples/cat\"\n  requestBodies:\n    requestBody1:\n      description: request body in components\n      content:\n        application/json:\n          description: Pet object that needs to be added to the store\n          schema:\n            \"$ref\": \"#/components/schemas/Pet\"\n        application/xml:\n          description: Pet object that needs to be added to the store\n          schema:\n            \"$ref\": \"#/components/schemas/Pet\"\n    requestBody2:\n      content:\n        application/json:\n          description: List of user object\n          schema:\n            type: array\n            items:\n              \"$ref\": \"#/components/schemas/User\"\n    requestBody3:\n      \"$ref\": \"#/components/requestBodies/requestBody2\"\n  securitySchemes:\n    reference:\n      \"$ref\": \"#/components/securitySchemes/api_key\"\n    petstore_auth:\n      type: oauth2\n      flows:\n        implicit:\n          authorizationUrl: http://petstore.swagger.io/oauth/dialog\n          scopes:\n            write:pets: modify pets in your account\n            read:pets: read your pets\n    api_key:\n      type: apiKey\n      name: api_key\n      in: header\n  headers:\n    X-Ref-Limit-Limit:\n      \"$ref\": \"#/components/headers/X-Rate-Limit-Reset\"\n    X-Rate-Limit-Limit:\n      description: The number of allowed requests in the current period\n      schema:\n        type: integer\n      example: \"This is a header example\"\n    X-Rate-Limit-Remaining:\n      description: The number of remaining requests in the current period\n      schema:\n        type: integer\n    X-Rate-Limit-Reset:\n      description: The number of seconds left in the current period\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/ExtendedErrorModel\"\n      examples:\n        dog:\n          $ref: \"#/components/examples/dog\"\n  links:\n    referenced:\n      \"$ref\": \"#/components/links/unsubscribe\"\n    unsubscribe:\n      operationId: cancelHookCallback\n      parameters:\n        id: $response.body#/hookId\n      x-link: link extension\n  callbacks:\n    referenced:\n      '$response.body#/failedUrl':\n        \"$ref\": \"#/components/callbacks/failed\"\n    heartbeat:\n      '$request.query.heartbeat-url':\n        post:\n          requestBody:\n            $ref: \"#/components/requestBodies/requestBody3\"\n          responses:\n            '200':\n              description: Consumer acknowledged the callback\n    failed:\n      '$response.body#/failedUrl':\n        post:\n          requestBody:\n            $ref: \"#/components/requestBodies/requestBody3\"\n          responses:\n            '200':\n              description: Consumer acknowledged the callback failed\n    success:\n      '$response.body#/successUrl':\n        post:\n          requestBody:\n            $ref: \"#/components/requestBodies/requestBody1\"\n          responses:\n            '200':\n              description: Consumer acknowledged the callback\n  x-component:\n  - url: http://component.swagger.io/v2/swagger.json\n    format: OAS\n    version: '3.0'\n    converter:\n      url: https://github.com/mermade/oas3\n      version: 1.2.3\n  x-api-title: pet store test api in components\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/paramAndResponseRef.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"title\": \"Petstore Sample API\",\n  \"info\": {\n    \"description\": \"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification\",\n    \"title\": \"Petstore Sample API\",\n    \"contact\": {\n      \"name\": \"Swagger API Team\"\n    },\n    \"license\": {\n      \"name\": \"MIT\",\n      \"url\": \"http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT\"\n    }\n  },\n  \"tags\": [\n    {\n      \"name\": \"pet\",\n      \"description\": \"Everything about your Pets\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    },\n    {\n      \"name\": \"user\",\n      \"description\": \"Operations about user\"\n    },\n    {\n      \"name\": \"store\",\n      \"description\": \"Access to Petstore orders\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    }\n  ],\n  \"host\": \"petstore.swagger.io\",\n  \"basePath\": \"/api\",\n  \"paths\": {\n    \"/pet\": {\n      \"parameters\": [\n        {\n          \"name\": \"body\",\n          \"in\": \"body\",\n          \"description\": \"Pet object that needs to be added to the store\",\n          \"required\": false,\n          \"schema\": {\n            \"$ref\": \"#/definitions/Pet\"\n          }\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to fetch\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"found it\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"in\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"$ref\": \"http://my.company.com/responses/errors.json#/method-not-allowed\"\n          },\n          \"404\": {\n            \"$ref\": \"http://my.company.com/responses/errors.json#/not-found\"\n          },\n          \"400\": {\n            \"description\": \"Bad request\"\n          }\n        }\n      }\n    }\n  },\n  \"definitions\": {\n    \"User\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Category\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Pet\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"tags\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"status\": {\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"photoUrls\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    },\n    \"Tag\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"orderTag\": {\n          \"$ref\": \"#/definitions/OrderTag\"\n        },\n        \"tag\": {\n          \"$ref\": \"#/definitions/Tag\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"status\": {\n          \"type\": \"string\"\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        }\n      }\n    },\n    \"NoPropertiesModel\": {\n    },\n    \"OrderTag\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/paramAndResponseRefArray.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"title\": \"Petstore Sample API\",\n  \"info\": {\n    \"description\": \"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification\",\n    \"title\": \"Petstore Sample API\",\n    \"contact\": {\n      \"name\": \"Swagger API Team\"\n    },\n    \"license\": {\n      \"name\": \"MIT\",\n      \"url\": \"http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT\"\n    }\n  },\n  \"tags\": [\n    {\n      \"name\": \"pet\",\n      \"description\": \"Everything about your Pets\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    },\n    {\n      \"name\": \"user\",\n      \"description\": \"Operations about user\"\n    },\n    {\n      \"name\": \"store\",\n      \"description\": \"Access to Petstore orders\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    }\n  ],\n  \"host\": \"petstore.swagger.io\",\n  \"basePath\": \"/api\",\n  \"paths\": {\n    \"/pet\": {\n      \"parameters\": [\n        {\n          \"name\": \"body\",\n          \"in\": \"body\",\n          \"description\": \"Pet object that needs to be added to the store\",\n          \"required\": false,\n          \"schema\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          }\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to fetch\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"found it\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"in\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"$ref\": \"http://my.company.com/responses/errors.json#/method-not-allowed\"\n          },\n          \"404\": {\n            \"$ref\": \"http://my.company.com/responses/errors.json#/not-found\"\n          },\n          \"400\": {\n            \"description\": \"Bad request\"\n          }\n        }\n      }\n    }\n  },\n  \"definitions\": {\n    \"User\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Category\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Pet\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"tags\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"status\": {\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"photoUrls\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    },\n    \"Tag\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"status\": {\n          \"type\": \"string\"\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/paramAndResponseRefComposed.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"title\": \"Petstore Sample API\",\n  \"info\": {\n    \"description\": \"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification\",\n    \"title\": \"Petstore Sample API\",\n    \"contact\": {\n      \"name\": \"Swagger API Team\"\n    },\n    \"license\": {\n      \"name\": \"MIT\",\n      \"url\": \"http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT\"\n    }\n  },\n  \"tags\": [\n    {\n      \"name\": \"pet\",\n      \"description\": \"Everything about your Pets\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    },\n    {\n      \"name\": \"user\",\n      \"description\": \"Operations about user\"\n    },\n    {\n      \"name\": \"store\",\n      \"description\": \"Access to Petstore orders\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    }\n  ],\n  \"host\": \"petstore.swagger.io\",\n  \"basePath\": \"/api\",\n  \"paths\": {\n    \"/pet\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet to fetch\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"found it\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"in\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": false,\n            \"schema\": {\n              \"allOf\": [\n                {\n                  \"$ref\": \"#/definitions/User\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Pet\"\n                },\n                {\n                  \"properties\": {\n                    \"id2\": {\n                      \"type\": \"integer\",\n                      \"format\": \"int32\"\n                    }\n                  }\n                }\n              ]\n            }\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"$ref\": \"http://my.company.com/responses/errors.json#/method-not-allowed\"\n          },\n          \"404\": {\n            \"$ref\": \"http://my.company.com/responses/errors.json#/not-found\"\n          },\n          \"400\": {\n            \"description\": \"Bad request\"\n          }\n        }\n      }\n    }\n  },\n  \"definitions\": {\n    \"User\": {\n      \"properties\": {\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Category\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Pet\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"tags\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"status\": {\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"photoUrls\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    },\n    \"Tag\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"status\": {\n          \"type\": \"string\"\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/pathRef.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"title\": \"Petstore Sample API\",\n  \"info\": {\n    \"description\": \"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification\",\n    \"title\": \"Petstore Sample API\",\n    \"contact\": {\n      \"name\": \"Swagger API Team\"\n    },\n    \"license\": {\n      \"name\": \"MIT\",\n      \"url\": \"http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT\"\n    }\n  },\n  \"tags\": [\n    {\n      \"name\": \"pet\",\n      \"description\": \"Everything about your Pets\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    },\n    {\n      \"name\": \"user\",\n      \"description\": \"Operations about user\"\n    },\n    {\n      \"name\": \"store\",\n      \"description\": \"Access to Petstore orders\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    }\n  ],\n  \"host\": \"petstore.swagger.io\",\n  \"basePath\": \"/api\",\n  \"paths\": {\n    \"/pet\": {\n      \"$ref\": \"http://my.company.com/paths/health.json\"\n    },\n    \"/user\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"in\": \"body\",\n            \"description\": \"Created user object\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ]\n      }\n    }\n  },\n  \"definitions\": {\n    \"User\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Category\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Pet\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"tags\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"status\": {\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"photoUrls\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    },\n    \"Tag\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"status\": {\n          \"type\": \"string\"\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/petstore-3.0-referred-schemas.json",
    "content": "{\n    \"openapi\": \"3.0.1\",\n    \"tags\": [\n        {\n            \"name\": \"pet\",\n            \"description\": \"Everything about your Pets\",\n            \"externalDocs\": {\n                \"description\": \"Find out more\",\n                \"url\": \"http://swagger.io\"\n            }\n        },\n        {\n            \"name\": \"user\",\n            \"description\": \"Operations about user\",\n            \"externalDocs\": {\n                \"description\": \"Find out more\",\n                \"url\": \"http://swagger.io\"\n            }\n        },\n        {\n            \"name\": \"store\",\n            \"description\": \"Access to Petstore orders\",\n            \"externalDocs\": {\n                \"description\": \"Find out more\",\n                \"url\": \"http://swagger.io\"\n            }\n        }\n    ],\n    \"paths\": {\n        \"/pet\": {\n            \"put\": {\n                \"tags\": [\n                    \"pet\"\n                ],\n                \"summary\": \"Update an existing pet\",\n                \"operationId\": \"updatePet\",\n                \"requestBody\": {\n                    \"description\": \"Pet object that needs to be added to the store\",\n                    \"content\": {\n                        \"application/json\": {\n                            \"schema\": {\n                                \"$ref\": \"#/components/schemas/RefName\"\n                            }\n                        }\n                    },\n                    \"required\": true\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            },\n            \"post\": {\n                \"tags\": [\n                    \"pet\"\n                ],\n                \"summary\": \"Add a new pet to the store\",\n                \"operationId\": \"addPet\",\n                \"requestBody\": {\n                    \"description\": \"Pet object that needs to be added to the store\",\n                    \"content\": {\n                        \"application/json\": {\n                            \"schema\": {\n                                \"$ref\": \"#/components/schemas/Pet\"\n                            }\n                        },\n                        \"application/xml\": {\n                            \"schema\": {\n                                \"$ref\": \"#/components/schemas/User\"\n                            }\n                        }\n                    },\n                    \"required\": true\n                },\n                \"responses\": {\n                    \"405\": {\n                        \"description\": \"Invalid input\"\n                    }\n                }\n            }\n        },\n        \"/pet/findByTags\": {\n            \"get\": {\n                \"tags\": [\n                    \"pet\"\n                ],\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                \"parameters\": [\n                    {\n                        \"name\": \"tags\",\n                        \"in\": \"query\",\n                        \"description\": \"Tags to filter by\",\n                        \"required\": true,\n                        \"schema\": {\n                            \"type\": \"string\"\n                        }\n                    }\n                ],\n                \"responses\": {\n                    \"400\": {\n                        \"description\": \"Invalid tag value\"\n                    },\n                    \"default\": {\n                        \"description\": \"Pets matching criteria\",\n                        \"content\": {\n                            \"application/json\": {\n                                \"schema\": {\n                                    \"$ref\": \"#/components/schemas/Order\"\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        },\n        \"/user\": {\n            \"post\": {\n                \"tags\": [\n                    \"user\"\n                ],\n                \"summary\": \"User post\",\n                \"description\": \"User post\",\n                \"operationId\": \"postUser\",\n                \"parameters\": [\n                    {\n                        \"name\": \"body\",\n                        \"in\": \"body\",\n                        \"description\": \"Created user object\",\n                        \"required\": false,\n                        \"schema\": {\n                            \"$ref\": \"#/components/schemas/Order\"\n                        }\n                    }\n                ]\n            }\n        },\n        \"/store\": {\n            \"post\": {\n                \"tags\": [\n                    \"store\"\n                ],\n                \"summary\": \"Store post\",\n                \"description\": \"Store post\",\n                \"operationId\": \"postStore\",\n                \"parameters\": [\n                    {\n                        \"name\": \"body\",\n                        \"in\": \"body\",\n                        \"description\": \"order placed for purchasing the pet\",\n                        \"required\": false,\n                        \"schema\": {\n                            \"$ref\": \"#/components/schemas/Order\"\n                        }\n                    }\n                ]\n            }\n        }\n    },\n    \"components\": {\n        \"schemas\": {\n            \"Category\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int64\"\n                    },\n                    \"name\": {\n                        \"type\": \"string\"\n                    }\n                },\n                \"xml\": {\n                    \"name\": \"Category\"\n                }\n            },\n            \"PetHeader\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int64\"\n                    },\n                    \"name\": {\n                        \"type\": \"string\"\n                    }\n                },\n                \"xml\": {\n                    \"name\": \"PetHeader\"\n                }\n            },\n            \"Tag\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int64\"\n                    },\n                    \"name\": {\n                        \"type\": \"string\"\n                    }\n                },\n                \"xml\": {\n                    \"name\": \"Tag\"\n                }\n            },\n            \"Pet\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int64\"\n                    },\n                    \"category\": {\n                        \"$ref\": \"#/components/schemas/Category\"\n                    },\n                    \"name\": {\n                        \"type\": \"string\"\n                    },\n                    \"photoUrls\": {\n                        \"type\": \"array\",\n                        \"xml\": {\n                            \"wrapped\": true\n                        },\n                        \"items\": {\n                            \"type\": \"string\",\n                            \"xml\": {\n                                \"name\": \"photoUrl\"\n                            }\n                        }\n                    },\n                    \"tags\": {\n                        \"type\": \"array\",\n                        \"xml\": {\n                            \"wrapped\": true\n                        },\n                        \"items\": {\n                            \"$ref\": \"#/components/schemas/Tag\",\n                            \"xml\": {\n                                \"name\": \"tag\"\n                            }\n                        }\n                    },\n                    \"status\": {\n                        \"type\": \"string\",\n                        \"description\": \"pet status in the store\",\n                        \"enum\": [\n                            \"available,pending,sold\"\n                        ]\n                    }\n                },\n                \"xml\": {\n                    \"name\": \"Pet\"\n                }\n            },\n            \"Order\": {\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int32\",\n                        \"properties\" : {\n                            \"nested\" : {\n                                \"$ref\" : \"#/components/schemas/ReferredOrder\"\n                            }\n                        }\n                    },\n                    \"petId\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int32\"\n                    },\n                    \"status\": {\n                        \"type\": \"string\"\n                    },\n                    \"complete\": {\n                        \"type\": \"boolean\"\n                    },\n                    \"quantity\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int32\"\n                    },\n                    \"shipDate\": {\n                        \"type\": \"string\",\n                        \"format\": \"date-time\"\n                    }\n                }\n            },\n            \"ReferredOrder\": {\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int32\",\n                        \"properties\" : {\n                            \"nested\" : {\n                                \"$ref\" : \"#/components/schemas/RefName\"\n                            }\n                        }\n                    }\n                }\n            },\n            \"User\": {\n                \"properties\": {\n                    \"lastName\": {\n                        \"type\": \"string\"\n                    },\n                    \"username\": {\n                        \"type\": \"string\"\n                    },\n                    \"phone\": {\n                        \"type\": \"string\"\n                    },\n                    \"email\": {\n                        \"type\": \"string\"\n                    },\n                    \"userStatus\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int32\"\n                    },\n                    \"firstName\": {\n                        \"type\": \"string\"\n                    },\n                    \"password\": {\n                        \"type\": \"string\"\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/petstore-3.0-v2-ticket-3303.json",
    "content": "{\n  \"openapi\": \"3.0.1\",\n  \"tags\": [\n    {\n      \"name\": \"pet\",\n      \"description\": \"Everything about your Pets\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    },\n    {\n      \"name\": \"user\",\n      \"description\": \"Operations about user\"\n    },\n    {\n      \"name\": \"store\",\n      \"description\": \"Access to Petstore orders\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    }\n  ],\n  \"paths\": {\n    \"/pet/{petId}\": {\n      \"get\": {\n        \"summary\": \"Find pet by ID\",\n        \"description\": \"Returns a pet when 0 < ID <= 10.  ID > 10 or nonintegers will simulate API error conditions\",\n        \"operationId\": \"getPetById\",\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\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            }\n          },\n          {\n            \"name\": \"userId\",\n            \"in\": \"path\",\n            \"description\": \"ID of user to fetch\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"includeSecretDetails\",\n            \"in\": \"query\",\n            \"description\": \"secret: it's a secret\",\n            \"required\": false,\n            \"type\": \"boolean\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          },\n          \"default\": {\n            \"description\": \"The pet\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pet\"\n                }\n              }\n            },\n            \"headers\": {\n              \"X-Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PetHeader\"\n                }\n              },\n              \"X-Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"X-Rate-Limit-Reset\": {\n                \"description\": \"The number of seconds left in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/pet\": {\n      \"put\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Update an existing pet\",\n        \"operationId\": \"updatePet\",\n        \"requestBody\": {\n          \"description\": \"Pet object that needs to be added to the store\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Category\"\n              }\n            }\n          },\n          \"required\": true\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      },\n      \"post\": {\n        \"summary\": \"Add a new pet to the store\",\n        \"operationId\": \"addPet\",\n        \"requestBody\": {\n          \"description\": \"Pet object that needs to be added to the store\",\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Pet\"\n              }\n            }\n          },\n          \"required\": true\n        },\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        }\n      }\n    },\n    \"/pet/findByStatus\": {\n      \"get\": {\n        \"summary\": \"Finds Pets by status\",\n        \"description\": \"Multiple status values can be provided with comma separated strings\",\n        \"operationId\": \"findPetsByStatus\",\n        \"parameters\": [\n          {\n            \"name\": \"status\",\n            \"in\": \"query\",\n            \"description\": \"Status values that need to be considered for filter\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          {\n            \"name\": \"skip\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          },\n          {\n            \"name\": \"limit\",\n            \"in\": \"query\",\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid status value\"\n          },\n          \"default\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pet\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/pet/findByTags\": {\n      \"get\": {\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        \"parameters\": [\n          {\n            \"name\": \"tags\",\n            \"in\": \"query\",\n            \"description\": \"Tags to filter by\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid tag value\"\n          },\n          \"default\": {\n            \"description\": \"Pets matching criteria\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pet\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/polymorphic\": {\n      \"get\": {\n        \"summary\": \"polymorphic Objects response\",\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid status value\"\n          },\n          \"default\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/polymorphicRoot\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Category\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          \"name\": {\n            \"type\": \"string\"\n          }\n        },\n        \"xml\": {\n          \"name\": \"Category\"\n        }\n      },\n      \"PetHeader\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          \"name\": {\n            \"type\": \"string\"\n          }\n        },\n        \"xml\": {\n          \"name\": \"PetHeader\"\n        }\n      },\n      \"Tag\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          \"foo\": {\n            \"$ref\": \"#/components/schemas/Foo\"\n          },\n          \"name\": {\n            \"type\": \"string\"\n          }\n        },\n        \"xml\": {\n          \"name\": \"Tag\"\n        }\n      },\n      \"Foo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          \"name\": {\n            \"type\": \"string\"\n          }\n        },\n        \"xml\": {\n          \"name\": \"Foo\"\n        }\n      },\n      \"Bar\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          \"name\": {\n            \"type\": \"string\"\n          }\n        },\n        \"xml\": {\n          \"name\": \"Bar\"\n        }\n      },\n      \"allOfparentA\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"parentAStuff\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        }\n      },\n      \"allOfparentB\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"parentAStuff\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        }\n      },\n      \"anyOfparentA\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"parentCStuff\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        }\n      },\n      \"anyOfparentB\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"parentCStuff\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        }\n      },\n      \"oneOfparentA\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"parentBStuff\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        }\n      },\n      \"oneOfparentB\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"parentBStuff\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        }\n      },\n      \"oneOfNestedParentA\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"parentBStuff\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        }\n      },\n      \"oneOfNestedParentB\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"parentBStuff\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        }\n      },\n      \"discriminatorMatchedChildA\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"parentBStuff\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          \"discriminatorRefProperty\": {\n            \"$ref\": \"#/components/schemas/discriminatorRefProperty\"\n          }\n        }\n      },\n      \"discriminatorRefProperty\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"parentBStuff\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        }\n      },\n      \"discriminatorMatchedChildB\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"parentBStuff\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        }\n      },\n      \"discriminatorParentRefProperty\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"parentBStuff\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        }\n      },\n      \"discriminatorParent\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"parentBStuff\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          \"discriminatorParentRefProperty\": {\n            \"$ref\": \"#/components/schemas/discriminatorParentRefProperty\"\n          }\n        },\n        \"discriminator\": {\n          \"propertyName\": \"discriminatorKey\",\n          \"mapping\": {\n            \"A\": \"#/components/schemas/discriminatorMatchedChildA\",\n            \"B\": \"#/components/schemas/discriminatorMatchedChildB\"\n          }\n        }\n      },\n      \"allOfChild\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/allOfparentA\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/allOfparentB\"\n          }\n        ]\n      },\n      \"anyOfChild\": {\n        \"anyOf\": [\n          {\n            \"$ref\": \"#/components/schemas/anyOfparentA\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/anyOfparentB\"\n          }\n        ]\n      },\n      \"oneOfChild\": {\n        \"oneOf\": [\n          {\n            \"$ref\": \"#/components/schemas/oneOfparentA\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/oneOfparentB\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/oneOfChildNested\"\n          }\n        ]\n      },\n      \"oneOfChildNested\": {\n        \"oneOf\": [\n          {\n            \"$ref\": \"#/components/schemas/oneOfNestedParentB\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/oneOfNestedParentA\"\n          }\n        ]\n      },\n      \"polymorphicRoot\": {\n        \"oneOf\": [\n          {\n            \"$ref\": \"#/components/schemas/oneOfChild\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/allOfChild\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/anyOfChild\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/discriminatorParent\"\n          }\n        ]\n      },\n      \"Pet\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          \"category\": {\n            \"$ref\": \"#/components/schemas/Category\"\n          },\n          \"name\": {\n            \"type\": \"string\"\n          },\n          \"photoUrls\": {\n            \"type\": \"array\",\n            \"xml\": {\n              \"wrapped\": true\n            },\n            \"items\": {\n              \"type\": \"string\",\n              \"xml\": {\n                \"name\": \"photoUrl\"\n              }\n            }\n          },\n          \"tags\": {\n            \"type\": \"array\",\n            \"xml\": {\n              \"wrapped\": true\n            },\n            \"items\": {\n              \"$ref\": \"#/components/schemas/Tag\",\n              \"xml\": {\n                \"name\": \"tag\"\n              }\n            }\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"description\": \"pet status in the store\",\n            \"enum\": [\n              \"available,pending,sold\"\n            ]\n          }\n        },\n        \"xml\": {\n          \"name\": \"Pet\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/petstore-3.0-v2.json",
    "content": "{\n    \"openapi\": \"3.0.1\",\n    \"tags\": [\n        {\n            \"name\": \"pet\",\n            \"description\": \"Everything about your Pets\",\n            \"externalDocs\": {\n                \"description\": \"Find out more\",\n                \"url\": \"http://swagger.io\"\n            }\n        },\n        {\n            \"name\": \"user\",\n            \"description\": \"Operations about user\"\n        },\n        {\n            \"name\": \"store\",\n            \"description\": \"Access to Petstore orders\",\n            \"externalDocs\": {\n                \"description\": \"Find out more\",\n                \"url\": \"http://swagger.io\"\n            }\n        }\n    ],\n    \"paths\": {\n        \"/pet/{petId}\": {\n            \"get\": {\n                \"summary\": \"Find pet by ID\",\n                \"description\": \"Returns a pet when 0 < ID <= 10.  ID > 10 or nonintegers will simulate API error conditions\",\n                \"operationId\": \"getPetById\",\n                \"parameters\": [\n                    {\n                        \"name\": \"petId\",\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                        }\n                    },\n                    {\n                        \"name\": \"userId\",\n                        \"in\": \"path\",\n                        \"description\": \"ID of user to fetch\",\n                        \"required\": true,\n                        \"type\": \"string\"\n                    },\n                    {\n                        \"name\": \"includeSecretDetails\",\n                        \"in\": \"query\",\n                        \"description\": \"secret: it's a secret\",\n                        \"required\": false,\n                        \"type\": \"boolean\"\n                    }\n                ],\n                \"responses\": {\n                    \"400\": {\n                        \"description\": \"Invalid ID supplied\"\n                    },\n                    \"404\": {\n                        \"description\": \"Pet not found\"\n                    },\n                    \"default\": {\n                        \"description\": \"The pet\",\n                        \"content\": {\n                            \"application/json\": {\n                                \"schema\": {\n                                    \"type\": \"string\"\n                                }\n                            },\n                            \"application/xml\": {\n                                \"schema\": {\n                                    \"$ref\": \"#/components/schemas/Pet\"\n                                }\n                            }\n                        },\n                        \"headers\": {\n                            \"X-Rate-Limit-Limit\": {\n                                \"description\": \"The number of allowed requests in the current period\",\n                                \"schema\": {\n                                    \"$ref\": \"#/components/schemas/PetHeader\"\n                                }\n                            },\n                            \"X-Rate-Limit-Remaining\": {\n                                \"description\": \"The number of remaining requests in the current period\",\n                                \"schema\": {\n                                    \"type\": \"integer\"\n                                }\n                            },\n                            \"X-Rate-Limit-Reset\": {\n                                \"description\": \"The number of seconds left in the current period\",\n                                \"schema\": {\n                                    \"type\": \"integer\"\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        },\n        \"/pet\": {\n            \"put\": {\n                \"tags\": [\n                    \"pet\"\n                ],\n                \"summary\": \"Update an existing pet\",\n                \"operationId\": \"updatePet\",\n                \"requestBody\": {\n                    \"description\": \"Pet object that needs to be added to the store\",\n                    \"content\": {\n                        \"application/json\": {\n                            \"schema\": {\n                                \"$ref\": \"#/components/schemas/Category\"\n                            }\n                        }\n                    },\n                    \"required\": true\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            },\n            \"post\": {\n                \"summary\": \"Add a new pet to the store\",\n                \"operationId\": \"addPet\",\n                \"requestBody\": {\n                    \"description\": \"Pet object that needs to be added to the store\",\n                    \"content\": {\n                        \"application/json\": {\n                            \"schema\": {\n                                \"$ref\": \"#/components/schemas/Pet\"\n                            }\n                        }\n                    },\n                    \"required\": true\n                },\n                \"responses\": {\n                    \"405\": {\n                        \"description\": \"Invalid input\"\n                    }\n                }\n            }\n        },\n        \"/pet/findByStatus\": {\n            \"get\": {\n                \"summary\": \"Finds Pets by status\",\n                \"description\": \"Multiple status values can be provided with comma separated strings\",\n                \"operationId\": \"findPetsByStatus\",\n                \"parameters\": [\n                    {\n                        \"name\": \"status\",\n                        \"in\": \"query\",\n                        \"description\": \"Status values that need to be considered for filter\",\n                        \"required\": true,\n                        \"schema\": {\n                            \"type\": \"string\"\n                        }\n                    },\n                    {\n                        \"name\": \"skip\",\n                        \"in\": \"query\",\n                        \"schema\": {\n                            \"type\": \"integer\",\n                            \"format\": \"int32\"\n                        }\n                    },\n                    {\n                        \"name\": \"limit\",\n                        \"in\": \"query\",\n                        \"schema\": {\n                            \"type\": \"integer\",\n                            \"format\": \"int32\"\n                        }\n                    }\n                ],\n                \"responses\": {\n                    \"400\": {\n                        \"description\": \"Invalid status value\"\n                    },\n                    \"default\": {\n                        \"content\": {\n                            \"application/json\": {\n                                \"schema\": {\n                                    \"$ref\": \"#/components/schemas/Pet\"\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        },\n        \"/pet/findByTags\": {\n            \"get\": {\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                \"parameters\": [\n                    {\n                        \"name\": \"tags\",\n                        \"in\": \"query\",\n                        \"description\": \"Tags to filter by\",\n                        \"required\": true,\n                        \"schema\": {\n                            \"type\": \"string\"\n                        }\n                    }\n                ],\n                \"responses\": {\n                    \"400\": {\n                        \"description\": \"Invalid tag value\"\n                    },\n                    \"default\": {\n                        \"description\": \"Pets matching criteria\",\n                        \"content\": {\n                            \"application/json\": {\n                                \"schema\": {\n                                    \"$ref\": \"#/components/schemas/Pet\"\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    },\n    \"components\": {\n        \"schemas\": {\n            \"Category\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int64\"\n                    },\n                    \"name\": {\n                        \"type\": \"string\"\n                    }\n                },\n                \"xml\": {\n                    \"name\": \"Category\"\n                }\n            },\n            \"PetHeader\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int64\"\n                    },\n                    \"name\": {\n                        \"type\": \"string\"\n                    }\n                },\n                \"xml\": {\n                    \"name\": \"PetHeader\"\n                }\n            },\n            \"Tag\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int64\"\n                    },\n                    \"foo\": {\n                        \"$ref\": \"#/components/schemas/Foo\"\n                    },\n                    \"name\": {\n                        \"type\": \"string\"\n                    }\n                },\n                \"xml\": {\n                    \"name\": \"Tag\"\n                }\n            },\n            \"Foo\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int64\"\n                    },\n                    \"name\": {\n                        \"type\": \"string\"\n                    }\n                },\n                \"xml\": {\n                    \"name\": \"Foo\"\n                }\n            },\n            \"Bar\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int64\"\n                    },\n                    \"name\": {\n                        \"type\": \"string\"\n                    }\n                },\n                \"xml\": {\n                    \"name\": \"Bar\"\n                }\n            },\n            \"Pet\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int64\"\n                    },\n                    \"category\": {\n                        \"$ref\": \"#/components/schemas/Category\"\n                    },\n                    \"name\": {\n                        \"type\": \"string\"\n                    },\n                    \"photoUrls\": {\n                        \"type\": \"array\",\n                        \"xml\": {\n                            \"wrapped\": true\n                        },\n                        \"items\": {\n                            \"type\": \"string\",\n                            \"xml\": {\n                                \"name\": \"photoUrl\"\n                            }\n                        }\n                    },\n                    \"tags\": {\n                        \"type\": \"array\",\n                        \"xml\": {\n                            \"wrapped\": true\n                        },\n                        \"items\": {\n                            \"$ref\": \"#/components/schemas/Tag\",\n                            \"xml\": {\n                                \"name\": \"tag\"\n                            }\n                        }\n                    },\n                    \"status\": {\n                        \"type\": \"string\",\n                        \"description\": \"pet status in the store\",\n                        \"enum\": [\n                            \"available,pending,sold\"\n                        ]\n                    }\n                },\n                \"xml\": {\n                    \"name\": \"Pet\"\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/petstore-3.0-v2_withoutModels.json",
    "content": "{\n    \"openapi\": \"3.0.1\",\n    \"paths\": {\n        \"/pet/{petId}\": {\n            \"get\": {\n                \"summary\": \"Find pet by ID\",\n                \"description\": \"Returns a pet when 0 < ID <= 10.  ID > 10 or nonintegers will simulate API error conditions\",\n                \"operationId\": \"getPetById\",\n                \"parameters\": [\n                    {\n                        \"name\": \"petId\",\n                        \"in\": \"path\",\n                        \"description\": \"ID of pet that needs to be fetched\",\n                        \"required\": true\n                    }\n                ],\n                \"responses\": {\n                    \"400\": {\n                        \"description\": \"Invalid ID supplied\"\n                    },\n                    \"404\": {\n                        \"description\": \"Pet not found\"\n                    }\n                }\n            }\n        },\n        \"/pet\": {\n            \"put\": {\n                \"summary\": \"Update an existing pet\",\n                \"operationId\": \"updatePet\",\n                \"parameters\": [\n                    {\n                        \"name\": \"petId\",\n                        \"in\": \"path\",\n                        \"description\": \"ID of pet that needs to be fetched\",\n                        \"required\": true\n                    }\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            },\n            \"post\": {\n                \"summary\": \"Add a new pet to the store\",\n                \"operationId\": \"addPet\",\n                \"parameters\": [\n                    {\n                        \"name\": \"petId\",\n                        \"in\": \"path\",\n                        \"description\": \"ID of pet that needs to be fetched\",\n                        \"required\": true\n                    }\n                ],\n                \"responses\": {\n                    \"405\": {\n                        \"description\": \"Invalid input\"\n                    }\n                }\n            }\n        },\n        \"/pet/findByStatus\": {\n            \"get\": {\n                \"summary\": \"Finds Pets by status\",\n                \"description\": \"Multiple status values can be provided with comma separated strings\",\n                \"operationId\": \"findPetsByStatus\",\n                \"parameters\": [\n                    {\n                        \"name\": \"status\",\n                        \"in\": \"query\",\n                        \"description\": \"Status values that need to be considered for filter\",\n                        \"required\": true\n                    },\n                    {\n                        \"name\": \"skip\",\n                        \"in\": \"query\"\n                    },\n                    {\n                        \"name\": \"limit\",\n                        \"in\": \"query\"\n                    }\n                ],\n                \"responses\": {\n                    \"400\": {\n                        \"description\": \"Invalid status value\"\n                    }\n                }\n            }\n        },\n        \"/pet/findByTags\": {\n            \"get\": {\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                \"parameters\": [\n                    {\n                        \"name\": \"tags\",\n                        \"in\": \"query\",\n                        \"description\": \"Tags to filter by\",\n                        \"required\": true\n                    }\n                ],\n                \"responses\": {\n                    \"400\": {\n                        \"description\": \"Invalid tag value\"\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/petstore-3.0.json",
    "content": "{\n    \"info\": {\n        \"version\": \"1.0.0\",\n        \"license\": {\n            \"name\": \"MIT\"\n        },\n        \"title\": \"Swagger Petstore\"\n    },\n    \"paths\": {\n        \"/pets\": {\n            \"post\": {\n                \"tags\": [\n                    \"pets\"\n                ],\n                \"summary\": \"Create a pet\",\n                \"responses\": {\n                    \"default\": {\n                        \"content\": {\n                            \"application/json\": {\n                                \"schema\": {\n                                    \"$ref\": \"#/components/schemas/Error\"\n                                }\n                            }\n                        },\n                        \"description\": \"unexpected error\"\n                    },\n                    \"201\": {\n                        \"description\": \"Null response\"\n                    }\n                },\n                \"operationId\": \"createPets\"\n            },\n            \"get\": {\n                \"tags\": [\n                    \"pets\"\n                ],\n                \"summary\": \"List all pets\",\n                \"responses\": {\n                    \"200\": {\n                        \"content\": {\n                            \"application/json\": {\n                                \"schema\": {\n                                    \"$ref\": \"#/components/schemas/Pets\"\n                                }\n                            }\n                        },\n                        \"headers\": {\n                            \"x-next\": {\n                                \"description\": \"A link to the next page of responses\",\n                                \"schema\": {\n                                    \"type\": \"string\"\n                                }\n                            }\n                        },\n                        \"description\": \"An paged array of pets\"\n                    },\n                    \"default\": {\n                        \"content\": {\n                            \"application/json\": {\n                                \"schema\": {\n                                    \"$ref\": \"#/components/schemas/Error\"\n                                }\n                            }\n                        },\n                        \"description\": \"unexpected error\"\n                    }\n                },\n                \"parameters\": [\n                    {\n                        \"required\": false,\n                        \"in\": \"query\",\n                        \"description\": \"How many items to return at one time (max 100)\",\n                        \"name\": \"limit\",\n                        \"schema\": {\n                            \"type\": \"integer\",\n                            \"format\": \"int32\"\n                        }\n                    }\n                ],\n                \"operationId\": \"listPets\"\n            }\n        },\n        \"/pets/{petId}\": {\n            \"get\": {\n                \"tags\": [\n                    \"pets\"\n                ],\n                \"summary\": \"Info for a specific pet\",\n                \"responses\": {\n                    \"200\": {\n                        \"content\": {\n                            \"application/json\": {\n                                \"schema\": {\n                                    \"$ref\": \"#/components/schemas/Pets\"\n                                }\n                            }\n                        },\n                        \"description\": \"Expected response to a valid request\"\n                    },\n                    \"default\": {\n                        \"content\": {\n                            \"application/json\": {\n                                \"schema\": {\n                                    \"$ref\": \"#/components/schemas/Error\"\n                                }\n                            }\n                        },\n                        \"description\": \"unexpected error\"\n                    }\n                },\n                \"parameters\": [\n                    {\n                        \"required\": true,\n                        \"in\": \"path\",\n                        \"description\": \"The id of the pet to retrieve\",\n                        \"name\": \"petId\",\n                        \"schema\": {\n                            \"type\": \"string\"\n                        }\n                    }\n                ],\n                \"operationId\": \"showPetById\"\n            }\n        }\n    },\n    \"openapi\": \"3.0.1\",\n    \"components\": {\n        \"schemas\": {\n            \"Pet\": {\n                \"required\": [\n                    \"id\",\n                    \"name\"\n                ],\n                \"properties\": {\n                    \"tag\": {\n                        \"type\": \"string\"\n                    },\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int64\"\n                    },\n                    \"name\": {\n                        \"type\": \"string\"\n                    }\n                }\n            },\n            \"Pets\": {\n                \"items\": {\n                    \"$ref\": \"#/components/schemas/Pet\"\n                },\n                \"type\": \"array\"\n            },\n            \"Error\": {\n                \"required\": [\n                    \"code\",\n                    \"message\"\n                ],\n                \"properties\": {\n                    \"message\": {\n                        \"type\": \"string\"\n                    },\n                    \"code\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int32\"\n                    }\n                }\n            }\n        }\n    },\n    \"servers\": [\n        {\n            \"url\": \"http://petstore.swagger.io/v1\"\n        }\n    ]\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/petstore-3.0.yaml",
    "content": "openapi: \"3.0.1\"\ninfo:\n  version: 1.0.0\n  title: Swagger Petstore\n  license:\n    name: MIT\nservers:\n  - url: http://petstore.swagger.io/v1\npaths:\n  /pets:\n    get:\n      summary: List all pets\n      operationId: listPets\n      tags:\n        - pets\n      parameters:\n        - name: limit\n          in: query\n          description: How many items to return at one time (max 100)\n          required: false\n          schema:\n            type: integer\n            format: int32\n      responses:\n        \"200\":\n          description: An paged array of pets\n          headers:\n            x-next:\n              description: A link to the next page of responses\n              schema:\n                type: string\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pets\"\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\n    post:\n      summary: Create a pet\n      operationId: createPets\n      tags:\n        - pets\n      responses:\n        \"201\":\n          description: Null response\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\n  /pets/{petId}:\n    get:\n      summary: Info for a specific pet\n      operationId: showPetById\n      tags:\n        - pets\n      parameters:\n        - name: petId\n          in: path\n          required: true\n          description: The id of the pet to retrieve\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: Expected response to a valid request\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pets\"\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\ncomponents:\n  schemas:\n    Pet:\n      required:\n        - id\n        - name\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n        tag:\n          type: string\n    Pets:\n      type: array\n      items:\n        $ref: \"#/components/schemas/Pet\"\n    Error:\n      required:\n        - code\n        - message\n      properties:\n        code:\n          type: integer\n          format: int32\n        message:\n          type: string"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/petstore.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"title\": \"Petstore Sample API\",\n  \"info\": {\n    \"description\": \"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification\",\n    \"title\": \"Petstore Sample API\",\n    \"contact\": {\n      \"name\": \"Swagger API Team\"\n    },\n    \"license\": {\n      \"name\": \"MIT\",\n      \"url\": \"http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT\"\n    },\n    \"x-name\" : \"value\",\n    \"x-extension\" : {\n       \"name\" : \"value\"\n    }\n  },\n  \"tags\": [\n    {\n      \"name\": \"pet\",\n      \"description\": \"Everything about your Pets\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    },\n    {\n      \"name\": \"user\",\n      \"description\": \"Operations about user\"\n    },\n    {\n      \"name\": \"store\",\n      \"description\": \"Access to Petstore orders\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    }\n  ],\n  \"host\": \"petstore.swagger.io\",\n  \"basePath\": \"/api\",\n  \"paths\": {\n    \"/pet\": {\n      \"put\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"in\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Validation exception\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          }\n        },\n        \"x-name\" : \"value\",\n        \"x-extension\" : {\n          \"name\" : \"value\"\n        }\n      },\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"in\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Tag\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        }\n      }\n    },\n    \"/user/createWithList\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"in\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": false\n          }\n        ]\n      }\n    },\n    \"/store/order/{orderId}\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"orderId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet that needs to be fetched\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"404\": {\n            \"description\": \"Order not found\"\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"orderId\",\n            \"in\": \"path\",\n            \"description\": \"ID of the order that needs to be deleted\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"404\": {\n            \"description\": \"Order not found\"\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          }\n        }\n      }\n    },\n    \"/user/createWithArray\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"in\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ]\n      }\n    },\n    \"/store/order\": {\n      \"post\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"in\": \"body\",\n            \"description\": \"order placed for purchasing the pet\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid Order\"\n          }\n        }\n      }\n    },\n    \"/pet/findByStatus\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"status\",\n            \"in\": \"query\",\n            \"description\": \"Status values that need to be considered for filter\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid status value\"\n          }\n        }\n      }\n    },\n    \"/user/{username}\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"parameters\": [\n          {\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          }\n        ],\n        \"responses\": {\n          \"404\": {\n            \"description\": \"User not found\"\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"path\",\n            \"description\": \"name that need to be deleted\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"body\",\n            \"in\": \"body\",\n            \"description\": \"Updated user object\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"404\": {\n            \"description\": \"User not found\"\n          },\n          \"400\": {\n            \"description\": \"Invalid user supplied\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"path\",\n            \"description\": \"The name that needs to be deleted\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"404\": {\n            \"description\": \"User not found\"\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          }\n        }\n      }\n    },\n    \"/pet/findByTags\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"tags\",\n            \"in\": \"query\",\n            \"description\": \"Tags to filter by\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid tag value\"\n          }\n        }\n      }\n    },\n    \"/user\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"in\": \"body\",\n            \"description\": \"Created user object\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ]\n      }\n    },\n    \"/pet/{petId}\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet that needs to be fetched\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"404\": {\n            \"description\": \"Pet not found\"\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          }\n        }\n      },\n      \"head\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"petId\",\n            \"in\": \"path\",\n            \"description\": \"ID of pet that needs to be fetched\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"404\": {\n            \"description\": \"Pet not found\"\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          }\n        }\n      }\n    },\n    \"/user/logout\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ]\n      }\n    },\n    \"/user/login\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"username\",\n            \"in\": \"query\",\n            \"description\": \"The user name for login\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"password\",\n            \"in\": \"query\",\n            \"description\": \"The password for login in clear text\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid username/password supplied\"\n          }\n        }\n      }\n    }\n  },\n  \"definitions\": {\n    \"User\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Category\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Pet\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"tags\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"status\": {\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"photoUrls\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    },\n    \"Tag\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"status\": {\n          \"type\": \"string\"\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/propertiesWithConstraints.json",
    "content": "{\n    \"oas\": \"3.0.1\",\n    \"paths\": {\n        \"/health\": {\n            \"get\": {\n                \"responses\": {\n                    \"200\": {\n                        \"description\": \"Success\",\n                        \"schema\": {\n                            \"$ref\": \"#/definitions/Health\"\n                        }\n                    }\n                }\n            }\n        }\n    },\n    \"components\": {\n        \"schemas\": {\n            \"Health\": {\n                \"properties\": {\n                    \"array_with_min\": {\n                        \"type\": \"array\",\n                        \"minItems\": 5,\n                        \"items\": {\n                            \"$ref\": \"#/definitions/Health\"\n                        }\n                    },\n                    \"array_with_max\": {\n                        \"type\": \"array\",\n                        \"maxItems\": 10,\n                        \"items\": {\n                            \"$ref\": \"#/definitions/Health\"\n                        }\n                    },\n                    \"array_with_unique\": {\n                        \"type\": \"array\",\n                        \"uniqueItems\": true,\n                        \"items\": {\n                            \"$ref\": \"#/definitions/Health\"\n                        }\n                    },\n                    \"array_with_all\": {\n                        \"type\": \"array\",\n                        \"minItems\": 1,\n                        \"maxItems\": 10,\n                        \"uniqueItems\": true,\n                        \"items\": {\n                            \"$ref\": \"#/definitions/Health\"\n                        }\n                    },\n                    \"string_with_constraints\": {\n                        \"type\": \"string\",\n                        \"minLength\": 10,\n                        \"maxLength\": 100,\n                        \"pattern\": \"apattern\"\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/propertyWithVendorExtensions.json",
    "content": "{\n    \"swagger\": \"2.0\",\n    \"x-string-value\": \"Hello World\",\n    \"x-null-value\": null,\n    \"x-map-value\": {\n        \"hello\": \"world\",\n        \"foo\": \"bar\"\n    },\n    \"x-list-value\": [\n        \"Hello\",\n        \"World\"\n    ],\n    \"x-number-value\": 123,\n    \"x-boolean-value\": true,\n    \"not-an-extension\": \"foobar\",\n    \"paths\": {\n        \"/health\": {\n            \"get\": {\n                \"responses\": {\n                    \"200\": {\n                        \"description\": \"Success\",\n                        \"schema\": {\n                            \"$ref\": \"#/definitions/Health\"\n                        }\n                    }\n                }\n            }\n        }\n    },\n    \"components\": {\n        \"schemas\": {\n            \"Health\": {\n                \"properties\": {\n                    \"status\": {\n                        \"type\": \"string\",\n                        \"x-string-value\": \"Hello World\",\n                        \"x-null-value\": null,\n                        \"x-map-value\": {\n                            \"hello\": \"world\",\n                            \"foo\": \"bar\"\n                        },\n                        \"x-list-value\": [\n                            \"Hello\",\n                            \"World\"\n                        ],\n                        \"x-number-value\": 123,\n                        \"x-boolean-value\": true,\n                        \"not-an-extension\": \"foobar\"\n                    },\n                    \"array\": {\n                        \"type\": \"array\",\n                        \"items\": {\n                            \"$ref\": \"#/definitions/Health\"\n                        },\n                        \"x-string-value\": \"string_value\"\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/recursivemodels.json",
    "content": "{\n    \"openapi\": \"3.0.1\",\n    \"tags\": [\n        {\n            \"name\": \"Recursive Model Resource\"\n        }\n    ],\n    \"paths\": {\n        \"/r/indirect\": {\n            \"get\": {\n                \"tags\": [\n                    \"Recursive Model Resource\"\n                ],\n                \"operationId\": \"getIndirectRecursiveModel\",\n                \"responses\": {\n                    \"200\": {\n                        \"description\": \"successful operation\",\n                        \"content\": {\n                            \"application/json\": {\n                                \"schema\": {\n                                    \"$ref\": \"#/components/schemas/IndirectRecursiveModelA\"\n                                }\n                            },\n                            \"application/xml\": {\n                                \"schema\": {\n                                    \"$ref\": \"#/components/schemas/IndirectRecursiveModelA\"\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        },\n        \"/r/self\": {\n            \"get\": {\n                \"tags\": [\n                    \"Recursive Model Resource\"\n                ],\n                \"operationId\": \"getSelfReferencingModel\",\n                \"parameters\": [],\n                \"responses\": {\n                    \"200\": {\n                        \"description\": \"successful operation\",\n                        \"content\": {\n                            \"application/json\": {\n                                \"schema\": {\n                                    \"$ref\": \"#/components/schemas/SelfReferencingModel\"\n                                }\n                            },\n                            \"application/xml\": {\n                                \"schema\": {\n                                    \"$ref\": \"#/components/schemas/SelfReferencingModel\"\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    },\n    \"components\": {\n        \"schemas\": {\n            \"SelfReferencingModel\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int32\"\n                    },\n                    \"children\": {\n                        \"type\": \"array\",\n                        \"properties\": {\n                            \"nested\": {\n                                \"$ref\": \"#/components/schemas/SelfReferencingModel\"\n                            }\n                        }\n                    }\n                }\n            },\n            \"IndirectRecursiveModelA\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int32\"\n                    },\n                    \"indirectRecursiveModelB\": {\n                        \"$ref\": \"#/components/schemas/IndirectRecursiveModelB\"\n                    }\n                }\n            },\n            \"IndirectRecursiveModelB\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"id\": {\n                        \"type\": \"integer\",\n                        \"format\": \"int32\"\n                    },\n                    \"indirectRecursiveModelA\": {\n                        \"$ref\": \"#/components/schemas/IndirectRecursiveModelA\"\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/responseRef.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"title\": \"Petstore Sample API\",\n  \"info\": {\n    \"description\": \"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification\",\n    \"title\": \"Petstore Sample API\",\n    \"contact\": {\n      \"name\": \"Swagger API Team\"\n    },\n    \"license\": {\n      \"name\": \"MIT\",\n      \"url\": \"http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT\"\n    }\n  },\n  \"tags\": [\n    {\n      \"name\": \"pet\",\n      \"description\": \"Everything about your Pets\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    },\n    {\n      \"name\": \"user\",\n      \"description\": \"Operations about user\"\n    },\n    {\n      \"name\": \"store\",\n      \"description\": \"Access to Petstore orders\",\n      \"externalDocs\": {\n        \"description\": \"Find out more\",\n        \"url\": \"http://swagger.io\"\n      }\n    }\n  ],\n  \"host\": \"petstore.swagger.io\",\n  \"basePath\": \"/api\",\n  \"paths\": {\n    \"/pet\": {\n      \"put\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"in\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"$ref\": \"http://my.company.com/responses/errors.json#/method-not-allowed\"\n          },\n          \"404\": {\n            \"$ref\": \"http://my.company.com/responses/errors.json#/not-found\"\n          },\n          \"400\": {\n            \"description\": \"Bad request\"\n          }\n        }\n      }\n    }\n  },\n  \"definitions\": {\n    \"User\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Category\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Pet\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"tags\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"status\": {\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"photoUrls\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    },\n    \"Tag\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"status\": {\n          \"type\": \"string\"\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/sampleSpec.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"title\": \"XXX\",\n  \"info\": {\n    \"description\": \"YYY\",\n    \"title\": \"ZZZ\",\n    \"contact\": {\n      \"name\": \"AAA\"\n    },\n    \"license\": {\n      \"name\": \"MIT\",\n      \"url\": \"http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT\"\n    }\n  },\n  \"basePath\": \"/api\",\n  \"paths\": {\n    \"/users\": {\n      \"get\": {\n        \"tags\": [\n          \"users\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"userId\",\n            \"in\": \"path\",\n            \"description\": \"ID of user to fetch\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"includeSecretDetails\",\n            \"in\": \"query\",\n            \"description\": \"secret: it's a secret\",\n            \"required\": false,\n            \"type\": \"boolean\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"found it\",\n            \"schema\": {\n              \"$ref\": \"Order\"\n            }\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          }\n        }\n      }\n    }\n  },\n  \"definitions\": {\n    \"User\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Category\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Pet\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"tags\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"status\": {\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"photoUrls\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    },\n    \"Tag\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"properties\": {\n        \"_id\": {\n          \"type\": \"string\"\n        },\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"status\": {\n          \"type\": \"string\"\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/securityDefinitions.json",
    "content": "{\n  \"openapi\": \"3.0.1\",\n  \"info\": {\n    \"version\": \"1.0.0\",\n    \"license\": {\n      \"name\": \"MIT\"\n    },\n    \"title\": \"Swagger Petstore\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"http://petstore.swagger.io/v1\"\n    }\n  ],\n  \"paths\": {},\n  \"security\": [\n    {\n      \"petstore_auth\": [\n        \"write:pets\",\n        \"read:pets\"\n      ]\n    },\n    {\n      \"api_key\": []\n    },\n    {\n      \"http\": []\n    }\n  ],\n  \"components\": {\n    \"securitySchemes\": {\n      \"petstore_auth\": {\n        \"type\": \"oauth2\",\n        \"flows\": {\n          \"implicit\": {\n            \"authorizationUrl\": \"http://petstore.swagger.io/oauth/dialog\",\n            \"scopes\": {\n              \"write:pets\": \"modify pets in your account\",\n              \"read:pets\": \"read your pets\"\n            }\n          }\n        }\n      },\n      \"api_key\": {\n        \"type\": \"apiKey\",\n        \"name\": \"api_key\",\n        \"in\": \"header\"\n      },\n      \"http\": {\n        \"type\": \"http\",\n        \"scheme\": \"basic\"\n      },\n      \"open_id_connect\": {\n        \"type\": \"openIdConnect\",\n        \"openIdConnectUrl\": \"http://petstore.swagger.io/openid\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/securitySchemaWithExtension.json",
    "content": "{\n  \"type\": \"oauth2\",\n  \"flows\": {\n    \"implicit\": {\n      \"authorizationUrl\": \"http://petstore.swagger.io/oauth/dialog\",\n      \"scopes\": {\n        \"write:pets\": \"modify pets in your account\",\n        \"read:pets\": \"read your pets\"\n      }\n    }\n  },\n  \"x-custom\": {\n    \"key-string\": \"value-one\"\n  }\n}\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/specFiles/swos-126.yaml",
    "content": "openapi: 3.0.0\ninfo:\n  title: ExampleBuilder and date-time examples\n  version: 0.0.0\npaths: {}\n\ncomponents:\n  schemas:\n    MyModel:\n      type: object\n      properties:\n        date:\n          type: string\n          format: date\n          example: '2019-08-05'\n        dateTime:\n          type: string\n          format: date-time\n          example: '2019-08-05T12:34:56Z'"
  },
  {
    "path": "modules/swagger-core/src/test/resources/testOAS31/basicOAS31.yaml",
    "content": "openapi: \"3.1.0\"\ninfo:\n  version: 1.0.0\n  title: Swagger Petstore\n  license:\n    name: MIT\n    identifier: test\nservers:\n  - url: http://petstore.swagger.io/v1\nwebhooks:\n  # Each webhook needs a name\n  newPet:\n    # This is a Path Item Object, the only difference is that the request is initiated by the API provider\n    post:\n      requestBody:\n        description: Information about a new pet in the system\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/Pet\"\n              description: pet\n      responses:\n        \"200\":\n          description: Return a 200 status to indicate that the data was received successfully\npaths:\n  /pets:\n    get:\n      summary: List all pets\n      operationId: listPets\n      tags:\n        - pets\n      parameters:\n        - name: limit\n          in: query\n          description: How many items to return at one time (max 100)\n          required: false\n          schema:\n            type: integer\n            format: int32\n      responses:\n        \"200\":\n          description: An paged array of pets\n          headers:\n            x-next:\n              description: A link to the next page of responses\n              schema:\n                type: string\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pets\"\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\n                description: error\n    post:\n      summary: Create a pet\n      operationId: createPets\n      tags:\n        - pets\n      responses:\n        \"201\":\n          description: Null response\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Tag\"\n  /pets/{petId}:\n    get:\n      summary: Info for a specific pet\n      operationId: showPetById\n      tags:\n        - pets\n      parameters:\n        - name: petId\n          in: path\n          required: true\n          description: The id of the pet to retrieve\n          schema:\n            type: string\n        - $ref: \"#/components/parameters/User\"\n          description: user\n          summary: user\n      responses:\n        \"200\":\n          description: Expected response to a valid request\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pets\"\n        default:\n          description: unexpected error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Error\"\ncomponents:\n  parameters:\n    User:\n      in: query\n      description: user\n      name: user\n      schema:\n        type: string\n  schemas:\n    Pet:\n      type:\n        - object\n        - string\n      required:\n        - id\n        - name\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n        testenum:\n          type: string\n          enum:\n            - available\n            - pending\n            - sold\n          default: available\n        testconst:\n          type: string\n          const: pending\n        tag:\n          type: string\n      arbitraryKeyword: test\n    Pets:\n      type: array\n      items:\n        $ref: \"#/components/schemas/Pet\"\n    Error:\n      required:\n        - code\n        - message\n      properties:\n        code:\n          type: integer\n          format: int32\n        message:\n          type: string\n        tag:\n          $ref: \"#/components/schemas/Tag\"\n    Tag:\n      type:\n        - object\n        - string\n        - string\n        - foo\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n"
  },
  {
    "path": "modules/swagger-core/src/test/resources/uber.json",
    "content": "{\n  \"swagger\": \"2\",\n  \"info\": {\n    \"title\": \"Uber API\",\n    \"description\": \"Move your app forward with the Uber API\",\n    \"version\": \"1.0.0\"\n  },\n  \"host\": \"api.uber.com\",\n  \"schemes\": [\n    \"https\"\n  ],\n  \"basePath\": \"/v1\",\n  \"produces\": [\n    \"application/json\"\n  ],\n  \"paths\": {\n    \"/products\": {\n      \"get\": {\n        \"summary\": \"Product Types\",\n        \"description\": \"The Products endpoint returns information about the Uber products offered at a given location. The response includes the display name and other details about each product, and lists the products in the proper display order.\",\n        \"parameters\": [\n          {\n            \"name\": \"latitude\",\n            \"in\": \"query\",\n            \"description\": \"Latitude component of location.\",\n            \"required\": true,\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          {\n            \"name\": \"longitude\",\n            \"in\": \"query\",\n            \"description\": \"Longitude component of location.\",\n            \"required\": true,\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        ],\n        \"tags\": [\n          \"Products\"\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"An array of products\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"Product\"\n              }\n            }\n          },\n          \"default\": {\n            \"description\": \"Unexpected error\",\n            \"schema\": {\n              \"$ref\": \"Error\"\n            }\n          }\n        }\n      }\n    },\n    \"/estimates/price\": {\n      \"get\": {\n        \"summary\": \"Price Estimates\",\n        \"description\": \"The Price Estimates endpoint returns an estimated price range for each product offered at a given location. The price estimate is provided as a formatted string with the full price range and the localized currency symbol.<br><br>The response also includes low and high estimates, and the [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code for situations requiring currency conversion. When surge is active for a particular product, its surge_multiplier will be greater than 1, but the price estimate already factors in this multiplier.\",\n        \"parameters\": [\n          {\n            \"name\": \"start_latitude\",\n            \"in\": \"query\",\n            \"description\": \"Latitude component of start location.\",\n            \"required\": true,\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          {\n            \"name\": \"start_longitude\",\n            \"in\": \"query\",\n            \"description\": \"Longitude component of start location.\",\n            \"required\": true,\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          {\n            \"name\": \"end_latitude\",\n            \"in\": \"query\",\n            \"description\": \"Latitude component of end location.\",\n            \"required\": true,\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          {\n            \"name\": \"end_longitude\",\n            \"in\": \"query\",\n            \"description\": \"Longitude component of end location.\",\n            \"required\": true,\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        ],\n        \"tags\": [\n          \"Estimates\"\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"An array of price estimates by product\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"PriceEstimate\"\n              }\n            }\n          },\n          \"default\": {\n            \"description\": \"Unexpected error\",\n            \"schema\": {\n              \"$ref\": \"Error\"\n            }\n          }\n        }\n      }\n    },\n    \"/estimates/time\": {\n      \"get\": {\n        \"summary\": \"Time Estimates\",\n        \"description\": \"The Time Estimates endpoint returns ETAs for all products offered at a given location, with the responses expressed as integers in seconds. We recommend that this endpoint be called every minute to provide the most accurate, up-to-date ETAs.\",\n        \"parameters\": [\n          {\n            \"name\": \"start_latitude\",\n            \"in\": \"query\",\n            \"description\": \"Latitude component of start location.\",\n            \"required\": true,\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          {\n            \"name\": \"start_longitude\",\n            \"in\": \"query\",\n            \"description\": \"Longitude component of start location.\",\n            \"required\": true,\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          {\n            \"name\": \"customer_uuid\",\n            \"in\": \"query\",\n            \"type\": \"string\",\n            \"format\": \"uuid\",\n            \"description\": \"Unique customer identifier to be used for experience customization.\"\n          },\n          {\n            \"name\": \"product_id\",\n            \"in\": \"query\",\n            \"type\": \"string\",\n            \"description\": \"Unique identifier representing a specific product for a given latitude & longitude.\"\n          }\n        ],\n        \"tags\": [\n          \"Estimates\"\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"An array of products\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"Product\"\n              }\n            }\n          },\n          \"default\": {\n            \"description\": \"Unexpected error\",\n            \"schema\": {\n              \"$ref\": \"Error\"\n            }\n          }\n        }\n      }\n    },\n    \"/me\": {\n      \"get\": {\n        \"summary\": \"User Profile\",\n        \"description\": \"The User Profile endpoint returns information about the Uber user that has authorized with the application.\",\n        \"tags\": [\n          \"User\"\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Profile information for a user\",\n            \"schema\": {\n              \"$ref\": \"Profile\"\n            }\n          },\n          \"default\": {\n            \"description\": \"Unexpected error\",\n            \"schema\": {\n              \"$ref\": \"Error\"\n            }\n          }\n        }\n      }\n    },\n    \"/history\": {\n      \"get\": {\n        \"summary\": \"User Activity\",\n        \"description\": \"The User Activity endpoint returns data about a user's lifetime activity with Uber. The response will include pickup locations and times, dropoff locations and times, the distance of past requests, and information about which products were requested.<br><br>The history array in the response will have a maximum length based on the limit parameter. The response value count may exceed limit, therefore subsequent API requests may be necessary.\",\n        \"parameters\": [\n          {\n            \"name\": \"offset\",\n            \"in\": \"query\",\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"description\": \"Offset the list of returned results by this amount. Default is zero.\"\n          },\n          {\n            \"name\": \"limit\",\n            \"in\": \"query\",\n            \"type\": \"integer\",\n            \"format\": \"int32\",\n            \"description\": \"Number of items to retrieve. Default is 5, maximum is 100.\"\n          }\n        ],\n        \"tags\": [\n          \"User\"\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"History information for the given user\",\n            \"schema\": {\n              \"$ref\": \"Activities\"\n            }\n          },\n          \"default\": {\n            \"description\": \"Unexpected error\",\n            \"schema\": {\n              \"$ref\": \"Error\"\n            }\n          }\n        }\n      }\n    }\n  },\n  \"definitions\": {\n    \"Product\": {\n      \"properties\": {\n        \"product_id\": {\n          \"type\": \"string\",\n          \"description\": \"Unique identifier representing a specific product for a given latitude & longitude. For example, uberX in San Francisco will have a different product_id than uberX in Los Angeles.\"\n        },\n        \"description\": {\n          \"type\": \"string\",\n          \"description\": \"Description of product.\"\n        },\n        \"display_name\": {\n          \"type\": \"string\",\n          \"description\": \"Display name of product.\"\n        },\n        \"capacity\": {\n          \"type\": \"string\",\n          \"description\": \"Capacity of product. For example, 4 people.\"\n        },\n        \"image\": {\n          \"type\": \"string\",\n          \"description\": \"Image URL representing the product.\"\n        }\n      }\n    },\n    \"PriceEstimate\": {\n      \"properties\": {\n        \"product_id\": {\n          \"type\": \"string\",\n          \"description\": \"Unique identifier representing a specific product for a given latitude & longitude. For example, uberX in San Francisco will have a different product_id than uberX in Los Angeles\"\n        },\n        \"currency_code\": {\n          \"type\": \"string\",\n          \"description\": \"[ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code.\"\n        },\n        \"display_name\": {\n          \"type\": \"string\",\n          \"description\": \"Display name of product.\"\n        },\n        \"estimate\": {\n          \"type\": \"string\",\n          \"description\": \"Formatted string of estimate in local currency of the start location. Estimate could be a range, a single number (flat rate) or \\\"Metered\\\" for TAXI.\"\n        },\n        \"low_estimate\": {\n          \"type\": \"number\",\n          \"description\": \"Lower bound of the estimated price.\"\n        },\n        \"high_estimate\": {\n          \"type\": \"number\",\n          \"description\": \"Upper bound of the estimated price.\"\n        },\n        \"surge_multiplier\": {\n          \"type\": \"number\",\n          \"description\": \"Expected surge multiplier. Surge is active if surge_multiplier is greater than 1. Price estimate already factors in the surge multiplier.\"\n        }\n      }\n    },\n    \"Profile\": {\n      \"properties\": {\n        \"first_name\": {\n          \"type\": \"string\",\n          \"description\": \"First name of the Uber user.\"\n        },\n        \"last_name\": {\n          \"type\": \"string\",\n          \"description\": \"Last name of the Uber user.\"\n        },\n        \"email\": {\n          \"type\": \"string\",\n          \"description\": \"Email address of the Uber user\"\n        },\n        \"picture\": {\n          \"type\": \"string\",\n          \"description\": \"Image URL of the Uber user.\"\n        },\n        \"promo_code\": {\n          \"type\": \"string\",\n          \"description\": \"Promo code of the Uber user.\"\n        }\n      }\n    },\n    \"Activity\": {\n      \"properties\": {\n        \"uuid\": {\n          \"type\": \"string\",\n          \"description\": \"Unique identifier for the activity\"\n        }\n      }\n    },\n    \"Activities\": {\n      \"properties\": {\n        \"offset\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"Position in pagination.\"\n        },\n        \"limit\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"Number of items to retrieve (100 max).\"\n        },\n        \"count\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"Total number of items available.\"\n        },\n        \"history\": {\n          \"type\": \"array\",\n          \"$ref\": \"Activity\"\n        }\n      }\n    },\n    \"Error\": {\n      \"properties\": {\n        \"code\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"message\": {\n          \"type\": \"string\"\n        },\n        \"fields\": {\n          \"type\": \"string\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "modules/swagger-eclipse-transformer-maven-plugin/README.md",
    "content": "Adapted from https://github.com/eclipse/transformer/blob/main/org.eclipse.transformer.maven \nnot to add the transformed JAR as an attached artifact to the project.\n\nTo be replaced with Eclipse original Transformer plugin when/if optional attachment is supported.\n\n\n"
  },
  {
    "path": "modules/swagger-eclipse-transformer-maven-plugin/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <groupId>io.swagger.core.v3</groupId>\n        <artifactId>swagger-project</artifactId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../..</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-eclipse-transformer-maven-plugin</artifactId>\n    <name>swagger-eclipse-transformer-maven-plugin</name>\n    <description>swagger-eclipse-transformer-maven-plugin</description>\n    <packaging>maven-plugin</packaging>\n    <properties>\n        <maven.target.version>3.9.9</maven.target.version>\n        <eclipse.transformer.version>0.20</eclipse.transformer.version>\n        <maven-test-harness.version>3.3.0</maven-test-harness.version>\n        <shrinkwrap.version>1.2.6</shrinkwrap.version>\n        <assertj.version>3.18.1</assertj.version>\n    </properties>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-enforcer-plugin</artifactId>\n                <version>${enforcer-plugin-version}</version>\n                <configuration>\n                    <skip>true</skip>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <version>3.3.0</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-plugin-plugin</artifactId>\n                <version>3.6.4</version>\n                <configuration>\n                    <goalPrefix>transform</goalPrefix>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>org.eclipse.transformer</groupId>\n            <artifactId>org.eclipse.transformer.cli</artifactId>\n            <version>0.2.0</version>\n        </dependency>\n        <dependency>\n            <groupId>javax.inject</groupId>\n            <artifactId>javax.inject</artifactId>\n            <version>1</version>\n            <!-- needed in compile scope to instantiate Provider org.eclipse.sisu.space.SisuIndexAPT6 -->\n            <scope>compile</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-plugin-api</artifactId>\n            <version>${maven.target.version}</version>\n            <scope>provided</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-component-annotations</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-classworlds</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-core</artifactId>\n            <version>${maven.target.version}</version>\n            <scope>provided</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.plugin-tools</groupId>\n            <artifactId>maven-plugin-annotations</artifactId>\n            <version>3.15.1</version>\n            <scope>provided</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.apache.maven</groupId>\n                    <artifactId>maven-artifact</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.codehaus.plexus</groupId>\n            <artifactId>plexus-archiver</artifactId>\n            <version>4.10.0</version>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.apache.commons</groupId>\n                    <artifactId>commons-compress</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.codehaus.plexus</groupId>\n            <artifactId>plexus-utils</artifactId>\n            <version>4.0.2</version>\n        </dependency>\n        <dependency>\n            <groupId>org.codehaus.plexus</groupId>\n            <artifactId>plexus-component-annotations</artifactId>\n            <version>2.2.0</version>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-model</artifactId>\n            <version>${maven.target.version}</version>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>commons-cli</groupId>\n            <artifactId>commons-cli</artifactId>\n            <version>1.9.0</version>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-artifact</artifactId>\n            <version>${maven.target.version}</version>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-compat</artifactId>\n            <version>${maven.target.version}</version>\n            <scope>provided</scope>\n            <exclusions>\n            <exclusion>\n                <groupId>org.codehaus.plexus</groupId>\n                <artifactId>plexus-utils</artifactId>\n            </exclusion>\n            </exclusions>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "modules/swagger-eclipse-transformer-maven-plugin/src/main/java/io/swagger/v3/oas/transformer/TransformMojo.java",
    "content": "package io.swagger.v3.oas.transformer;\n\nimport java.io.ByteArrayOutputStream;\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.OutputStream;\nimport java.io.PrintStream;\nimport java.io.UnsupportedEncodingException;\nimport java.nio.charset.StandardCharsets;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.function.Consumer;\n\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.plugin.AbstractMojo;\nimport org.apache.maven.plugin.MojoFailureException;\nimport org.apache.maven.plugins.annotations.Component;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\nimport org.apache.maven.project.MavenProject;\nimport org.apache.maven.project.MavenProjectHelper;\nimport org.eclipse.transformer.Transformer;\nimport org.eclipse.transformer.jakarta.JakartaTransformer;\n\n/**\n *\n * Adapted from https://github.com/eclipse/transformer/blob/main/org.eclipse.transformer.maven\n * not to add the transformed JAR as an attached artifact to the project.\n *\n * To be replaced with Eclipse original Transformer plugin when/if optional attachment is supported.\n *\n * This is a Maven plugin which runs the Eclipse Transformer on build artifacts\n * as part of the build.\n */\n@Mojo(name = \"run\", requiresDependencyResolution = ResolutionScope.RUNTIME_PLUS_SYSTEM, defaultPhase = LifecyclePhase.PACKAGE, requiresProject = true, threadSafe = true)\npublic class TransformMojo extends AbstractMojo {\n\n    @Parameter(defaultValue = \"${project}\", readonly = true, required = true)\n    private MavenProject\t\tproject;\n\n    @Parameter(defaultValue = \"false\", property = \"transformer-plugin.invert\", required = true)\n    private Boolean\t\t\t\tinvert;\n\n    @Parameter(defaultValue = \"true\", property = \"transformer-plugin.overwrite\", required = true)\n    private Boolean\t\t\t\toverwrite;\n\n    @Parameter(property = \"transformer-plugin.renames\", defaultValue = \"\")\n    private String\t\t\t\trulesRenamesUri;\n\n    @Parameter(property = \"transformer-plugin.versions\", defaultValue = \"\")\n    private String\t\t\t\trulesVersionUri;\n\n    @Parameter(property = \"transformer-plugin.bundles\", defaultValue = \"\")\n    private String\t\t\t\trulesBundlesUri;\n\n    @Parameter(property = \"transformer-plugin.direct\", defaultValue = \"\")\n    private String\t\t\t\trulesDirectUri;\n\n    @Parameter(property = \"transformer-plugin.per-class-constant\", defaultValue = \"\")\n    private String rulesPerClassConstantUri;\n\n    @Parameter(property = \"transformer-plugin.xml\", defaultValue = \"\")\n    private String\t\t\t\trulesXmlsUri;\n\n    @Parameter(defaultValue = \"transformed\")\n    private String\t\t\t\tclassifier;\n\n    private static final int\tMAX_LOG_BUFFER_SIZE = 16 * 1024;\n\n    @Parameter(defaultValue = \"${project.build.directory}\", required = true)\n    private File\t\t\t\toutputDirectory;\n\n    @Parameter(defaultValue = \"true\", property = \"transformer-plugin.attach\", required = true)\n    private Boolean\t\t\t\tattach;\n\n    @Component\n    private MavenProjectHelper\tprojectHelper;\n\n    /**\n     * Main execution point of the plugin. This looks at the attached artifacts,\n     * and runs the transformer on them.\n     *\n     * @throws MojoFailureException Thrown if there is an error during plugin\n     *             execution\n     */\n    @Override\n    public void execute() throws MojoFailureException {\n        final Transformer transformer = getTransformer();\n\n        final Artifact[] sourceArtifacts = getSourceArtifacts();\n        for (final Artifact sourceArtifact : sourceArtifacts) {\n            transform(transformer, sourceArtifact);\n        }\n    }\n\n    /**\n     * This runs the transformation process on the source artifact with the\n     * transformer provided. The transformed artifact is attached to the\n     * project.\n     *\n     * @param transformer The Transformer to use for the transformation\n     * @param sourceArtifact The Artifact to transform\n     * @throws MojoFailureException if plugin execution fails\n     */\n    public void transform(final Transformer transformer, final Artifact sourceArtifact) throws MojoFailureException {\n\n        final String sourceClassifier = sourceArtifact.getClassifier();\n        final String targetClassifier = (sourceClassifier == null || sourceClassifier.length() == 0) ? this.classifier\n                : sourceClassifier + \"-\" + this.classifier;\n\n        final File targetFile = new File(outputDirectory, sourceArtifact.getArtifactId() + \"-\" + targetClassifier + \"-\"\n                + sourceArtifact.getVersion() + \".\" + sourceArtifact.getType());\n\n        final List<String> args = new ArrayList<>();\n        args.add(sourceArtifact.getFile()\n                .getAbsolutePath());\n        args.add(targetFile.getAbsolutePath());\n\n        if (this.overwrite) {\n            args.add(\"-o\");\n        }\n\n        transformer.setArgs(args.toArray(new String[0]));\n        int rc = transformer.run();\n\n        if (rc != 0) {\n            throw new MojoFailureException(\"Transformer failed with an error: \" + Transformer.RC_DESCRIPTIONS[rc]);\n        }\n\n        if (attach) {\n            projectHelper.attachArtifact(project, sourceArtifact.getType(), targetClassifier, targetFile);\n        }\n    }\n\n    /**\n     * Builds a configured transformer for the specified source and target\n     * artifacts\n     *\n     * @return A configured transformer\n     */\n    public Transformer getTransformer() {\n        final Transformer transformer = new Transformer(\n                createLoggingPrintStream(getLog()::info),\n                createLoggingPrintStream(getLog()::error));\n        transformer.setOptionDefaults(JakartaTransformer.class, getOptionDefaults());\n        return transformer;\n    }\n\n    /**\n     * Gets the source artifacts that should be transformed\n     *\n     * @return an array to artifacts to be transformed\n     */\n    public Artifact[] getSourceArtifacts() {\n        List<Artifact> artifactList = new ArrayList<>();\n        if (project.getArtifact() != null && project.getArtifact()\n                .getFile() != null) {\n            artifactList.add(project.getArtifact());\n        }\n\n        for (final Artifact attachedArtifact : project.getAttachedArtifacts()) {\n            if (attachedArtifact.getFile() != null) {\n                artifactList.add(attachedArtifact);\n            }\n        }\n\n        return artifactList.toArray(new Artifact[0]);\n    }\n\n    private Map<Transformer.AppOption, String> getOptionDefaults() {\n        Map<Transformer.AppOption, String> optionDefaults = new HashMap<>();\n        optionDefaults.put(Transformer.AppOption.RULES_RENAMES,\n                isEmpty(rulesRenamesUri) ? \"jakarta-renames.properties\" : rulesRenamesUri);\n        optionDefaults.put(Transformer.AppOption.RULES_VERSIONS,\n                isEmpty(rulesVersionUri) ? \"jakarta-versions.properties\" : rulesVersionUri);\n        optionDefaults.put(Transformer.AppOption.RULES_BUNDLES,\n                isEmpty(rulesBundlesUri) ? \"jakarta-bundles.properties\" : rulesBundlesUri);\n        optionDefaults.put(Transformer.AppOption.RULES_DIRECT,\n                isEmpty(rulesDirectUri) ? \"jakarta-direct.properties\" : rulesDirectUri);\n        optionDefaults.put(Transformer.AppOption.RULES_MASTER_TEXT,\n                isEmpty(rulesXmlsUri) ? \"jakarta-text-master.properties\" : rulesXmlsUri);\n        optionDefaults.put(Transformer.AppOption.RULES_PER_CLASS_CONSTANT,\n                isEmpty(rulesPerClassConstantUri) ? \"jakarta-per-class-constant-master.properties\" : rulesPerClassConstantUri);\n        return optionDefaults;\n    }\n\n    private PrintStream createLoggingPrintStream(Consumer<String> logConsumer) {\n        try {\n            return new PrintStream(new LoggingOutputStream(logConsumer, MAX_LOG_BUFFER_SIZE), true, StandardCharsets.UTF_8.name());\n        } catch (UnsupportedEncodingException e) {\n            throw new IllegalStateException(\"UTF-8 encoding is not supported\", e);\n        }\n    }\n\n    private static final class LoggingOutputStream extends OutputStream {\n        private final Consumer<String> logConsumer;\n        private final ByteArrayOutputStream buffer = new ByteArrayOutputStream();\n        private final int maxBufferSize;\n\n        private LoggingOutputStream(Consumer<String> logConsumer, int maxBufferSize) {\n            this.logConsumer = logConsumer;\n            this.maxBufferSize = maxBufferSize > 0 ? maxBufferSize : Integer.MAX_VALUE;\n        }\n\n        @Override\n        public void write(int b) {\n            if (b == '\\n') {\n                flushBuffer();\n            } else if (b != '\\r') {\n                buffer.write(b);\n                if (buffer.size() >= this.maxBufferSize) {\n                    flushBuffer();\n                }\n            }\n        }\n\n        @Override\n        public void flush() {\n            flushBuffer();\n        }\n\n        @Override\n        public void close() throws IOException {\n            flushBuffer();\n        }\n\n        private void flushBuffer() {\n            if (buffer.size() == 0) {\n                return;\n            }\n            logConsumer.accept(new String(buffer.toByteArray(), StandardCharsets.UTF_8));\n            buffer.reset();\n        }\n    }\n\n    private boolean isEmpty(final String input) {\n        return input == null || input.trim()\n                .length() == 0;\n    }\n\n    void setProject(MavenProject project) {\n        this.project = project;\n    }\n\n    void setClassifier(String classifier) {\n        this.classifier = classifier;\n    }\n\n    MavenProjectHelper getProjectHelper() {\n        return projectHelper;\n    }\n\n    void setProjectHelper(MavenProjectHelper projectHelper) {\n        this.projectHelper = projectHelper;\n    }\n\n    void setOverwrite(Boolean overwrite) {\n        this.overwrite = overwrite;\n    }\n\n    void setOutputDirectory(File outputDirectory) {\n        this.outputDirectory = outputDirectory;\n    }\n\n    void setAttach(Boolean attach) {\n        this.attach = attach;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/.gitignore",
    "content": "\n# Created by https://www.gitignore.io/api/java,gradle,intellij\n\n### Intellij ###\n# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm\n# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839\n\n# User-specific stuff:\n.idea/**/workspace.xml\n.idea/**/tasks.xml\n.idea/dictionaries\n\n# Sensitive or high-churn files:\n.idea/**/dataSources/\n.idea/**/dataSources.ids\n.idea/**/dataSources.xml\n.idea/**/dataSources.local.xml\n.idea/**/sqlDataSources.xml\n.idea/**/dynamic.xml\n.idea/**/uiDesigner.xml\n\n# Gradle:\n.idea/**/gradle.xml\n.idea/**/libraries\n\n# CMake\ncmake-build-debug/\n\n# Mongo Explorer plugin:\n.idea/**/mongoSettings.xml\n\n## File-based project format:\n*.iws\n\n## Plugin-specific files:\n\n# IntelliJ\n/out/\n\n# mpeltonen/sbt-idea plugin\n.idea_modules/\n\n# JIRA plugin\natlassian-ide-plugin.xml\n\n# Cursive Clojure plugin\n.idea/replstate.xml\n\n# Ruby plugin and RubyMine\n/.rakeTasks\n\n# Crashlytics plugin (for Android Studio and IntelliJ)\ncom_crashlytics_export_strings.xml\ncrashlytics.properties\ncrashlytics-build.properties\nfabric.properties\n\n### Intellij Patch ###\n# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721\n\n# *.iml\n# modules.xml\n# .idea/misc.xml\n# *.ipr\n\n# Sonarlint plugin\n.idea/sonarlint\n\n### Java ###\n# Compiled class file\n*.class\n\n# Log file\n*.log\n\n# BlueJ files\n*.ctxt\n\n# Mobile Tools for Java (J2ME)\n.mtj.tmp/\n\n# Package Files #\n*.jar\n*.war\n*.ear\n*.zip\n*.tar.gz\n*.rar\n\n# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml\nhs_err_pid*\n\n### Gradle ###\n.gradle\n**/build/\n\n# Ignore Gradle GUI config\ngradle-app.setting\n\n# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)\n!gradle-wrapper.jar\n\n# Cache of project\n.gradletasknamecache\n\n# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898\n# gradle/wrapper/gradle-wrapper.properties\n\n\n# End of https://www.gitignore.io/api/java,gradle,intellij\n\n.idea/modules\n# IntelliJ IDEA\n.idea/\n*.iml\n*.iws\n*.ipr\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/README.md",
    "content": "# swagger-gradle-plugin\n\n**`swagger-gradle-plugin` supports gradle 3.2 and higher.**\n\n## Jakarta namespace support\n\nSince version 2.1.7 Swagger Core supports also Jakarta namespace, with a parallel set of artifacts with `-jakarta` suffix, providing the same functionality as the \"standard\" `javax` namespace ones.\nPlease check [Wiki](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Getting-started) for more details\n\nTo have gradle plugin use the `jakarta` namespace artifacts, you need to provide a value to parameter `buildClasspath`\nIn many cases it is sufficient to set it to the `classpath` value, like:\n\n`buildClasspath = classpath`\n\nAlternatively provide as value a classpath with the following dependencies (replacing the provided [`javax` ones](https://github.com/swagger-api/swagger-core/blob/master/modules/swagger-gradle-plugin/src/main/java/io/swagger/v3/plugins/gradle/SwaggerPlugin.java#L16-L25)):\n\n* org.apache.commons:commons-lang3:3.20.0\n* io.swagger.core.v3:swagger-jaxrs2-jakarta:2.2.9\n* jakarta.ws.rs:jakarta.ws.rs-api:3.0.0\n* jakarta.servlet:jakarta.servlet-api:5.0.0\n\n## Installation\n\n\n### Gradle 3.2 and higher\n\n```\nplugins {\n  id \"io.swagger.core.v3.swagger-gradle-plugin\" version \"2.2.45\"\n}\n```\n### Gradle 1.x and 2.0\n\n**NOTE**: Since version `2.0.10` gradle 1.x and 2.x up to 3.1 are not supported.\n\nwith versions up to `2.0.9`:\n\n```\nbuildscript {\n  repositories {\n    maven {\n      url \"https://plugins.gradle.org/m2/\"\n    }\n  }\n  dependencies {\n    classpath \"io.swagger.core.v3:swagger-gradle-plugin:2.2.45\"\n  }\n}\n\napply plugin: \"io.swagger.core.v3.swagger-gradle-plugin\"\n```\n\n## Tasks\n### resolve\n\n* Resolves project openAPI specification and saves the result in JSON, YAML or both formats.\nAll parameters except `outputFileName`, `outputFormat`, `classpath`, `skip`, `encoding`, `outputDir` and `outputPath` correspond\nto `swagger` [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties) with same name.\n\n#### Example Usage\n\n```\n\nresolve {\n    outputFileName = 'PetStoreAPI'\n    outputFormat = 'JSON'\n    prettyPrint = 'TRUE'\n    classpath = sourceSets.main.runtimeClasspath\n    resourcePackages = ['io.test']\n    outputDir = file('test')\n}\n```\n\n#### Parameters\nParameter | Description | Required | Default\n--------- | ----------- | --------- | -------\n`classpath`|classpath for resources to scan (swagger and deps already included in classpath)|true|\n`outputDir`|output path where file(s) are saved|true|\n`outputFileName`|file name (no extension)|false|`openapi`\n`outputFormat`|file format (`JSON`, `YAML`, `JSONANDYAML`|false|`JSON`\n`skip`|if `TRUE` skip execution|false|`FALSE`\n`encoding`|encoding of output file(s)|false|\n`resourcePackages`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|\n`resourceClasses`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|\n`prettyPrint`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|`TRUE`\n`sortOutput`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|`FALSE`\n`alwaysResolveAppPath`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|`FALSE`\n`skipResolveAppPath`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|`FALSE`\n`openApiFile`|openapi file to be merged with resolved specification, equivalent to [config](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties) openAPI|false|\n`filterClass`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|\n`readerClass`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|\n`scannerClass`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|\n`readAllResources`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|\n`ignoredRoutes`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|\n`objectMapperProcessorClass`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|\n`modelConverterClasses`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|\n`contextId`|see [Context](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#context)|false|\n`outputPath`|**DEPRECATED** output path where file(s) are saved|false|\n`defaultResponseCode`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|\n`groupsValidationStrategy`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|\n`validatorProcessorClass`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|\n`openapi31`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false   |\n`schemaResolution`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| DEFAULT |\n`openAPIVersion`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| `3.0.1/3.1.0` |\n\n**Note** parameter `openApiFile` corresponds to [config](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties) openAPI. It points to a location of a file in YAML or JSON format representing the input spec that will be merged with the resolved spec. Typically used to add Info section, or any other meta data.\nAn example of such file:\n\n```yaml\nopenapi: 3.0.4\ninfo:\n  version: '1.0'\n  title: Swagger Pet Sample App Config File\n  description: 'This is a sample server Petstore server.  You can find out more\n    about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net,\n    #swagger](http://swagger.io/irc/).  For this sample, you can use the api key\n    special-key to test the authorization filters.'\n  termsOfService: http://swagger.io/terms/\n  contact:\n    email: apiteam@swagger.io\n  license:\n    name: Apache 2.0\n    url: http://www.apache.org/licenses/LICENSE-2.0.html\n```\n\n- Since version 2.1.6, `sortOutput` parameter is available, allowing to sort object properties and map keys alphabetically.\n- Since version 2.1.6, `objectMapperProcessorClass` allows to configure also the ObjectMapper instance used to serialize the resolved OpenAPI\n- Since version 2.1.9, `alwaysResolveAppPath` parameter is available, allowing to trigger resolving of Application Path from annotation also not in runtime (e.g. using servlet in separate application, or in maven plugin at build time, etc)\n- Since version 2.2.12, `openapi31` parameter is available, if set to true the resolved spec will be processed into a 3.1.0 specification by resolving according to OAS 3.1 rules\n- Since version 2.1.15, `skipResolveAppPath` parameter is available, allowing to skip resolving of Application Path from annotation\n- Since version 2.2.17, `defaultResponseCode` parameter is available, allowing to set the code used when resolving responses with no http status code annotation\n- Since version 2.2.24, `schemaResolution` parameter is available, allowing to specify how object schemas and object properties within schemas are resolved for OAS 3.0 specification\n- Since version 2.2.28, `openAPIVersion` parameter is available, allowing to specify the version of the OpenAPI specification to be used for the resolved spec.\n- Since version 2.2.29, `groupsValidationStrategy` parameter is available, allowing to specify the strategy for resolving Validation annotations (`never`, `always`, `neverIfNoContext`).\n- Since version 2.2.29, `validatorProcessorClass` parameter is available, allowing to specify a custom validator processor class, implementation of `io.swagger.v3.core.util.ValidatorProcessor`.\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/build.gradle",
    "content": "// * * * * * * * * * * * *\n// Plugins\n// * * * * * * * * * * * *\nplugins {\n    id 'java-gradle-plugin'\n    // Publishing publicly\n    id 'com.gradle.plugin-publish' version '0.21.0'\n    // Publishing to maven\n    id 'maven-publish'\n}\n\n// * * * * * * * * * * * *\n// Dependencies\n// * * * * * * * * * * * *\n\nrepositories {\n    mavenLocal()\n    mavenCentral()\n}\n\ncompileJava {\n    options.release = 8\n}\n\ndependencies {\n    implementation gradleApi()\n    implementation 'org.apache.commons:commons-lang3:3.20.0'\n\n    testImplementation gradleTestKit()\n    testImplementation('com.github.tomakehurst:wiremock:2.27.2') {\n        exclude group: 'com.jayway.jsonpath', module: 'json-path'\n        exclude group: 'org.eclipse.jetty', module: 'jetty-server'\n        exclude group: 'org.eclipse.jetty', module: 'jetty-servlet'\n        exclude group: 'org.eclipse.jetty', module: 'jetty-servlets'\n        exclude group: 'org.eclipse.jetty', module: 'jetty-webapp'\n        exclude group: 'org.eclipse.jetty', module: 'jetty-proxy'\n        exclude group: 'commons-codec', module: 'commons-codec'\n        exclude group: 'com.github.jknack', module: 'handlebars'\n        exclude group: 'com.github.jknack', module: 'handlebars-helpers'\n    }\n    testImplementation 'javax.servlet:javax.servlet-api:3.1.0'\n    testImplementation 'com.google.guava:guava:32.1.3-jre'\n    testImplementation 'javax.ws.rs:javax.ws.rs-api:2.1.1'\n    testImplementation \"io.swagger.core.v3:swagger-jaxrs2:${project.version}\"\n    testImplementation 'org.testng:testng:7.10.2'\n    testImplementation \"org.eclipse.jetty:jetty-server:${project.jettyVersion}\"\n    testImplementation \"org.eclipse.jetty:jetty-servlet:${project.jettyVersion}\"\n    testImplementation \"org.eclipse.jetty:jetty-servlets:${project.jettyVersion}\"\n    testImplementation \"org.eclipse.jetty:jetty-webapp:${project.jettyVersion}\"\n    testImplementation \"org.eclipse.jetty:jetty-proxy:${project.jettyVersion}\"\n    testImplementation \"org.apache.httpcomponents:httpclient:4.5.14\"\n    testImplementation \"commons-codec:commons-codec:1.16.0\"\n    testImplementation \"commons-io:commons-io:2.15.1\"\n    testImplementation \"org.apache.commons:commons-compress:1.25.0\"\n    testImplementation \"com.github.jknack:handlebars:4.3.1\"\n    testImplementation \"com.github.jknack:handlebars-helpers:4.3.1\"\n}\n\n// * * * * * * * * * * * *\n// Project configuration\n// * * * * * * * * * * * *\n\nproject.description     = 'Gradle Plugin for Swagger core'\nproject.group           = 'io.swagger.core.v3'\n\nproject.ext.name        = 'swagger-gradle-plugin'\nproject.ext.pluginId    = 'io.swagger.core.v3.swagger-gradle-plugin'\nproject.ext.scm         = 'https://github.com/swagger-api/swagger-core.git'\nproject.ext.url         = 'https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin'\n\n// Configuration for: java-gradle-plugin\ngradlePlugin {\n    plugins {\n        swagger {\n            id = project.pluginId\n            implementationClass = 'io.swagger.v3.plugins.gradle.SwaggerPlugin'\n        }\n    }\n}\n\n// * * * * * * * * * * * *\n// Publishing\n// * * * * * * * * * * * *\n\n\n// Publishing to plugins.gradle.org\n// --------------------------------\n\n// Configuration for: com.gradle.plugin-publish\npluginBundle {\n    website = project.url\n    vcsUrl = project.scm\n    tags = ['swagger', 'openapi', 'api']\n\n    plugins {\n        swagger {\n            displayName = 'Swagger Gradle Plugin '\n            description = project.description\n            id          = project.pluginId\n        }\n    }\n}\n\ntest {\n    useTestNG()\n}\n\npublishing {\n    repositories {\n        maven {\n            url mavenLocal().url\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.0.1-bin.zip\nnetworkTimeout=10000\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/gradle.properties",
    "content": "version=2.2.46-SNAPSHOT\njettyVersion=9.4.53.v20231009\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/gradlew",
    "content": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n##############################################################################\n#\n#   Gradle start up script for POSIX generated by Gradle.\n#\n#   Important for running:\n#\n#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is\n#       noncompliant, but you have some other compliant shell such as ksh or\n#       bash, then to run this script, type that shell name before the whole\n#       command line, like:\n#\n#           ksh Gradle\n#\n#       Busybox and similar reduced shells will NOT work, because this script\n#       requires all of these POSIX shell features:\n#         * functions;\n#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,\n#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;\n#         * compound commands having a testable exit status, especially «case»;\n#         * various built-in commands including «command», «set», and «ulimit».\n#\n#   Important for patching:\n#\n#   (2) This script targets any POSIX shell, so it avoids extensions provided\n#       by Bash, Ksh, etc; in particular arrays are avoided.\n#\n#       The \"traditional\" practice of packing multiple parameters into a\n#       space-separated string is a well documented source of bugs and security\n#       problems, so this is (mostly) avoided, by progressively accumulating\n#       options in \"$@\", and eventually passing that to Java.\n#\n#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,\n#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;\n#       see the in-line comments for details.\n#\n#       There are tweaks for specific operating systems such as AIX, CygWin,\n#       Darwin, MinGW, and NonStop.\n#\n#   (3) This script is generated from the Groovy template\n#       https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt\n#       within the Gradle project.\n#\n#       You can find Gradle at https://github.com/gradle/gradle/.\n#\n##############################################################################\n\n# Attempt to set APP_HOME\n\n# Resolve links: $0 may be a link\napp_path=$0\n\n# Need this for daisy-chained symlinks.\nwhile\n    APP_HOME=${app_path%\"${app_path##*/}\"}  # leaves a trailing /; empty if no leading path\n    [ -h \"$app_path\" ]\ndo\n    ls=$( ls -ld \"$app_path\" )\n    link=${ls#*' -> '}\n    case $link in             #(\n      /*)   app_path=$link ;; #(\n      *)    app_path=$APP_HOME$link ;;\n    esac\ndone\n\n# This is normally unused\n# shellcheck disable=SC2034\nAPP_BASE_NAME=${0##*/}\nAPP_HOME=$( cd \"${APP_HOME:-./}\" && pwd -P ) || exit\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=maximum\n\nwarn () {\n    echo \"$*\"\n} >&2\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n} >&2\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"$( uname )\" in                #(\n  CYGWIN* )         cygwin=true  ;; #(\n  Darwin* )         darwin=true  ;; #(\n  MSYS* | MINGW* )  msys=true    ;; #(\n  NONSTOP* )        nonstop=true ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=$JAVA_HOME/jre/sh/java\n    else\n        JAVACMD=$JAVA_HOME/bin/java\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=java\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif ! \"$cygwin\" && ! \"$darwin\" && ! \"$nonstop\" ; then\n    case $MAX_FD in #(\n      max*)\n        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC3045\n        MAX_FD=$( ulimit -H -n ) ||\n            warn \"Could not query maximum file descriptor limit\"\n    esac\n    case $MAX_FD in  #(\n      '' | soft) :;; #(\n      *)\n        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC3045\n        ulimit -n \"$MAX_FD\" ||\n            warn \"Could not set maximum file descriptor limit to $MAX_FD\"\n    esac\nfi\n\n# Collect all arguments for the java command, stacking in reverse order:\n#   * args from the command line\n#   * the main class name\n#   * -classpath\n#   * -D...appname settings\n#   * --module-path (only if needed)\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif \"$cygwin\" || \"$msys\" ; then\n    APP_HOME=$( cygpath --path --mixed \"$APP_HOME\" )\n    CLASSPATH=$( cygpath --path --mixed \"$CLASSPATH\" )\n\n    JAVACMD=$( cygpath --unix \"$JAVACMD\" )\n\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    for arg do\n        if\n            case $arg in                                #(\n              -*)   false ;;                            # don't mess with options #(\n              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath\n                    [ -e \"$t\" ] ;;                      #(\n              *)    false ;;\n            esac\n        then\n            arg=$( cygpath --path --ignore --mixed \"$arg\" )\n        fi\n        # Roll the args list around exactly as many times as the number of\n        # args, so each arg winds up back in the position where it started, but\n        # possibly modified.\n        #\n        # NB: a `for` loop captures its iteration list before it begins, so\n        # changing the positional parameters here affects neither the number of\n        # iterations, nor the values presented in `arg`.\n        shift                   # remove old arg\n        set -- \"$@\" \"$arg\"      # push replacement arg\n    done\nfi\n\n# Collect all arguments for the java command;\n#   * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of\n#     shell script including quotes and variable substitutions, so put them in\n#     double quotes to make sure that they get re-expanded; and\n#   * put everything else in single quotes, so that it's not re-expanded.\n\nset -- \\\n        \"-Dorg.gradle.appname=$APP_BASE_NAME\" \\\n        -classpath \"$CLASSPATH\" \\\n        org.gradle.wrapper.GradleWrapperMain \\\n        \"$@\"\n\n# Stop when \"xargs\" is not available.\nif ! command -v xargs >/dev/null 2>&1\nthen\n    die \"xargs is not available\"\nfi\n\n# Use \"xargs\" to parse quoted args.\n#\n# With -n1 it outputs one arg per line, with the quotes and backslashes removed.\n#\n# In Bash we could simply go:\n#\n#   readarray ARGS < <( xargs -n1 <<<\"$var\" ) &&\n#   set -- \"${ARGS[@]}\" \"$@\"\n#\n# but POSIX shell has neither arrays nor command substitution, so instead we\n# post-process each arg (as a line of input to sed) to backslash-escape any\n# character that might be a shell metacharacter, then use eval to reverse\n# that process (while maintaining the separation between arguments), and wrap\n# the whole thing up as a single \"set\" statement.\n#\n# This will of course break if any of these variables contains a newline or\n# an unmatched quote.\n#\n\neval \"set -- $(\n        printf '%s\\n' \"$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\" |\n        xargs -n1 |\n        sed ' s~[^-[:alnum:]+,./:=@_]~\\\\&~g; ' |\n        tr '\\n' ' '\n    )\" '\"$@\"'\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/gradlew.bat",
    "content": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\r\n@rem you may not use this file except in compliance with the License.\r\n@rem You may obtain a copy of the License at\r\n@rem\r\n@rem      https://www.apache.org/licenses/LICENSE-2.0\r\n@rem\r\n@rem Unless required by applicable law or agreed to in writing, software\r\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\r\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n@rem See the License for the specific language governing permissions and\r\n@rem limitations under the License.\r\n@rem\r\n\r\n@if \"%DEBUG%\"==\"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\"==\"\" set DIRNAME=.\r\n@rem This is normally unused\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\r\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif %ERRORLEVEL% equ 0 goto execute\r\n\r\necho.\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto execute\r\n\r\necho.\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %*\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif %ERRORLEVEL% equ 0 goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nset EXIT_CODE=%ERRORLEVEL%\r\nif %EXIT_CODE% equ 0 set EXIT_CODE=1\r\nif not \"\"==\"%GRADLE_EXIT_CONSOLE%\" exit %EXIT_CODE%\r\nexit /b %EXIT_CODE%\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/settings.gradle",
    "content": "rootProject.name = 'swagger-gradle-plugin'\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/main/java/io/swagger/v3/plugins/gradle/SwaggerPlugin.java",
    "content": "package io.swagger.v3.plugins.gradle;\n\nimport io.swagger.v3.plugins.gradle.tasks.ResolveTask;\nimport org.gradle.api.Action;\nimport org.gradle.api.Plugin;\nimport org.gradle.api.Project;\nimport org.gradle.api.artifacts.Configuration;\nimport org.gradle.api.artifacts.DependencySet;\nimport org.gradle.api.tasks.SourceSetContainer;\nimport org.gradle.api.tasks.TaskProvider;\n\npublic class SwaggerPlugin implements Plugin<Project> {\n    public void apply(Project project) {\n        final Configuration config = project.getConfigurations().create(\"swaggerDeps\")\n                .setVisible(false);\n\n        config.defaultDependencies(new Action<DependencySet>() {\n            public void execute(DependencySet dependencies) {\n                dependencies.add(project.getDependencies().create(\"org.apache.commons:commons-lang3:3.20.0\"));\n                dependencies.add(project.getDependencies().create(\"io.swagger.core.v3:swagger-jaxrs2:2.2.46-SNAPSHOT\"));\n                dependencies.add(project.getDependencies().create(\"javax.ws.rs:javax.ws.rs-api:2.1\"));\n                dependencies.add(project.getDependencies().create(\"javax.servlet:javax.servlet-api:3.1.0\"));\n            }\n        });\n        TaskProvider<ResolveTask> lazyTask = project.getTasks().register(\"resolve\", ResolveTask.class,task -> {\n            task.buildClasspath.setFrom(config);\n            task.classpath.setFrom(project.getExtensions().findByType(SourceSetContainer.class).getByName(\"main\").getRuntimeClasspath().getFiles());\n            task.prettyPrint.convention(false);\n            task.readAllResources.convention(true);\n            task.outputFormat.convention(ResolveTask.Format.JSON);\n            task.skip.convention(false);\n            task.encoding.convention(\"UTF-8\");\n            task.sortOutput.convention(Boolean.FALSE);\n            task.alwaysResolveAppPath.convention(Boolean.FALSE);\n            task.skipResolveAppPath.convention(Boolean.FALSE);\n            task.openAPI31.convention(false);\n            task.convertToOpenAPI31.convention(false);\n            task.outputDir.convention(project.getLayout().getBuildDirectory().dir(\"swagger\"));\n        });\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/main/java/io/swagger/v3/plugins/gradle/tasks/ResolveTask.java",
    "content": "package io.swagger.v3.plugins.gradle.tasks;\n\nimport org.apache.commons.lang3.StringUtils;\nimport org.gradle.api.DefaultTask;\nimport org.gradle.api.GradleException;\nimport org.gradle.api.file.ConfigurableFileCollection;\nimport org.gradle.api.file.DirectoryProperty;\nimport org.gradle.api.file.RegularFileProperty;\nimport org.gradle.api.provider.Property;\nimport org.gradle.api.provider.Provider;\nimport org.gradle.api.provider.SetProperty;\nimport org.gradle.api.tasks.*;\nimport org.jetbrains.annotations.Nullable;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.lang.reflect.Method;\nimport java.net.MalformedURLException;\nimport java.net.URL;\nimport java.net.URLClassLoader;\nimport java.nio.charset.Charset;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.Collection;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.stream.Collectors;\nimport java.util.stream.Stream;\n\n@CacheableTask\npublic class ResolveTask extends DefaultTask {\n\n    public enum Format {JSON, YAML, JSONANDYAML}\n\n    @Input\n    @Optional\n    public final Property<String> outputFileName = getProject().getObjects().property(String.class);\n    @OutputDirectory\n    public final DirectoryProperty outputDir = getProject().getObjects().directoryProperty();\n    @InputFile\n    @Optional\n    @PathSensitive(PathSensitivity.RELATIVE)\n    public final RegularFileProperty openApiFile = getProject().getObjects().fileProperty();\n    @Input\n    @Optional\n    public final Property<Format> outputFormat = getProject().getObjects().property(Format.class);\n    @Input\n    @Optional\n    public final SetProperty<String> resourcePackages = getProject().getObjects().setProperty(String.class);\n    @Input\n    @Optional\n    public final SetProperty<String> resourceClasses = getProject().getObjects().setProperty(String.class);\n    @Input\n    @Optional\n    public final Property<String> filterClass = getProject().getObjects().property(String.class);\n    @Input\n    @Optional\n    public final Property<String> readerClass = getProject().getObjects().property(String.class);\n    @Input\n    @Optional\n    public final Property<String> scannerClass = getProject().getObjects().property(String.class);\n    @Input\n    @Optional\n    public final Property<Boolean> prettyPrint = getProject().getObjects().property(Boolean.class);\n    @Input\n    @Optional\n    public final Property<Boolean> readAllResources = getProject().getObjects().property(Boolean.class);\n    @Input\n    @Optional\n    public final SetProperty<String> ignoredRoutes = getProject().getObjects().setProperty(String.class);\n    @Classpath\n    @Optional\n    public final ConfigurableFileCollection buildClasspath = getProject().getObjects().fileCollection();\n    @Classpath\n    public final ConfigurableFileCollection classpath = getProject().getObjects().fileCollection();\n    /**\n     * Completely skips execution of the task.\n     *\n     * @deprecated if you want to skip the task do not execute it in the first place or remove the task dependency\n     * that causes it to run\n     */\n    @Deprecated\n    @Input\n    @Optional\n    public final Property<Boolean> skip = getProject().getObjects().property(Boolean.class);\n    @Input\n    @Optional\n\n    public final Property<String> encoding = getProject().getObjects().property(String.class);\n    /**\n     * @since 2.0.6\n     */\n    @Input\n    @Optional\n    public final SetProperty<String> modelConverterClasses = getProject().getObjects().setProperty(String.class);\n    @Input\n    @Optional\n    public final Property<String> objectMapperProcessorClass = getProject().getObjects().property(String.class);\n    @Input\n    @Optional\n    public final Property<Boolean> sortOutput = getProject().getObjects().property(Boolean.class);\n    @Input\n    @Optional\n\n    public final Property<Boolean> alwaysResolveAppPath = getProject().getObjects().property(Boolean.class);\n    @Input\n    @Optional\n\n\n    public final Property<Boolean> skipResolveAppPath = getProject().getObjects().property(Boolean.class);\n    @Input\n    @Optional\n    public final Property<String> contextId = getProject().getObjects().property(String.class);\n    @Input\n    @Optional\n    public final Property<Boolean> openAPI31 = getProject().getObjects().property(Boolean.class);\n\n    /**\n     * @since 2.2.12\n     */\n    @Input\n    @Optional\n    public final Property<Boolean> convertToOpenAPI31 = getProject().getObjects().property(Boolean.class);\n\n    /**\n     * @since 2.2.24\n     */\n    @Input\n    @Optional\n    public final Property<String> schemaResolution = getProject().getObjects().property(String.class);\n\n    @Input\n    @Optional\n    private Property<String> openAPIVersion = getProject().getObjects().property(String.class);;\n\n    @Input\n    @Optional\n    public final Property<String> defaultResponseCode = getProject().getObjects().property(String.class);\n\n    @Input\n    @Optional\n    public final Property<String> validatorProcessorClass = getProject().getObjects().property(String.class);\n\n    @Input\n    @Optional\n    public final Property<String> groupsValidationStrategy = getProject().getObjects().property(String.class);\n\n    public Property<String> getOutputFileName() {\n        return outputFileName;\n    }\n\n    public RegularFileProperty getOpenApiFile() {\n        return openApiFile;\n    }\n    public DirectoryProperty getOutputDir() {\n        return outputDir;\n    }\n\n    public void setOutputDir(String outputPath) {\n        this.outputDir.set(getProject().file(outputPath));\n    }\n\n    public void setOutputFileName(String outputFileName) {\n        this.outputFileName.set(outputFileName);\n    }\n\n\n    public void setOpenApiFile(File openApiFile) {\n        this.openApiFile.set(openApiFile);\n    }\n\n    public ConfigurableFileCollection getClasspath() {\n        return classpath;\n    }\n\n    public void setClasspath(Iterable<File> classpath) {\n        this.classpath.setFrom(classpath);\n    }\n\n    public ConfigurableFileCollection getBuildClasspath() {\n        return buildClasspath;\n    }\n\n    public void setBuildClasspath(Iterable<File> buildClasspath) {\n        this.buildClasspath.setFrom(buildClasspath);\n    }\n\n    /**\n     * @deprecated Use {@linkplain #outputDir} instead.\n     */\n    @Deprecated\n    @Internal\n    public Provider<String> getOutputPath() {\n        return outputDir.map(dir -> dir.getAsFile().getPath());\n    }\n\n    /**\n     * @deprecated Use {@linkplain #outputDir} instead.\n     */\n    @Deprecated\n    public void setOutputPath(String outputPath) {\n        this.outputDir.set(getProject().file(outputPath));\n    }\n\n    public Property<Format> getOutputFormat() {\n        return outputFormat;\n    }\n\n    public void setOutputFormat(String outputFormat) {\n        this.outputFormat.set(Format.valueOf(outputFormat));\n    }\n\n    public void setOutputFormat(Format outputFormat) {\n        this.outputFormat.set(outputFormat);\n    }\n\n    public SetProperty<String> getResourcePackages() {\n        return resourcePackages;\n    }\n\n    public void setResourcePackages(Set<String> resourcePackages) {\n        this.resourcePackages.set(resourcePackages);\n    }\n\n    public SetProperty<String> getModelConverterClasses() {\n        return modelConverterClasses;\n    }\n\n    public void setModelConverterClasses(Set<String> modelConverterClasses) {\n        this.modelConverterClasses.set(modelConverterClasses);\n    }\n\n    public SetProperty<String> getResourceClasses() {\n        return resourceClasses;\n    }\n\n    public void setResourceClasses(Set<String> resourceClasses) {\n        this.resourceClasses.set(resourceClasses);\n    }\n\n    public Property<String> getFilterClass() {\n        return filterClass;\n    }\n\n    public void setFilterClass(String filterClass) {\n        this.filterClass.set(filterClass);\n    }\n\n    public Property<String> getReaderClass() {\n        return readerClass;\n    }\n\n    public void setReaderClass(String readerClass) {\n        this.readerClass.set(readerClass);\n    }\n\n    public Property<String> getObjectMapperProcessorClass() {\n        return objectMapperProcessorClass;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public void setObjectMapperProcessorClass(String objectMapperProcessorClass) {\n        this.objectMapperProcessorClass.set(objectMapperProcessorClass);\n    }\n\n    /**\n     * @since 2.2.17\n     */\n    public Property<String> getDefaultResponseCode() {\n        return defaultResponseCode;\n    }\n\n    /**\n     * @since 2.2.17\n     */\n    public void setDefaultResponseCode(String defaultResponseCode) {\n        this.defaultResponseCode.set(defaultResponseCode);\n    }\n\n    /**\n     * @since 2.2.29\n     */\n    public Property<String> getValidatorProcessorClass() {\n        return validatorProcessorClass;\n    }\n\n    /**\n     * @since 2.2.29\n     */\n    public void setValidatorProcessorClass(String validatorProcessorClass) {\n        this.validatorProcessorClass.set(validatorProcessorClass);\n    }\n\n    /**\n     * @since 2.2.29\n     */\n    public Property<String> getGroupsValidationStrategy() {\n        return groupsValidationStrategy;\n    }\n\n    /**\n     * @since 2.2.29\n     */\n    public void setGroupsValidationStrategy(String groupsValidationStrategy) {\n        this.groupsValidationStrategy.set(groupsValidationStrategy);\n    }\n\n    public Property<String> getContextId() {\n        return contextId;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public void setContextId(String contextId) {\n        this.contextId.set(contextId);\n    }\n\n    public Property<String> getScannerClass() {\n        return scannerClass;\n    }\n\n    public void setScannerClass(String scannerClass) {\n        this.scannerClass.set(scannerClass);\n    }\n\n    public Property<Boolean> getPrettyPrint() {\n        return prettyPrint;\n    }\n\n    public void setPrettyPrint(@Nullable String prettyPrint) {\n        setPrettyPrint(prettyPrint == null ? null : Boolean.valueOf(prettyPrint));\n    }\n\n    public void setPrettyPrint(@Nullable Boolean prettyPrint) {\n        this.prettyPrint.set(prettyPrint);\n    }\n\n    public Property<Boolean> getReadAllResources() {\n        return readAllResources;\n    }\n\n    public void setReadAllResources(Boolean readAllResources) {\n        this.readAllResources.set(readAllResources);\n        ;\n    }\n\n    public void setReadAllResources(@Nullable String readAllResources) {\n        setReadAllResources(readAllResources == null ? null : Boolean.valueOf(readAllResources));\n    }\n\n    public SetProperty<String> getIgnoredRoutes() {\n        return ignoredRoutes;\n    }\n\n    public void setIgnoredRoutes(Collection<String> ignoredRoutes) {\n        this.ignoredRoutes.set(ignoredRoutes);\n    }\n\n    public Property<Boolean> getSkip() {\n        return skip;\n    }\n\n    public void setSkip(Boolean skip) {\n        this.skip.set(skip);\n    }\n\n    public Property<String> getEncoding() {\n        return encoding;\n    }\n\n    public void setEncoding(String encoding) {\n        this.encoding.set(encoding);\n    }\n\n    public Property<Boolean> getSortOutput() {\n        return sortOutput;\n    }\n\n    public void setSortOutput(Boolean sortOutput) {\n        this.sortOutput.set(sortOutput);\n    }\n\n    public Property<Boolean> getAlwaysResolveAppPath() {\n        return alwaysResolveAppPath;\n    }\n\n    public void setAlwaysResolveAppPath(Boolean alwaysResolveAppPath) {\n        this.alwaysResolveAppPath.set(alwaysResolveAppPath);\n    }\n\n    public void setAlwaysResolveAppPath(@Nullable String alwaysResolveAppPath) {\n        setAlwaysResolveAppPath(alwaysResolveAppPath == null ? null : Boolean.valueOf(alwaysResolveAppPath));\n    }\n\n    public Property<Boolean> getSkipResolveAppPath() {\n        return skipResolveAppPath;\n    }\n\n    /**\n     * @since 2.2.15\n     */\n    public void setSkipResolveAppPath(Boolean skipResolveAppPath) {\n        this.skipResolveAppPath.set(skipResolveAppPath);\n        ;\n    }\n\n    public Property<Boolean> getOpenAPI31() {\n        return openAPI31;\n    }\n\n    public void setOpenAPI31(Boolean openAPI31) {\n        this.openAPI31.set(openAPI31);\n    }\n\n    public void setOpenAPI31(@Nullable String openAPI31) {\n        setOpenAPI31(openAPI31 == null ? null : Boolean.valueOf(openAPI31));\n    }\n\n    public Property<Boolean> getConvertToOpenAPI31() {\n        return convertToOpenAPI31;\n    }\n\n    public void setConvertToOpenAPI31(Boolean convertToOpenAPI31) {\n        this.convertToOpenAPI31.set(convertToOpenAPI31);\n        if (Boolean.TRUE.equals(convertToOpenAPI31)) {\n            this.openAPI31.set(Boolean.TRUE);\n        }\n    }\n\n    public void setConvertToOpenAPI31(@Nullable String convertToOpenAPI31) {\n        setConvertToOpenAPI31(convertToOpenAPI31 == null ? null : Boolean.valueOf(convertToOpenAPI31));\n    }\n\n    public Property<String> getSchemaResolution() {\n        return schemaResolution;\n    }\n\n    public void setSchemaResolution(String schemaResolution) {\n        this.schemaResolution.set(schemaResolution);\n    }\n\n    public Property<String> getOpenAPIVersion() {\n        return openAPIVersion;\n    }\n\n    public void setOpenAPIVersion(String openAPIVersion) {\n        this.openAPIVersion.set(openAPIVersion);\n    }\n\n    @TaskAction\n    public void resolve() throws GradleException {\n        if (skip.getOrElse(false)) {\n            getLogger().warn(\"You use the deprecated 'skip' property. For better performance prevent the execution instead (for example by calling the `compileJava` task instead)\");\n            getLogger().info(\"Skipping OpenAPI specification resolution\");\n            return;\n        }\n        getLogger().info(\"Resolving OpenAPI specification..\");\n        Stream<URL> classpathStream = classpath.getFiles().stream().map(f -> {\n            try {\n                return f.toURI().toURL();\n            } catch (MalformedURLException e) {\n                throw new GradleException(\n                        String.format(\"Could not create classpath for annotations task %s.\", getName()), e);\n            }\n        });\n\n\n        Stream<URL> buildClasspathStream = buildClasspath.getFiles().stream().map(f -> {\n            try {\n                return f.toURI().toURL();\n            } catch (MalformedURLException e) {\n                throw new GradleException(\n                        String.format(\"Could not create classpath for annotations task %s.\", getName()), e);\n            }\n        });\n\n        URL[] urls = Stream.concat(classpathStream, buildClasspathStream)\n                .distinct()\n                .toArray(URL[]::new);\n\n        //ClassLoader classLoader = new URLClassLoader(urls.toArray(new URL[urls.size()]), Thread.currentThread().getContextClassLoader());\n\n        try (URLClassLoader classLoader = new URLClassLoader(urls)) {\n            Class<?> swaggerLoaderClass = classLoader.loadClass(\"io.swagger.v3.jaxrs2.integration.SwaggerLoader\");\n            Object swaggerLoader = swaggerLoaderClass.newInstance();\n\n            Method method = null;\n            method = swaggerLoaderClass.getDeclaredMethod(\"setOutputFormat\", String.class);\n            method.invoke(swaggerLoader, outputFormat.get().name());\n\n            if (openApiFile.isPresent()) {\n                final File openApiFileHandle = openApiFile.get().getAsFile();\n                if (openApiFileHandle.exists() && openApiFileHandle.isFile()) {\n                    String openapiFileContent = new String(Files.readAllBytes(openApiFileHandle.toPath()), encoding.get());\n                    if (StringUtils.isNotBlank(openapiFileContent)) {\n                        method = swaggerLoaderClass.getDeclaredMethod(\"setOpenapiAsString\", String.class);\n                        method.invoke(swaggerLoader, openapiFileContent);\n                    }\n                }\n            }\n\n            if (resourcePackages.isPresent() && !resourcePackages.get().isEmpty()) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setResourcePackages\", String.class);\n                method.invoke(swaggerLoader, resourcePackages.get().stream().map(Object::toString).collect(Collectors.joining(\",\")));\n            }\n            if (resourceClasses.isPresent() && !resourceClasses.get().isEmpty()) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setResourceClasses\", String.class);\n                method.invoke(swaggerLoader, resourceClasses.get().stream().map(Object::toString).collect(Collectors.joining(\",\")));\n            }\n            if (modelConverterClasses.isPresent() && !modelConverterClasses.get().isEmpty()) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setModelConverterClasses\", String.class);\n                method.invoke(swaggerLoader, modelConverterClasses.get().stream().map(Object::toString).collect(Collectors.joining(\",\")));\n            }\n            if (ignoredRoutes.isPresent() && !ignoredRoutes.get().isEmpty()) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setIgnoredRoutes\", String.class);\n                method.invoke(swaggerLoader, ignoredRoutes.get().stream().map(Object::toString).collect(Collectors.joining(\",\")));\n            }\n\n            if (filterClass.isPresent() && StringUtils.isNotBlank(filterClass.get())) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setFilterClass\", String.class);\n                method.invoke(swaggerLoader, filterClass.get());\n            }\n\n            if (readerClass.isPresent() && StringUtils.isNotBlank(readerClass.get())) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setReaderClass\", String.class);\n                method.invoke(swaggerLoader, readerClass.get());\n            }\n\n            if (scannerClass.isPresent() && StringUtils.isNotBlank(scannerClass.get())) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setScannerClass\", String.class);\n                method.invoke(swaggerLoader, scannerClass.get());\n            }\n\n            if (contextId.isPresent() && StringUtils.isNotBlank(contextId.get())) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setContextId\", String.class);\n                method.invoke(swaggerLoader, contextId.get());\n            }\n\n            if (objectMapperProcessorClass.isPresent() && StringUtils.isNotBlank(objectMapperProcessorClass.get())) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setObjectMapperProcessorClass\", String.class);\n                method.invoke(swaggerLoader, objectMapperProcessorClass.get());\n            }\n\n            if (defaultResponseCode.isPresent() && StringUtils.isNotBlank(defaultResponseCode.get())) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setDefaultResponseCode\", String.class);\n                method.invoke(swaggerLoader, defaultResponseCode.get());\n            }\n\n            if (validatorProcessorClass.isPresent() && StringUtils.isNotBlank(validatorProcessorClass.get())) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setValidatorProcessorClass\", String.class);\n                method.invoke(swaggerLoader, validatorProcessorClass.get());\n            }\n\n            if (groupsValidationStrategy.isPresent() && StringUtils.isNotBlank(groupsValidationStrategy.get())) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setGroupsValidationStrategy\", String.class);\n                method.invoke(swaggerLoader, groupsValidationStrategy.get());\n            }\n\n            method = swaggerLoaderClass.getDeclaredMethod(\"setPrettyPrint\", Boolean.class);\n            method.invoke(swaggerLoader, prettyPrint.get());\n\n            method = swaggerLoaderClass.getDeclaredMethod(\"setSortOutput\", Boolean.class);\n            method.invoke(swaggerLoader, sortOutput.get());\n\n            method = swaggerLoaderClass.getDeclaredMethod(\"setAlwaysResolveAppPath\", Boolean.class);\n            method.invoke(swaggerLoader, alwaysResolveAppPath.get());\n\n            method = swaggerLoaderClass.getDeclaredMethod(\"setSkipResolveAppPath\", Boolean.class);\n            method.invoke(swaggerLoader, skipResolveAppPath.get());\n\n            method = swaggerLoaderClass.getDeclaredMethod(\"setReadAllResources\", Boolean.class);\n            method.invoke(swaggerLoader, readAllResources.get());\n\n            if (openAPI31.isPresent() && !openAPI31.get() && convertToOpenAPI31.get()) {\n                throw new GradleException(\"`convertToOpenAPI31` can't be enabled when `openAPI31` support is explicity disabled\");\n            }\n            if (openAPI31.isPresent()) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setOpenAPI31\", Boolean.class);\n                method.invoke(swaggerLoader, openAPI31.get());\n            }\n\n            if (convertToOpenAPI31.isPresent()) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setConvertToOpenAPI31\", Boolean.class);\n                method.invoke(swaggerLoader, convertToOpenAPI31.get());\n            }\n            if (schemaResolution.isPresent()) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setSchemaResolution\", String.class);\n                method.invoke(swaggerLoader, schemaResolution.get());\n            }\n            if (openAPIVersion.isPresent()) {\n                method = swaggerLoaderClass.getDeclaredMethod(\"setOpenAPIVersion\", String.class);\n                method.invoke(swaggerLoader, openAPIVersion.get());\n            }\n\n            method = swaggerLoaderClass.getDeclaredMethod(\"resolve\");\n            Map<String, String> specs = (Map<String, String>) method.invoke(swaggerLoader);\n\n            final Path outputFile = outputDir.getAsFile().get().toPath();\n            if (specs.get(\"JSON\") != null) {\n                Path path = outputFile.resolve(String.format(\"%s.json\", outputFileName.get()));\n                Files.write(path, specs.get(\"JSON\").getBytes(Charset.forName(encoding.get())));\n                getLogger().debug(\"Saved openapi to {}\", path.toAbsolutePath());\n            }\n            if (specs.get(\"YAML\") != null) {\n                Path path = outputFile.resolve(String.format(\"%s.yaml\", outputFileName.get()));\n                Files.write(path, specs.get(\"YAML\").getBytes(Charset.forName(encoding.get())));\n                getLogger().debug(\"Saved openapi to {}\", path.toAbsolutePath());\n            }\n        } catch (IOException e) {\n            throw new GradleException(\"Failed to write API definition: \" + e.getMessage(), e);\n        } catch (Exception e) {\n            throw new GradleException(e.getMessage(), e);\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/SwaggerResolveTest.java",
    "content": "package io.swagger.v3.plugins.gradle;\n\nimport static java.lang.String.format;\nimport static org.gradle.testkit.runner.TaskOutcome.SUCCESS;\nimport static org.testng.Assert.assertTrue;\n\nimport java.io.BufferedWriter;\nimport java.io.File;\nimport java.io.FileWriter;\nimport java.io.IOException;\nimport java.nio.charset.StandardCharsets;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\n\nimport org.gradle.testkit.runner.BuildResult;\nimport org.gradle.testkit.runner.GradleRunner;\nimport org.testng.annotations.Test;\nimport org.testng.annotations.BeforeMethod;\n\npublic class SwaggerResolveTest {\n\n    private Path testProjectDir;\n    private Path buildFile;\n    private Path settingsFile;\n    private Path openapiInputFile;\n    private String outputFile;\n    private String outputDir;\n\n    @BeforeMethod\n    public void setup() throws IOException {\n        testProjectDir = Files.createTempDirectory(\"test\");\n        buildFile = Files.createFile(testProjectDir.resolve(\"build.gradle\"));\n        settingsFile = Files.createFile(testProjectDir.resolve(\"settings.gradle\"));\n        openapiInputFile = Files.createFile(testProjectDir.resolve(\"openapiinput.yaml\"));\n        writeFile(openapiInputFile, \"openapi: 3.0.1\\n\" +\n                \"servers:\\n\" +\n                \"- url: http://foo\\n\" +\n                \"  description: server 1\\n\" +\n                \"  variables:\\n\" +\n                \"    var1:\\n\" +\n                \"      description: var 1\\n\" +\n                \"      enum:\\n\" +\n                \"      - \\\"1\\\"\\n\" +\n                \"      - \\\"2\\\"\\n\" +\n                \"      default: \\\"2\\\"\\n\" +\n                \"    var2:\\n\" +\n                \"      description: var 2\\n\" +\n                \"      enum:\\n\" +\n                \"      - \\\"1\\\"\\n\" +\n                \"      - \\\"2\\\"\\n\" +\n                \"      default: \\\"2\\\"\");\n    }\n\n    @Test\n    public void testSwaggerResolveTask() throws IOException {\n        outputDir = testProjectDir.toString() + \"/target\";\n        outputFile = testProjectDir.toString() + \"/testAPI.json\";\n        //outputDir = \"/tmp/a/target\";\n        String resolveTask = \"resolve\";\n\n        String buildFileContent =\n                \"plugins {\\n\" +\n                \"    id 'java'\\n\" +\n                \"    id 'io.swagger.core.v3.swagger-gradle-plugin'\\n\" +\n                \"}\\n\" +\n                \"sourceSets {\\n\" +\n                \"    test {\\n\" +\n                \"        java {\\n\" +\n                \"            srcDirs('\" + toNormalizedPath(new File(\"src/test/java\").getAbsolutePath()) + \"')\\n\" +\n                \"            exclude('**/*Test.java')\\n\" +\n                \"        }\\n\" +\n                \"    }\\n\" +\n                \"}\\n\" +\n                \"repositories {\\n\" +\n                \"    mavenLocal()\\n\" +\n                \"    mavenCentral()\\n\" +\n                \"}\\n\" +\n                \"dependencies {  \\n\" +\n                \"    implementation 'io.swagger.core.v3:swagger-jaxrs2:2.2.46-SNAPSHOT'\\n\" +\n                \"    implementation 'javax.ws.rs:javax.ws.rs-api:2.1'\\n\" +\n                \"    implementation 'javax.servlet:javax.servlet-api:3.1.0'\\n\" +\n                \"    testImplementation 'com.github.tomakehurst:wiremock:2.27.2'\\n\" +\n                \"    testImplementation 'org.testng:testng:7.10.2'\\n\" +\n                \"\\n\" +\n                \"\\n\" +\n                \"}\\n\" +\n                resolveTask + \" {\\n\" +\n                \"    outputFileName = 'PetStoreAPI'\\n\" +\n                \"    outputFormat = 'JSON'\\n\" +\n                \"    prettyPrint = 'TRUE'\\n\" +\n                //\"    classpath = compileTestJava.outputs.files\\n\" +\n                \"    classpath = sourceSets.test.runtimeClasspath\\n\" +\n                \"    resourcePackages = ['io.swagger.v3.plugins.gradle.petstore']\\n\" +\n                \"    outputPath = \\'\" + toNormalizedPath(outputDir) + \"\\'\\n\" +\n                \"    filterClass = \\'io.swagger.v3.plugins.gradle.resources.MyFilter\\'\\n\" +\n                \"    openApiFile = file(\\'\" + toNormalizedPath(openapiInputFile.toAbsolutePath().toString()) + \"\\')\\n\" +\n                \"}\";\n\n\n        String settingsFileContent = \"pluginManagement {\\n\" +\n                \"    repositories {\\n\" +\n                \"        maven {\\n\" +\n                \"            url mavenLocal().url\\n\" +\n                \"        }\\n\" +\n                \"        mavenCentral()\\n\" +\n                \"        gradlePluginPortal()\\n\" +\n                \"    }\\n\" +\n                \"}\\n\" +\n                \"rootProject.name = 'gradle-test'\\n\" +\n                \"\\n\";\n        writeFile(buildFile, buildFileContent);\n        writeFile(settingsFile, settingsFileContent);\n\n        BuildResult result = GradleRunner.create()\n                .withPluginClasspath()\n                .withProjectDir(testProjectDir.toFile())\n                .withDebug(true)\n                .withArguments(resolveTask, \"--stacktrace\", \"--info\")\n                .forwardOutput()\n                .build();\n\n        assertTrue(result.taskPaths(SUCCESS).contains(format(\":%s\", resolveTask)));\n        assertTrue(new File(outputDir + \"/PetStoreAPI.json\").exists());\n        assertTrue(Files.readString(Paths.get(outputDir, \"PetStoreAPI.json\")).contains(\"UPDATEDBYFILTER\"));\n    }\n\n    @Test\n    public void testSwaggerResolveWithOAS31OptionTask() throws IOException {\n        outputDir = testProjectDir.toString() + \"/target\";\n        outputFile = testProjectDir.toString() + \"/testAPI31.json\";\n        //outputDir = \"/tmp/a/target\";\n        String resolveTask = \"resolve\";\n\n        String buildFileContent =\n                \"plugins {\\n\" +\n                \"    id 'java'\\n\" +\n                \"    id 'io.swagger.core.v3.swagger-gradle-plugin'\\n\" +\n                \"}\\n\" +\n                \"sourceSets {\\n\" +\n                \"    test {\\n\" +\n                \"        java {\\n\" +\n                \"            srcDirs('\" + toNormalizedPath(new File(\"src/test/java\").getAbsolutePath()) + \"')\\n\" +\n                \"            exclude('**/*Test.java')\\n\" +\n                \"        }\\n\" +\n                \"    }\\n\" +\n                \"}\\n\" +\n                \"repositories {\\n\" +\n                \"    mavenLocal()\\n\" +\n                \"    mavenCentral()\\n\" +\n                \"}\\n\" +\n                \"dependencies {  \\n\" +\n                \"    implementation 'io.swagger.core.v3:swagger-jaxrs2:2.2.46-SNAPSHOT'\\n\" +\n                \"    implementation 'javax.ws.rs:javax.ws.rs-api:2.1'\\n\" +\n                \"    implementation 'javax.servlet:javax.servlet-api:3.1.0'\\n\" +\n                \"    testImplementation 'com.github.tomakehurst:wiremock:2.27.2'\\n\" +\n                \"    testImplementation 'org.testng:testng:7.10.2'\\n\" +\n                \"\\n\" +\n                \"\\n\" +\n                \"}\\n\" +\n                resolveTask + \" {\\n\" +\n                \"    outputFileName = 'PetStoreAPI31'\\n\" +\n                \"    outputFormat = 'JSON'\\n\" +\n                \"    prettyPrint = 'TRUE'\\n\" +\n                //\"    classpath = compileTestJava.outputs.files\\n\" +\n                \"    classpath = sourceSets.test.runtimeClasspath\\n\" +\n                \"    resourcePackages = ['io.swagger.v3.plugins.gradle.petstore']\\n\" +\n                \"    outputPath = \\'\" + toNormalizedPath(outputDir) + \"\\'\\n\" +\n                \"    openAPI31 = \\'TRUE\\'\\n\" +\n                \"    convertToOpenAPI31 = \\'TRUE\\'\\n\" +\n                \"    openApiFile = file(\\'\" + toNormalizedPath(openapiInputFile.toAbsolutePath().toString()) + \"\\')\\n\" +\n                \"}\";\n\n\n        String settingsFileContent = \"pluginManagement {\\n\" +\n                \"    repositories {\\n\" +\n                \"        maven {\\n\" +\n                \"            url mavenLocal().url\\n\" +\n                \"        }\\n\" +\n                \"        mavenCentral()\\n\" +\n                \"        gradlePluginPortal()\\n\" +\n                \"    }\\n\" +\n                \"}\\n\" +\n                \"rootProject.name = 'gradle-test'\\n\" +\n                \"\\n\";\n        writeFile(buildFile, buildFileContent);\n        writeFile(settingsFile, settingsFileContent);\n\n        BuildResult result = GradleRunner.create()\n                .withPluginClasspath()\n                .withProjectDir(testProjectDir.toFile())\n                .withDebug(true)\n                .withArguments(resolveTask, \"--stacktrace\", \"--info\")\n                .forwardOutput()\n                .build();\n\n        assertTrue(result.taskPaths(SUCCESS).contains(format(\":%s\", resolveTask)));\n        assertTrue(new File(outputDir + \"/PetStoreAPI31.json\").exists());\n\n        byte[] content = Files.readAllBytes(Paths.get(outputDir, \"PetStoreAPI31.json\"));\n\n        String strContent = new String(content, StandardCharsets.UTF_8);\n        assertTrue(strContent.contains(\"\\\"openapi\\\" : \\\"3.0.1\\\"\"));\n    }\n\n    private static void writeFile(Path destination, String content) throws IOException {\n        try (BufferedWriter output = new BufferedWriter(new FileWriter(destination.toFile()))) {\n            output.write(content);\n        }\n    }\n\n    private static String toNormalizedPath(String path) {\n        return path.replace(\"\\\\\", \"/\"); // necessary on windows\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/EmptyPetResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore;\n\n/**\n * An Empty PetResource Class\n */\npublic class EmptyPetResource {\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/PetResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.plugins.gradle.resources.QueryResultBean;\nimport io.swagger.v3.plugins.gradle.resources.data.PetData;\nimport io.swagger.v3.plugins.gradle.resources.exception.NotFoundException;\nimport io.swagger.v3.plugins.gradle.resources.model.Pet;\n\nimport javax.ws.rs.BeanParam;\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n@Consumes(\"application/json\")\n@Path(\"/pet\")\n@Produces({\"application/json\", \"application/xml\"})\npublic class PetResource {\n    static PetData petData = new PetData();\n\n    @GET\n    @Path(\"/{petId}\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"Returns a pet when 0 < ID <= 10.  ID > 10 or nonintegers will simulate API error conditions\",\n            responses = {\n                    @ApiResponse(\n                            description = \"The pet\", content = @Content(\n                            schema = @Schema(implementation = Pet.class)\n                    )),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\")\n            })\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\"/*, _enum = \"range[1,10]\"*/, required = true)\n            @PathParam(\"petId\") final Long petId) throws NotFoundException {\n        Pet pet = petData.getPetById(petId);\n        if (null != pet) {\n            return Response.ok().entity(pet).build();\n        } else {\n            throw new NotFoundException(404, \"Pet not found\");\n        }\n    }\n\n    @POST\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPet(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) final Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodynoannotation\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Produces({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store no annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetNoAnnotation(final Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodyid\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store passing an integer with generic parameter annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetByInteger(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) final int petId) {\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodyidnoannotation\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store passing an integer without parameter annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetByIntegerNoAnnotation(final int petId) {\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @PUT\n    @Operation(summary = \"Update an existing pet\",\n            responses = {\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\"),\n                    @ApiResponse(responseCode = \"405\", description = \"Validation exception\")})\n    public Response updatePet(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) final Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @GET\n    @Path(\"/findByStatus\")\n    @Produces(\"application/xml\")\n    @Operation(summary = \"Finds Pets by status\",\n            description = \"Multiple status values can be provided with comma seperated strings\",\n            responses = {\n                    @ApiResponse(\n                            content = @Content(mediaType = \"application/json\",\n                                    schema = @Schema(implementation = Pet.class))),\n                    @ApiResponse(\n                            responseCode = \"400\", description = \"Invalid status value\"\n                    )}\n    )\n    public Response findPetsByStatus(\n            @Parameter(description = \"Status values that need to be considered for filter\", required = true) @QueryParam(\"status\") final String status,\n            @BeanParam final QueryResultBean qr\n    ) {\n        return Response.ok(petData.findPetByStatus(status)).build();\n    }\n\n    @GET\n    @Path(\"/findByTags\")\n    @Produces(\"application/json\")\n    @Operation(summary = \"Finds Pets by tags\",\n            description = \"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.\",\n            responses = {\n                    @ApiResponse(description = \"Pets matching criteria\",\n                            content = @Content(schema = @Schema(implementation = Pet.class))\n                    ),\n                    @ApiResponse(description = \"Invalid tag value\", responseCode = \"400\")\n            })\n    @Deprecated\n    public Response findPetsByTags(\n            @Parameter(description = \"Tags to filter by\", required = true) @QueryParam(\"tags\") final String tags) {\n        return Response.ok(petData.findPetByTags(tags)).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/callback/ComplexCallbackResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.callback;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.callbacks.Callbacks;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\npublic class ComplexCallbackResource {\n    @Callbacks({\n            @Callback(\n                    name = \"testCallback1\",\n                    operation = @Operation(\n                            operationId = \"getAllReviews\",\n                            summary = \"get all the reviews\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    type = \"integer\",\n                                                    format = \"int32\")))),\n                    callbackUrlExpression = \"http://www.url.com\"),\n            @Callback(\n                    name = \"testCallback2\",\n                    operation = @Operation(\n                            operationId = \"getAnSpecificReviews\",\n                            summary = \"get a review\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    implementation = User.class)))),\n                    callbackUrlExpression = \"http://www.url2.com\")\n    })\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"getWithNoParameters\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\")\n            })\n    @GET\n    @Path(\"/complexcallback\")\n    public String simpleGet(@Parameter(description = \"idParam\", schema = @Schema(implementation = User.class))\n                            @QueryParam(\"id\") final String id) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/callback/MultipleCallbacksTestWithOperationResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.callback;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.callbacks.Callbacks;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class MultipleCallbacksTestWithOperationResource {\n    @Callbacks({\n            @Callback(\n                    name = \"testCallback1\",\n                    operation = @Operation(\n                            operationId = \"getAllReviews\",\n                            summary = \"get all the reviews\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    type = \"integer\",\n                                                    format = \"int32\")))),\n                    callbackUrlExpression = \"http://www.url.com\"),\n            @Callback(name = \"testCallback2\", operation = @Operation(), callbackUrlExpression = \"http://$request.query.url\")\n    })\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"getWithNoParameters\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\")\n            })\n    @GET\n    @Path(\"/multiplecallback\")\n    public String simpleGet() {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/callback/RepeatableCallbackResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.callback;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class RepeatableCallbackResource {\n    @Callback(name = \"testCallback\", operation =\n    @Operation(), callbackUrlExpression = \"http://$requests.query.url\")\n    @Callback(\n            name = \"testCallback1\",\n            operation = @Operation(\n                    operationId = \"getAllReviews\",\n                    summary = \"get all the reviews\",\n                    method = \"get\",\n                    responses = @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"successful operation\",\n                            content = @Content(\n                                    mediaType = \"application/json\",\n                                    schema = @Schema(\n                                            type = \"integer\",\n                                            format = \"int32\")))),\n            callbackUrlExpression = \"http://www.url.com\")\n    @Callback(name = \"testCallback2\", operation =\n    @Operation(),\n            callbackUrlExpression = \"http://$request.query.url\")\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"getWithNoParameters\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\")\n            })\n    @GET\n    @Path(\"/repeatablecallback\")\n    public String simpleGet() {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/callback/SimpleCallbackWithOperationResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.callback;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.callbacks.Callbacks;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class SimpleCallbackWithOperationResource {\n    @Callbacks({\n            @Callback(\n                    name = \"testCallback1\",\n                    operation = @Operation(\n                            operationId = \"getAllReviews\",\n                            summary = \"get all the reviews\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    type = \"integer\",\n                                                    format = \"int32\")))),\n                    callbackUrlExpression = \"http://www.url.com\")\n    })\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"getWithNoParameters\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\")\n            })\n    @GET\n    @Path(\"/simplecallback\")\n    public String simpleGet() {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/example/ExamplesResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.example;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\n/**\n * Examples Resource Scenario\n */\npublic class ExamplesResource {\n    @Path(\"/example\")\n    @POST\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account\",\n            parameters = {\n                    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n                            schema = @Schema(name = \"Schema\", description = \"Schema\", example = \"Subscription example\"),\n                            style = ParameterStyle.SIMPLE, example = \"example\",\n                            examples = {\n                                    @ExampleObject(name = \"subscriptionId_1\", value = \"12345\",\n                                            summary = \"Subscription number 12345\", externalValue = \"Subscription external value 1\"),\n                                    @ExampleObject(name = \"subscriptionId_2\", value = \"54321\",\n                                            summary = \"Subscription number 54321\", externalValue = \"Subscription external value 2\")\n                            })\n            },\n            responses = {\n                    @ApiResponse(\n                            description = \"test description\",\n                            content = @Content(\n                                    mediaType = \"*/*\",\n                                    schema = @Schema(\n                                            type = \"string\",\n                                            format = \"uuid\",\n                                            description = \"the generated UUID\",\n                                            accessMode = Schema.AccessMode.READ_ONLY,\n                                            example = \"Schema example\"\n                                    ),\n                                    examples = {\n                                            @ExampleObject(name = \"Default Response\", value = \"SubscriptionResponse\",\n                                                    summary = \"Subscription Response Example\", externalValue = \"Subscription Response value 1\")\n                                    }\n                            ))\n            })\n    public SubscriptionResponse subscribe(@RequestBody(description = \"Created user object\", required = true,\n            content = @Content(\n                    schema = @Schema(\n                            type = \"string\",\n                            format = \"uuid\",\n                            description = \"the generated UUID\",\n                            accessMode = Schema.AccessMode.READ_ONLY,\n                            example = \"Schema example\"),\n                    examples = {\n                            @ExampleObject(name = \"Default Request\", value = \"SubscriptionRequest\",\n                                    summary = \"Subscription Request Example\", externalValue = \"Subscription Request Value\")\n                    })) User user) {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/example/SubscriptionResponse.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.example;\n\npublic class SubscriptionResponse {\n    public String subscriptionId;\n}"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/link/LinksResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.link;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.links.Link;\nimport io.swagger.v3.oas.annotations.links.LinkParameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with Links\n */\npublic class LinksResource {\n    @Path(\"/links\")\n    @Operation(operationId = \"getUserWithAddress\",\n            responses = {\n                    @ApiResponse(description = \"test description\",\n                            content = @Content(mediaType = \"*/*\", schema = @Schema(ref = \"#/components/schemas/User\")),\n                            links = {\n                                    @Link(\n                                            name = \"address\",\n                                            operationId = \"getAddress\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\")),\n                                    @Link(\n                                            name = \"user\",\n                                            operationId = \"getUser\",\n                                            operationRef = \"#/components/links/MyLink\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\"))\n                            })}\n    )\n    @GET\n    public String getUser(@QueryParam(\"userId\")final String userId) {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/openapidefintion/OpenAPIDefinitionResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.openapidefintion;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.info.Contact;\nimport io.swagger.v3.oas.annotations.info.Info;\nimport io.swagger.v3.oas.annotations.info.License;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.servers.Server;\nimport io.swagger.v3.oas.annotations.servers.ServerVariable;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\n/**\n * OpenAPIDefinition Example\n */\n@OpenAPIDefinition(\n        info = @Info(\n                title = \"Pet Resource Example\",\n                version = \"2.0\",\n                description = \"API Definition\",\n                termsOfService = \"Terms of service\",\n                license = @License(name = \"Apache 2.0\", url = \"http://foo.bar\"),\n                contact = @Contact(url = \"http://gigantic-server.com\", name = \"Fred\", email = \"Fred@gigagantic-server.com\")\n        ),\n        tags = {\n                @Tag(name = \"Tag 1\", description = \"desc 1\", externalDocs = @ExternalDocumentation(description = \"docs desc\")),\n                @Tag(name = \"Tag 2\", description = \"desc 2\", externalDocs = @ExternalDocumentation(description = \"docs desc 2\")),\n                @Tag(name = \"Tag 3\")\n        },\n        externalDocs = @ExternalDocumentation(description = \"definition docs desc\"),\n        security = {\n                @SecurityRequirement(name = \"req 1\", scopes = {\"a\", \"b\"}),\n                @SecurityRequirement(name = \"req 2\", scopes = {\"b\", \"c\"})\n        })\npublic class OpenAPIDefinitionResource {\n    public void foo() {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/operation/AnnotatedSameNameOperationResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.operation;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.DELETE;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Default Operation without Annotation\n */\npublic class AnnotatedSameNameOperationResource {\n    @Path(\"/sameOperationName\")\n    @GET\n    @Operation(description = \"Same Operation Name\")\n    public String getUser() {\n        return new String();\n    }\n\n    @Path(\"//sameOperationName\")\n    @DELETE\n    @Operation(description = \"Same Operation Name Duplicated\")\n    public String getUser(final String id) {\n        return new String();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/operation/ExternalDocumentationResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.operation;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.plugins.gradle.resources.exception.NotFoundException;\nimport io.swagger.v3.plugins.gradle.resources.model.Pet;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with Operations Examples\n */\npublic class ExternalDocumentationResource {\n    @GET\n    @Path(\"/{petId}\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"Returns a pet when 0 < ID <= 10.  ID > 10 or non integers will simulate API error conditions\",\n            operationId = \"petId\",\n            externalDocs = @ExternalDocumentation(description = \"External in Operation\", url = \"http://url.me\"))\n    @ExternalDocumentation(description = \"External Annotation Documentation\", url = \"http://url.me\")\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\", required = true)\n            @PathParam(\"petId\") Long petId) throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/operation/FullyAnnotatedOperationResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.operation;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.plugins.gradle.resources.exception.NotFoundException;\nimport io.swagger.v3.plugins.gradle.resources.model.Pet;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with Operations Examples\n */\npublic class FullyAnnotatedOperationResource {\n    @GET\n    @Path(\"/fullyannotatedoperation/{petId}\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"Returns a pet when 0 < ID <= 10.  ID > 10 or non integers will simulate API error conditions\",\n            operationId = \"petId\",\n            responses = {\n                    @ApiResponse(\n                            description = \"The pet\", content = @Content(\n                            schema = @Schema(implementation = Pet.class)\n                    )),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\")\n            })\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\", required = true)\n            @PathParam(\"petId\")final Long petId) throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/operation/HiddenOperationResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.operation;\n\nimport io.swagger.v3.oas.annotations.Hidden;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.plugins.gradle.resources.model.Pet;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Hidden Operation\n */\npublic class HiddenOperationResource {\n    @Path(\"/hiddenbyflag\")\n    @GET\n    @Operation(operationId = \"Pets\", description = \"Pets Example\", hidden = true)\n    public Pet getPet() {\n        return new Pet();\n    }\n\n    @Path(\"/hiddenbyannotation\")\n    @GET\n    @Operation(operationId = \"Users\", description = \"Users Example\")\n    @Hidden\n    public User getUser() {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/operation/InterfaceResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.operation;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Interface resource\n */\npublic interface InterfaceResource {\n    @GET\n    @Path(\"/interfaceoperation/{petId}\")\n    @Operation(summary = \"Find pet by ID Operation in Parent\",\n            description = \"Returns a pet in Parent\"\n    )\n    Response getPetById(@Parameter(description = \"ID of pet that needs to be fetched\", required = true)\n                        @PathParam(\"petId\") final Long petId);\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/operation/NotAnnotatedSameNameOperationResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Default Operation without Annotation\n */\npublic class NotAnnotatedSameNameOperationResource {\n    @Path(\"/notannotatedoperation\")\n    @GET\n    public String getUser() {\n        return new String();\n    }\n\n    @Path(\"/notannotatedoperationduplicated\")\n    @GET\n    public String getUser(final String id) {\n        return new String();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/operation/OperationResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.operation;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.plugins.gradle.resources.model.Pet;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.HEAD;\nimport javax.ws.rs.NotFoundException;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with Complete Operations Examples\n */\npublic class OperationResource implements InterfaceResource {\n    @Override\n    @Operation(summary = \"Find pet by ID Operation in SubResource\",\n            description = \"Returns a pet in SubResource\"\n    )\n    public Response getPetById(final Long petId) {\n        return Response.ok().entity(new Pet()).build();\n    }\n\n    @GET\n    @Path(\"/operationsresource\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"combinatedfullyannotatedoperation/{petId}\",\n            operationId = \"petId\",\n            responses = {\n                    @ApiResponse(\n                            description = \"The pet\", content = @Content(\n                            schema = @Schema(implementation = Pet.class)\n                    )),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\")\n            })\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\", required = true)\n            @QueryParam(\"petId\") final Long petId, final String message) throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n\n    @Path(\"/operationsresource\")\n    @POST\n    public String getUser(final String id) {\n        return new String();\n    }\n\n    @Path(\"/operationsresource\")\n    @PUT\n    @Operation(operationId = \"combinated sameOperationName\",\n            description = \"combinatedsameOperationName\")\n    public String getPerson() {\n        return new String();\n    }\n\n    @Path(\"/operationsresource\")\n    @HEAD\n    @Operation(operationId = \"combinatedsameOperationNameDuplicated\",\n            description = \"combinatedsameOperationNameDuplicated\")\n    public String getPerson(final String id) {\n        return new String();\n    }\n\n    @Path(\"/operationsresource2\")\n    @GET\n    public String getUser() {\n        return new String();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/operation/OperationWithoutAnnotationResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Default Operation without Annotation\n */\npublic class OperationWithoutAnnotationResource {\n    @Path(\"/operationwithouannotation\")\n    @GET\n    public String getUser() {\n        return new String();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/operation/ServerOperationResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.operation;\n\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.servers.Server;\nimport io.swagger.v3.plugins.gradle.resources.model.Pet;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Hidden Operation\n */\npublic class ServerOperationResource {\n    @Path(\"/serversoperation\")\n    @GET\n    @Operation(operationId = \"Pets\", description = \"Pets Example\",\n            servers = {\n                    @Server(description = \"server 2\", url = \"http://foo2\")\n            }\n    )\n    public Pet getPet() {\n        return new Pet();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/operation/SubResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.operation;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.plugins.gradle.resources.model.Pet;\n\nimport javax.ws.rs.core.Response;\n\n/**\n * SubResource\n */\n\npublic class SubResource implements InterfaceResource {\n    @Override\n    @Operation(summary = \"Find pet by ID Operation in SubResource\",\n            description = \"Returns a pet in SubResource\"\n    )\n    public Response getPetById(final Long petId) {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/parameter/ArraySchemaResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\npublic class ArraySchemaResource {\n    @Path(\"/arrayschema\")\n    @POST\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                    \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n            parameters = {\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameter\", required = true, explode = Explode.TRUE,\n                            array = @ArraySchema(maxItems = 10, minItems = 1,\n                                    schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class),\n                                    uniqueItems = true\n                            )\n                    ),\n            },\n            responses = {\n                    @ApiResponse(\n                            description = \"test description\", content = @Content(\n                            mediaType = \"*/*\",\n                            schema =\n                            @Schema(\n                                    implementation = ParametersResource.SubscriptionResponse.class)\n                    ))\n            })\n    @Consumes({\"application/json\", \"application/xml\"})\n    public ParametersResource.SubscriptionResponse subscribe() {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/parameter/ComplexParameterResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a multiple annotated.\n */\npublic class ComplexParameterResource {\n\n    @Parameter(description = \"Phone definied in Field\")\n    private String phone;\n\n    public ComplexParameterResource(@Parameter(description = \"phone Param\", name = \"phone\") final String phone) {\n        this.phone = phone;\n    }\n\n    @GET\n    @Path(\"/complexparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@Parameter(description = \"idParam\") @QueryParam(\"id\") final String id,\n                         final String name, @QueryParam(\"lastName\") final String lastName,\n                         @Parameter(description = \"address\", schema = @Schema(implementation = User.class))\n                         @QueryParam(\"address\") final String address) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/parameter/ComplexParameterWithOperationResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a multiple annotated.\n */\npublic class ComplexParameterWithOperationResource {\n\n    @Parameter(description = \"Phone definied in Field\")\n    private String phone;\n\n    public ComplexParameterWithOperationResource(@Parameter(description = \"phone Param\", name = \"phone\") final String phone) {\n        this.phone = phone;\n    }\n\n    @GET\n    @Path(\"/complexparameter\")\n    @Operation(operationId = \"create User\",\n            parameters = {\n                    @Parameter(description = \"Phone\", name = \"phone\", in = ParameterIn.PATH)\n            })\n    public User findUser(@Parameter(description = \"idParam\") @QueryParam(\"id\") final String id,\n                         final String name, @QueryParam(\"lastName\") final String lastName,\n                         @Parameter(description = \"address\", schema = @Schema(implementation = User.class))\n                         @QueryParam(\"address\") final String address) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/parameter/MultipleNotAnnotatedParameter.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\n/**\n * Class with a multiple not annotated parameter.\n */\npublic class MultipleNotAnnotatedParameter {\n    @POST\n    @Path(\"/multiplenoannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public void createUser(final String id, final String name) {\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/parameter/OpenAPIJaxRSAnnotatedParameter.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a single parameter annotated with jaxrs and open api annotation.\n */\npublic class OpenAPIJaxRSAnnotatedParameter {\n    @GET\n    @Path(\"/openapijaxrsannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@Parameter(description = \"idParam\") @QueryParam(\"id\") final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/parameter/OpenAPIWithContentJaxRSAnnotatedParameter.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a single parameter annotated with jaxrs and open api annotation.\n */\npublic class OpenAPIWithContentJaxRSAnnotatedParameter {\n    @GET\n    @Path(\"/openapiwithcontentjaxrsannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@Parameter(description = \"idParam\", content =\n    @Content(schema = @Schema(description = \"Id Schema Definition\", required = true, name = \"id\")))\n                         @QueryParam(\"id\") final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/parameter/OpenAPIWithImplementationJaxRSAnnotatedParameter.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a single parameter annotated with jaxrs and open api annotation.\n */\npublic class OpenAPIWithImplementationJaxRSAnnotatedParameter {\n    @GET\n    @Path(\"/openapiwithimplementationjaxrsannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@Parameter(description = \"idParam\", schema = @Schema(implementation = User.class))\n                         @QueryParam(\"id\") final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/parameter/ParametersResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Resource with some Parameters examples\n */\npublic class ParametersResource {\n    @Path(\"/parameters\")\n    @POST\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                    \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n            parameters = {\n                    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n                            schema = @Schema(implementation = RepeatableParametersResource.SubscriptionResponse.class), style = ParameterStyle.SIMPLE),\n                    @Parameter(in = ParameterIn.QUERY, name = \"formId\", required = true,\n                            example = \"Example\"),\n                    @Parameter(in = ParameterIn.QUERY, name = \"explodeFalse\", required = true, explode = Explode.FALSE,\n                            schema = @Schema(implementation = SubscriptionResponse.class)),\n                    @Parameter(in = ParameterIn.QUERY, name = \"explodeTrue\", required = true, explode = Explode.TRUE,\n                            schema = @Schema(implementation = SubscriptionResponse.class)),\n                    @Parameter(in = ParameterIn.QUERY, name = \"explodeAvoiding\", required = true, explode = Explode.TRUE,\n                            schema = @Schema(\n                                    type = \"int\",\n                                    format = \"id\",\n                                    description = \"the generated id\",\n                                    accessMode = Schema.AccessMode.READ_ONLY\n                            )),\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameter\", required = true, explode = Explode.TRUE,\n                            array = @ArraySchema(maxItems = 10, minItems = 1,\n                                    schema = @Schema(implementation = SubscriptionResponse.class),\n                                    uniqueItems = true\n                            )\n                            ,\n                            schema = @Schema(\n                                    type = \"int\",\n                                    format = \"id\",\n                                    description = \"the generated id\",\n                                    accessMode = Schema.AccessMode.READ_ONLY),\n                            content = @Content(schema = @Schema(type = \"number\",\n                                    description = \"the generated id\",\n                                    accessMode = Schema.AccessMode.READ_ONLY))\n                    ),\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation\", required = true, explode = Explode.TRUE,\n                            array = @ArraySchema(maxItems = 10, minItems = 1,\n                                    schema = @Schema(implementation = SubscriptionResponse.class),\n                                    uniqueItems = true\n                            )\n                    ),\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation2\", required = true, explode = Explode.TRUE,\n                            schema = @Schema(implementation = SubscriptionResponse.class))\n\n            },\n            responses = {\n                    @ApiResponse(\n                            description = \"test description\", content = @Content(\n                            mediaType = \"*/*\",\n                            schema =\n                            @Schema(\n                                    implementation = SubscriptionResponse.class)\n                    ))\n            })\n    @Consumes({\"application/json\", \"application/xml\"})\n    public SubscriptionResponse subscribe(@Parameter(description = \"idParam\")\n                                                             @QueryParam(\"id\") final String id) {\n        return null;\n    }\n\n    static class SubscriptionResponse {\n        public String subscriptionId;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/parameter/RepeatableParametersResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\npublic class RepeatableParametersResource {\n    @Path(\"/repeatableparameter\")\n    @POST\n    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class), style = ParameterStyle.SIMPLE)\n    @Parameter(in = ParameterIn.QUERY, name = \"formId\", required = true,\n            example = \"Example\")\n    @Parameter(in = ParameterIn.QUERY, name = \"explodeFalse\", required = true, explode = Explode.FALSE,\n            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class))\n    @Parameter(in = ParameterIn.QUERY, name = \"explodeTrue\", required = true, explode = Explode.TRUE,\n            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class))\n    @Parameter(in = ParameterIn.QUERY, name = \"explodeAvoiding\", required = true, explode = Explode.TRUE,\n            schema = @Schema(\n                    type = \"int\",\n                    format = \"id\",\n                    description = \"the generated id\",\n                    accessMode = Schema.AccessMode.READ_ONLY\n            ))\n    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameter\", required = true, explode = Explode.TRUE,\n            array = @ArraySchema(maxItems = 10, minItems = 1,\n                    schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class),\n                    uniqueItems = true\n            )\n            ,\n            schema = @Schema(\n                    type = \"int\",\n                    format = \"id\",\n                    description = \"the generated id\",\n                    accessMode = Schema.AccessMode.READ_ONLY),\n            content = @Content(schema = @Schema(type = \"number\",\n                    description = \"the generated id\",\n                    accessMode = Schema.AccessMode.READ_ONLY))\n    )\n    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation\", required = true, explode = Explode.TRUE,\n            array = @ArraySchema(maxItems = 10, minItems = 1,\n                    schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class),\n                    uniqueItems = true\n            )\n    )\n    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation2\", required = true, explode = Explode.TRUE,\n            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class))\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                    \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n            responses = {\n                    @ApiResponse(\n                            description = \"test description\", content = @Content(\n                            mediaType = \"*/*\",\n                            schema =\n                            @Schema(\n                                    implementation = ParametersResource.SubscriptionResponse.class)\n                    ))\n            })\n    @Consumes({\"application/json\", \"application/xml\"})\n    public ParametersResource.SubscriptionResponse subscribe() {\n        return null;\n    }\n\n    static class SubscriptionResponse {\n        public String subscriptionId;\n    }\n}\n\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/parameter/SingleJaxRSAnnotatedParameter.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a single parameter annotated with jaxrs.\n */\npublic class SingleJaxRSAnnotatedParameter {\n    @GET\n    @Path(\"/singlejaxrsannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@QueryParam(\"id\") final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/parameter/SingleNotAnnotatedParameter.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Class with a single not annotated parameter.\n */\npublic class SingleNotAnnotatedParameter {\n    @GET\n    @Path(\"/singlenoannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/requestbody/RequestBodyMethodPriorityResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.requestbody;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with RequestBody inside Operation and another in Method\n */\npublic class RequestBodyMethodPriorityResource {\n    @POST\n    @Path(\"/requestbodymethodpriority\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\",\n            requestBody = @RequestBody(description = \"Inside Operation\"))\n    @RequestBody(description = \"Created user object on Method\", required = true,\n            content = @Content(\n                    schema = @Schema(implementation = User.class)))\n    public Response methodWithRequestBodyAndTwoParameters(final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/requestbody/RequestBodyParameterPriorityResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.requestbody;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with RequestBody inside Operation and another in Method\n */\npublic class RequestBodyParameterPriorityResource {\n    @POST\n    @Path(\"/requestbodyparameterpriority\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\",\n            requestBody = @RequestBody(description = \"Inside Operation\"))\n    @RequestBody(description = \"On method\")\n    public Response methodWithRequestBodyAndTwoParameters(\n            @RequestBody(description = \"Created user object inside Parameter\", required = true,\n                    content = @Content(\n                            schema = @Schema(implementation = User.class)))final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/requestbody/RequestBodyResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.requestbody;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.plugins.gradle.resources.model.Pet;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.DELETE;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with RequestBody examples\n */\npublic class RequestBodyResource {\n    @GET\n    @Path(\"/methodWithRequestBodyWithoutContent\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response methodWithRequestBodyWithoutContent(\n            @RequestBody(description = \"Created user object\", required = true) final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @GET\n    @Path(\"/methodWithRequestBodyWithoutContentWithoutImplementation\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response methodWithRequestBodyWithoutContentWithoutImplementation(\n            @RequestBody(description = \"Created user object\", required = true,\n                    content = @Content(\n                            schema = @Schema(name = \"User\", description = \"User description\",\n                                    example = \"User Description\", required = true))) final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @POST\n    @Path(\"/methodWithRequestBodyAndTwoParameters\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response methodWithRequestBodyAndTwoParameters(\n            @RequestBody(description = \"Created user object\", required = true,\n                    content = @Content(\n                            schema = @Schema(implementation = User.class))) final User user,\n            @QueryParam(\"name\") final String name, @QueryParam(\"code\") final String code) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @PUT\n    @Path(\"/methodWithRequestBodyWithoutAnnotation\")\n    @Operation(summary = \"Modify user\",\n            description = \"Modifying user.\")\n    public Response methodWithRequestBodyWithoutAnnotation(\n            final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @DELETE\n    @Path(\"/methodWithoutRequestBodyAndTwoParameters\")\n    @Operation(summary = \"Delete user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response methodWithoutRequestBodyAndTwoParameters(\n            @QueryParam(\"name\") final String name, @QueryParam(\"code\") final String code) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @PUT\n    @Path(\"/methodWithRequestBodyWithoutAnnotationAndTwoConsumes\")\n    @Operation(summary = \"Modify pet\",\n            description = \"Modifying pet.\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    public Response methodWithRequestBodyWithoutAnnotationAndTwoConsumes(\n            final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @POST\n    @Path(\"/methodWithTwoRequestBodyWithoutAnnotationAndTwoConsumes\")\n    @Operation(summary = \"Create pet\",\n            description = \"Creating pet.\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    public Response methodWithTwoRequestBodyWithoutAnnotationAndTwoConsumes(\n            final Pet pet, final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @POST\n    @Path(\"/methodWithTwoRequestBodyWithAnnotationAndTwoConsumes\")\n    @Operation(summary = \"Create pet\",\n            description = \"Creating pet.\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    public Response methodWithTwoRequestBodyWithAnnotationAndTwoConsumes(\n            final @RequestBody(description = \"Request Body Pet\") Pet pet,\n            @RequestBody(description = \"Request Body User\") final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @DELETE\n    @Path(\"/methodWithOneSimpleRequestBody\")\n    @Operation(summary = \"Delete pet\",\n            description = \"Deleting pet.\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    public Response methodWithOneSimpleRequestBody(final int id) {\n        return Response.ok().entity(\"\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/responses/ComplexResponseResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.responses;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.plugins.gradle.resources.exception.NotFoundException;\nimport io.swagger.v3.plugins.gradle.resources.model.Pet;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource with some responses\n */\npublic class ComplexResponseResource {\n    @GET\n    @Path(\"/complexresponse\")\n    @Operation(summary = \"Find pets\",\n            description = \"Returns the Pets\",\n            responses = {\n                    @ApiResponse(description = \"Response inside Operation\", responseCode = \"200\",\n                            content = @Content(schema =\n                            @Schema(implementation = Pet.class))),\n                    @ApiResponse(description = \"Default Pet\",\n                            content = @Content(schema =\n                            @Schema(name = \"Default Pet\", description = \"Default Pet\",\n                            required = true, example = \"New Pet\")))\n            })\n    @ApiResponse(responseCode = \"404\", description = \"Couldn't find pet\")\n    public Pet getPets() throws NotFoundException {\n        return new Pet();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/responses/ImplementationResponseResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.responses;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource with a Response at Method Level\n */\npublic class ImplementationResponseResource {\n    @GET\n    @Path(\"/implementationresponse\")\n    @Operation(\n            summary = \"Simple get operation\",\n            description = \"Defines a simple get operation with no inputs and a complex output object\",\n            operationId = \"getWithPayloadResponse\",\n            deprecated = true,\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\",\n                            content = {\n                                    @Content(\n                                            mediaType = \"application/json\",\n                                            schema =\n                                            @Schema(\n                                                    implementation = SampleResponseSchema.class)\n                                    ),\n                                    @Content(\n                                            mediaType = \"application/json\",\n                                            schema =\n                                            @Schema(\n                                                    implementation = SecondSampleResponseSchema.class)\n                                    )\n                            }\n\n                    ),\n                    @ApiResponse(\n                            responseCode = \"400\",\n                            description = \"boo\",\n                            content = @Content(\n                                    mediaType = \"*/*\",\n                                    schema =\n                                    @Schema(implementation = GenericError.class)\n                            )\n                    )\n            }\n    )\n\n    public void getResponses() {\n    }\n\n    static class SampleResponseSchema {\n        @Schema(description = \"the user id\")\n        private String id;\n    }\n\n    static class SecondSampleResponseSchema {\n        @Schema(description = \"the user id\")\n        private String id;\n    }\n\n    static class GenericError {\n        private int code;\n        private String message;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/responses/MethodResponseResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.responses;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.plugins.gradle.resources.exception.NotFoundException;\nimport io.swagger.v3.plugins.gradle.resources.model.Pet;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with a Response at Method Level\n */\npublic class MethodResponseResource {\n    @GET\n    @Path(\"/responseinmethod\")\n    @Operation(summary = \"Find pets\",\n            description = \"Returns the Pets\")\n    @ApiResponse(responseCode = \"200\", description = \"Status OK\")\n    public Response getPets() throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/responses/NoImplementationResponseResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.responses;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.links.Link;\nimport io.swagger.v3.oas.annotations.links.LinkParameter;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Resource with a Response at Method Level\n */\npublic class NoImplementationResponseResource {\n    @Path(\"/noimplementationresponseresource\")\n    @Operation(operationId = \"getUser\",\n            responses = {\n                    @ApiResponse(description = \"test description\", responseCode = \"400\",\n                            links = {\n                                    @Link(\n                                            name = \"user\",\n                                            operationId = \"getUser\",\n                                            operationRef = \"#/components/links/MyLink\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\"))\n                            }),\n                    @ApiResponse(description = \"200 description\", responseCode = \"200\",\n                            links = {\n                                    @Link(\n                                            name = \"pet\",\n                                            operationId = \"getUser\",\n                                            operationRef = \"#/components/links/MyLink\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\"))\n                            })\n            }\n    )\n    @GET\n    public User getUser(@QueryParam(\"userId\") final String userId) {\n        return null;\n    }\n\n    static class User {\n        private String id;\n        private String username;\n\n        public String getId() {\n            return id;\n        }\n\n        public void setId(final String id) {\n            this.id = id;\n        }\n\n        public String getUsername() {\n            return username;\n        }\n\n        public void setUsername(final String username) {\n            this.username = username;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/responses/NoResponseResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.responses;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.plugins.gradle.resources.exception.NotFoundException;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource with a Response at Method Level\n */\npublic class NoResponseResource {\n    @GET\n    @Path(\"/noresponse\")\n    @Operation(summary = \"Find pets\",\n            description = \"Returns the Pets\")\n    public User getPets() throws NotFoundException {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/responses/OperationResponseResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.responses;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.plugins.gradle.resources.exception.NotFoundException;\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with the response in the Operation Annotation\n */\npublic class OperationResponseResource {\n    @GET\n    @Path(\"/responseinoperation\")\n    @Operation(summary = \"Find Users\",\n            description = \"Returns the Users\",\n            responses = {@ApiResponse(responseCode = \"200\", description = \"Status OK\")})\n    public Response getUsers() throws NotFoundException {\n        return Response.ok().entity(new User()).build();\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/responses/PriorityResponseResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.responses;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.plugins.gradle.resources.exception.NotFoundException;\nimport io.swagger.v3.plugins.gradle.resources.model.Pet;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with a Response at Method Level and Operation Level.\n */\npublic class PriorityResponseResource {\n    @GET\n    @Path(\"/priorityresponses\")\n    @Operation(summary = \"Find pets\",\n            description = \"Returns the Pets\",\n            responses = {@ApiResponse(responseCode = \"200\", description = \"Inside Operation Response\")})\n    @ApiResponse(responseCode = \"200\", description = \"Inside Method Operation\")\n    public Response getPets() throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/security/SecurityResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.security;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeType;\nimport io.swagger.v3.oas.annotations.security.OAuthFlow;\nimport io.swagger.v3.oas.annotations.security.OAuthFlows;\nimport io.swagger.v3.oas.annotations.security.OAuthScope;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.security.SecurityScheme;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.PATCH;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\n\n@SecurityScheme(name = \"myOauth2Security\",\n        type = SecuritySchemeType.OAUTH2,\n        in = SecuritySchemeIn.HEADER,\n        description = \"myOauthSecurity Description\",\n        flows = @OAuthFlows(implicit = @OAuthFlow(authorizationUrl = \"http://x.com\",\n                scopes = @OAuthScope(\n                        name = \"write:pets\",\n                        description = \"modify pets in your account\"))\n        )\n)\n@SecurityRequirement(name = \"security_key\",\n        scopes = {\"write:pets\", \"read:pets\"}\n)\n@SecurityRequirement(name = \"myOauth2Security\",\n        scopes = {\"write:pets\"}\n)\n@Path(\"/security\")\npublic class SecurityResource {\n    @GET\n    @Operation(operationId = \"Operation Id\",\n            description = \"description\")\n    @SecurityRequirement(name = \"security_key\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    )\n    public void getSecurity() {\n    }\n\n    @PATCH\n    @Operation(operationId = \"Operation Id 2\",\n            description = \"description 2\")\n    @SecurityRequirement(name = \"security_key2\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    )\n    public void getSecurity2() {\n    }\n\n    @PUT\n    @Operation(operationId = \"Operation Id 3\",\n            description = \"description 3\", security =\n    @SecurityRequirement(name = \"security_key3\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    ))\n    public void setSecurity(String security) {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/tags/CompleteTagResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n@OpenAPIDefinition(tags = {\n        @Tag(name = \"Definition First Tag\"),\n        @Tag(name = \"Definition Second Tag full\", description = \"desc definition\")\n})\n@Tag(name = \"Second Tag\")\n@Tag(name = \"Fourth Tag Full\", description = \"desc class\", externalDocs = @ExternalDocumentation(description = \"docs desc class\"))\n@Tag(name = \"Fifth Tag Full\", description = \"desc class\", externalDocs = @ExternalDocumentation(description = \"docs desc class\"))\n@Tag(name = \"Sixth Tag\")\npublic class CompleteTagResource {\n\n    @GET\n    @Path(\"/completetags\")\n    @Operation(tags = {\"Example Tag\", \"Second Tag\"})\n    @Tag(name = \"Third Tag\")\n    @Tag(name = \"Second Tag\")\n    @Tag(name = \"Fourth Tag Full\", description = \"desc\", externalDocs = @ExternalDocumentation(description = \"docs desc\"))\n    public Response getTags() {\n        return Response.ok().entity(\"ok\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/tags/TagClassResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\n/**\n * Class with Tag Annotations at Class level\n */\n@Tag(name = \"Second Tag\")\n@Tag(name = \"Fourth Tag Full\", description = \"desc class\", externalDocs = @ExternalDocumentation(description = \"docs desc class\"))\n@Tag(name = \"Fifth Tag Full\", description = \"desc class\", externalDocs = @ExternalDocumentation(description = \"docs desc class\"))\n@Tag(name = \"Sixth Tag\")\npublic class TagClassResource {\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/tags/TagMethodResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\npublic class TagMethodResource {\n    @GET\n    @Path(\"/tagsinmethod\")\n    @Tag(name = \"Third Tag\")\n    @Tag(name = \"Second Tag\")\n    @Tag(name = \"Fourth Tag Full\", description = \"desc\", externalDocs = @ExternalDocumentation(description = \"docs desc\"))\n    public Response getTags() {\n        return Response.ok().entity(\"ok\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/tags/TagOpenAPIDefinitionResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\n/**\n * Tag in the OpenAPIDefinition annotation\n */\n@OpenAPIDefinition(tags = {\n        @Tag(name = \"Definition First Tag\"),\n        @Tag(name = \"Definition Second Tag full\", description = \"desc definition\")\n})\npublic class TagOpenAPIDefinitionResource {\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/tags/TagOperationResource.java",
    "content": "package io.swagger.v3.plugins.gradle.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with a Tag at Operation Level\n */\npublic class TagOperationResource {\n\n    @GET\n    @Path(\"/tagoperation\")\n    @Operation(tags = {\"Example Tag\", \"Second Tag\"})\n    public Response getTags() {\n        return Response.ok().entity(\"ok\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/MyFilter.java",
    "content": "package io.swagger.v3.plugins.gradle.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.core.model.ApiDescription;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\npublic class MyFilter extends AbstractSpecFilter {\n        private static Logger LOGGER = LoggerFactory.getLogger(MyFilter.class);\n\n        @Override\n        public Optional<OpenAPI> filterOpenAPI(\n                OpenAPI openAPI,\n                Map<String, List<String>> params,\n                Map<String, String> cookies,\n                Map<String, List<String>> headers) {\n            openAPI.getInfo().setTitle(\"UPDATEDBYFILTER\");\n            return Optional.of(openAPI);\n            //  some processing\n            //return super.filterOpenAPI(openAPI, params, cookies, headers);\n        }\n\n        @Override\n        public Optional<io.swagger.v3.oas.models.Operation> filterOperation(\n                Operation operation,\n                ApiDescription api,\n                Map<String, List<String>> params,\n                Map<String, String> cookies,\n                Map<String, List<String>> headers) {\n            // some processing\n            return Optional.of(operation);\n        }\n\n    }"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/QueryResultBean.java",
    "content": "package io.swagger.v3.plugins.gradle.resources;\n\nimport javax.ws.rs.QueryParam;\n\npublic class QueryResultBean {\n    @QueryParam(\"skip\")\n    private Integer skip;\n\n    @QueryParam(\"limit\")\n    private Integer limit;\n\n    public Integer getSkip() {\n        return skip;\n    }\n\n    public void setSkip(Integer skip) {\n        this.skip = skip;\n    }\n\n    public Integer getLimit() {\n        return limit;\n    }\n\n    public void setLimit(Integer limit) {\n        this.limit = limit;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/data/PetData.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.data;\n\nimport io.swagger.v3.plugins.gradle.resources.model.Category;\nimport io.swagger.v3.plugins.gradle.resources.model.Pet;\nimport io.swagger.v3.plugins.gradle.resources.model.Tag;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.stream.Collectors;\n\npublic class PetData {\n    static List<Pet> pets = new ArrayList<Pet>();\n    static List<Category> categories = new ArrayList<Category>();\n\n    static {\n        categories.add(createCategory(1, \"Dogs\"));\n        categories.add(createCategory(2, \"Cats\"));\n        categories.add(createCategory(3, \"Rabbits\"));\n        categories.add(createCategory(4, \"Lions\"));\n\n        pets.add(createPet(1, categories.get(1), \"Cat 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag1\", \"tag2\"}, \"available\"));\n        pets.add(createPet(2, categories.get(1), \"Cat 2\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag2\", \"tag3\"}, \"available\"));\n        pets.add(createPet(3, categories.get(1), \"Cat 3\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"pending\"));\n\n        pets.add(createPet(4, categories.get(0), \"Dog 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag1\", \"tag2\"}, \"available\"));\n        pets.add(createPet(5, categories.get(0), \"Dog 2\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag2\", \"tag3\"}, \"sold\"));\n        pets.add(createPet(6, categories.get(0), \"Dog 3\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"pending\"));\n\n        pets.add(createPet(7, categories.get(3), \"Lion 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag1\", \"tag2\"}, \"available\"));\n        pets.add(createPet(8, categories.get(3), \"Lion 2\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag2\", \"tag3\"}, \"available\"));\n        pets.add(createPet(9, categories.get(3), \"Lion 3\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"available\"));\n\n        pets.add(createPet(10, categories.get(2), \"Rabbit 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"available\"));\n    }\n\n    public Pet getPetById(long petId) {\n        for (Pet pet : pets) {\n            if (pet.getId() == petId) {\n                return pet;\n            }\n        }\n        return null;\n    }\n\n    public List<Pet> findPetByStatus(String status) {\n        String[] statues = status.split(\",\");\n        List<Pet> result = new ArrayList<Pet>();\n        for (Pet pet : pets) {\n            for (String s : statues) {\n                if (s.equals(pet.getStatus())) {\n                    result.add(pet);\n                }\n            }\n        }\n        return result;\n    }\n\n    public List<Pet> findPetByCategory(Category category) {\n        return pets.stream().filter(pet -> category.equals(pet.getCategory())).collect(Collectors.toList());\n    }\n\n    public List<Pet> findPetByTags(String tags) {\n        String[] tagList = tags.split(\",\");\n        List<Pet> result = new ArrayList<Pet>();\n        for (Pet pet : pets) {\n            if (null != pet.getTags()) {\n                for (Tag tag : pet.getTags()) {\n                    for (String tagListString : tagList) {\n                        if (tagListString.equals(tag.getName())) {\n                            result.add(pet);\n                        }\n                    }\n                }\n            }\n        }\n        return result;\n    }\n\n    public void addPet(Pet pet) {\n        if (pets.size() > 0) {\n            for (int i = pets.size() - 1; i >= 0; i--) {\n                if (pets.get(i).getId() == pet.getId()) {\n                    pets.remove(i);\n                }\n            }\n        }\n        pets.add(pet);\n    }\n\n    static Pet createPet(long id, Category cat, String name, String[] urls,\n                         String[] tags, String status) {\n        Pet pet = new Pet();\n        pet.setId(id);\n        pet.setCategory(cat);\n        pet.setName(name);\n        if (null != urls) {\n            List<String> urlObjs = new ArrayList<String>();\n            for (String urlString : urls) {\n                urlObjs.add(urlString);\n            }\n            pet.setPhotoUrls(urlObjs);\n        }\n        List<Tag> tagObjs = new ArrayList<Tag>();\n        int i = 0;\n        if (null != tags) {\n            for (String tagString : tags) {\n                i = i + 1;\n                Tag tag = new Tag();\n                tag.setId(i);\n                tag.setName(tagString);\n                tagObjs.add(tag);\n            }\n        }\n        pet.setTags(tagObjs);\n        pet.setStatus(status);\n        return pet;\n    }\n\n    static Category createCategory(long id, String name) {\n        Category category = new Category();\n        category.setId(id);\n        category.setName(name);\n        return category;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/data/UserData.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.data;\n\nimport io.swagger.v3.plugins.gradle.resources.model.User;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class UserData {\n    static List<User> users = new ArrayList<User>();\n\n    static {\n        users.add(createUser(1, \"user1\", \"first name 1\", \"last name 1\",\n                \"email1@test.com\", \"123-456-7890\", 1));\n        users.add(createUser(2, \"user2\", \"first name 2\", \"last name 2\",\n                \"email2@test.com\", \"123-456-7890\", 2));\n        users.add(createUser(3, \"user3\", \"first name 3\", \"last name 3\",\n                \"email3@test.com\", \"123-456-7890\", 3));\n        users.add(createUser(4, \"user4\", \"first name 4\", \"last name 4\",\n                \"email4@test.com\", \"123-456-7890\", 1));\n        users.add(createUser(5, \"user5\", \"first name 5\", \"last name 5\",\n                \"email5@test.com\", \"123-456-7890\", 2));\n        users.add(createUser(6, \"user6\", \"first name 6\", \"last name 6\",\n                \"email6@test.com\", \"123-456-7890\", 3));\n        users.add(createUser(7, \"user7\", \"first name 7\", \"last name 7\",\n                \"email7@test.com\", \"123-456-7890\", 1));\n        users.add(createUser(8, \"user8\", \"first name 8\", \"last name 8\",\n                \"email8@test.com\", \"123-456-7890\", 2));\n        users.add(createUser(9, \"user9\", \"first name 9\", \"last name 9\",\n                \"email9@test.com\", \"123-456-7890\", 3));\n        users.add(createUser(10, \"user10\", \"first name 10\", \"last name 10\",\n                \"email10@test.com\", \"123-456-7890\", 1));\n        users.add(createUser(11, \"user?10\", \"first name ?10\", \"last name ?10\",\n                \"email101@test.com\", \"123-456-7890\", 1));\n\n    }\n\n    public User findUserByName(String username) {\n        for (User user : users) {\n            if (user.getUsername().equals(username)) {\n                return user;\n            }\n        }\n        return null;\n    }\n\n    public void addUser(User user) {\n        if (users.size() > 0) {\n            for (int i = users.size() - 1; i >= 0; i--) {\n                if (users.get(i).getUsername().equals(user.getUsername())) {\n                    users.remove(i);\n                }\n            }\n        }\n        users.add(user);\n    }\n\n    public boolean removeUser(String username) {\n        if (users.size() > 0) {\n            for (int i = users.size() - 1; i >= 0; i--) {\n                if (users.get(i).getUsername().equals(username)) {\n                    users.remove(i);\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n\n    private static User createUser(long id, String username, String firstName,\n                                   String lastName, String email, String phone, int userStatus) {\n        User user = new User();\n        user.setId(id);\n        user.setUsername(username);\n        user.setFirstName(firstName);\n        user.setLastName(lastName);\n        user.setEmail(email);\n        user.setPassword(\"XXXXXXXXXXX\");\n        user.setPhone(phone);\n        user.setUserStatus(userStatus);\n        return user;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/exception/ApiException.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.exception;\n\npublic class ApiException extends Exception {\n    private int code;\n\n    public ApiException(int code, String msg) {\n        super(msg);\n        this.code = code;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/exception/NotFoundException.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.exception;\n\npublic class NotFoundException extends ApiException {\n    private int code;\n\n    public NotFoundException(int code, String msg) {\n        super(code, msg);\n        this.code = code;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/Category.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.model;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Category\")\npublic class Category {\n    private long id;\n    private String name;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public Category() {\n    }\n\n    public Category(String name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/CustomGenerator.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.model;\n\nimport com.fasterxml.jackson.annotation.ObjectIdGenerator;\nimport com.fasterxml.jackson.annotation.ObjectIdGenerators;\n\npublic class CustomGenerator extends ObjectIdGenerators.PropertyGenerator {\n    private static final long serialVersionUID = 1L;\n\n    protected CustomGenerator(Class<?> scope) {\n        super(scope);\n    }\n\n    @Override\n    public ObjectIdGenerator<Object> forScope(Class<?> scope) {\n        return null;\n    }\n\n    @Override\n    public ObjectIdGenerator<Object> newForSerialization(Object context) {\n        return null;\n    }\n\n    @Override\n    public IdKey key(Object key) {\n        return null;\n    }\n\n    @Override\n    public Object generateId(Object forPojo) {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/ExtensionUser.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.model;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.extensions.ExtensionProperty;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"User\")\n@Schema(\n        description = \"User\",\n        extensions = {\n                @Extension(name = \"x-user\", properties = {\n                        @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                @Extension(name = \"user-extensions\", properties = {\n                        @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                        @ExtensionProperty(name = \"address\", value = \"House\")})\n        }\n)\npublic class ExtensionUser {\n    private long id;\n    private String username;\n    private String firstName;\n    private String lastName;\n    private String email;\n    private String password;\n    private String phone;\n    private int userStatus;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"firstName\")\n    public String getFirstName() {\n        return firstName;\n    }\n\n    public void setFirstName(String firstName) {\n        this.firstName = firstName;\n    }\n\n    @XmlElement(name = \"username\")\n    public String getUsername() {\n        return username;\n    }\n\n    public void setUsername(String username) {\n        this.username = username;\n    }\n\n    @XmlElement(name = \"lastName\")\n    public String getLastName() {\n        return lastName;\n    }\n\n    public void setLastName(String lastName) {\n        this.lastName = lastName;\n    }\n\n    @XmlElement(name = \"email\")\n    public String getEmail() {\n        return email;\n    }\n\n    public void setEmail(String email) {\n        this.email = email;\n    }\n\n    @XmlElement(name = \"password\")\n    public String getPassword() {\n        return password;\n    }\n\n    public void setPassword(String password) {\n        this.password = password;\n    }\n\n    @XmlElement(name = \"phone\")\n    public String getPhone() {\n        return phone;\n    }\n\n    public void setPhone(String phone) {\n        this.phone = phone;\n    }\n\n    @XmlElement(name = \"userStatus\")\n    //@Schema(description = \"User Status\", type = \"string\", allowableValues = {\"1-registered\", \"2-active\", \"3-closed\"})\n    @Schema(\n            description = \"User Status\",\n            allowableValues = \"1-registered,2-active,3-closed\",\n            extensions = {\n                    @Extension(name = \"x-userStatus\", properties = {\n                            @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                    @Extension(name = \"userStatus-extensions\", properties = {\n                            @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                            @ExtensionProperty(name = \"address\", value = \"House\")})\n            }\n    )\n    public int getUserStatus() {\n        return userStatus;\n    }\n\n    public void setUserStatus(int userStatus) {\n        this.userStatus = userStatus;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/JacksonBean.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.model;\n\nimport com.fasterxml.jackson.annotation.JsonCreator;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonUnwrapped;\nimport com.fasterxml.jackson.annotation.JsonValue;\n\npublic class JacksonBean {\n\n    private String id;\n    private String ignored;\n    private StringValueBean bean;\n    private NotFoundModel model;\n    private NotFoundModel model2;\n\n    @JsonIgnore\n    public String getIgnored() {\n        return ignored;\n    }\n\n    public void setIgnored(String ignored) {\n        this.ignored = ignored;\n    }\n\n    public void setId(String id) {\n        this.id = id;\n    }\n\n    public void setModel(NotFoundModel model) {\n        this.model = model;\n    }\n\n    public StringValueBean getBean() {\n        return bean;\n    }\n\n    public void setBean(StringValueBean bean) {\n        this.bean = bean;\n    }\n\n    @JsonProperty(\"identity\")\n    public String getId() {\n        return id;\n    }\n\n    @JsonUnwrapped\n    public NotFoundModel getModel() {\n        return model;\n    }\n\n    @JsonUnwrapped(prefix = \"pre\", suffix = \"suf\")\n    public NotFoundModel getModel2() {\n        return model2;\n    }\n\n    public void setModel2(NotFoundModel model2) {\n        this.model2 = model2;\n    }\n\n    public static class StringValueBean {\n\n        private final String value;\n\n        @JsonCreator\n        public StringValueBean(String value) {\n            this.value = value;\n        }\n\n        @JsonValue\n        public String getValue() {\n            return value;\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/ListOfStringsBeanParam.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.model;\n\nimport javax.ws.rs.QueryParam;\nimport java.util.List;\n\npublic class ListOfStringsBeanParam {\n    @QueryParam(value = \"listOfStrings\")\n    private List<String> list;\n\n    public List<String> getList() {\n        return list;\n    }\n\n    public void setList(List<String> list) {\n        this.list = list;\n    }\n}"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/ModelWithJsonIdentity.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.model;\n\nimport com.fasterxml.jackson.annotation.JsonIdentityInfo;\nimport com.fasterxml.jackson.annotation.JsonIdentityReference;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.ObjectIdGenerators;\n\npublic class ModelWithJsonIdentity {\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"name\")\n    @JsonProperty(\"PropertyGeneratorAsId\")\n    public SourceDefinition1 testPropertyGeneratorAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"name\")\n    @JsonProperty(\"PropertyGeneratorAsProperty\")\n    public SourceDefinition1 testPropertyGeneratorAsProperty;\n\n    public class SourceDefinition1 {\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"driverId\")\n    @JsonProperty(\"ChangedPropertyName\")\n    public SourceDefinition2 testChangedPropertyName;\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"driverId\")\n    @JsonProperty(\"ChangedPropertyName2\")\n    public SourceDefinition2 testChangedPropertyName2;\n\n    static public class SourceDefinition2 {\n        @JsonProperty(\"driverId\")\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class)\n    @JsonProperty(\"SourceWithoutPropertyAsId\")\n    public SourceDefinition3 testWithoutPropertyAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class)\n    @JsonProperty(\"SourceWithoutPropertyAsProperty\")\n    public SourceDefinition3 testWithoutPropertyAsProperty;\n\n    public class SourceDefinition3 {\n        @JsonProperty(\"driverId\")\n        public String driver;\n        public String name;\n\n        @JsonProperty(\"@id\")\n        public String id;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = \"testName1\")\n    @JsonProperty(\"IntSequenceGeneratorAsId\")\n    public SourceDefinition4 testIntSequenceGeneratorAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = \"testName2\")\n    @JsonProperty(\"IntSequenceGeneratorAsProperty\")\n    public SourceDefinition4 testIntSequenceGeneratorAsProperty;\n\n    public class SourceDefinition4 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class)\n    @JsonProperty(\"IntSequenceWithoutPropertyAsId\")\n    public SourceDefinition5 testIntSequenceWithoutPropertyAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class)\n    @JsonProperty(\"IntSequenceWithoutPropertyAsProperty\")\n    public SourceDefinition5 testIntSequenceWithoutPropertyAsProperty;\n\n    public class SourceDefinition5 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = \"UUID1\")\n    @JsonProperty(\"UUIDGeneratorAsId\")\n    public SourceDefinition6 testUUIDGeneratorAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = \"UUID2\")\n    @JsonProperty(\"UUIDGeneratorAsProperty\")\n    public SourceDefinition6 testUUIDGeneratorAsProperty;\n\n    public class SourceDefinition6 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class)\n    @JsonProperty(\"UUIDGeneratorWithoutPropertyAsId\")\n    public SourceDefinition7 testUUIDGeneratorWithoutPropertyAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class)\n    @JsonProperty(\"UUIDGeneratorWithoutPropertyAsProperty\")\n    public SourceDefinition7 testUUIDGeneratorWithoutPropertyAsProperty;\n\n    public class SourceDefinition7 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.None.class, property = \"testGeneratorsNone\")\n    @JsonProperty(\"GeneratorsNone\")\n    public SourceDefinition8 testGeneratorsNone;\n\n    public class SourceDefinition8 {\n        @JsonProperty(\"driverId\")\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = CustomGenerator.class, property = \"name\")\n    @JsonProperty(\"CustomGenerator\")\n    public SourceDefinition9 testCustomGenerator;\n\n    public class SourceDefinition9 {\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityInfo(generator = CustomGenerator.class, property = \"name\")\n    @JsonProperty(\"WithoutJsonIdentityReference\")\n    public SourceDefinition10 testWithoutJsonIdentityReference;\n\n    public class SourceDefinition10 {\n        public String driver;\n        public String name;\n    }\n}"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/ModelWithJsonIdentityCyclic.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.model;\n\nimport com.fasterxml.jackson.annotation.JsonIdentityInfo;\nimport com.fasterxml.jackson.annotation.JsonIdentityReference;\nimport com.fasterxml.jackson.annotation.ObjectIdGenerators;\n\nimport java.util.List;\n\npublic class ModelWithJsonIdentityCyclic {\n\n    public Long id;\n\n    public List<SourceDefinition> sourceDefinitions;\n\n    @JsonIdentityInfo(\n            generator = ObjectIdGenerators.PropertyGenerator.class,\n            property = \"name\")\n    public static class SourceDefinition {\n        public String driver;\n        public String name;\n\n        @JsonIdentityReference(alwaysAsId=true)\n        @JsonIdentityInfo(\n                generator = ObjectIdGenerators.PropertyGenerator.class,\n                property = \"id\")\n        public ModelWithJsonIdentityCyclic model;\n    }\n\n}"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/MultipleBaseBean.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.model;\n\n@io.swagger.v3.oas.annotations.media.Schema(\n        description = \"MultipleBaseBean\",\n        subTypes = { MultipleSub1Bean.class, MultipleSub2Bean.class }\n)\npublic class MultipleBaseBean {\n    public String beanType;\n    public int a;\n    public String b;\n}"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/MultipleSub1Bean.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.model;\n\n@io.swagger.v3.oas.annotations.media.Schema(\n        description = \"MultipleSub1Bean\"\n)\npublic class MultipleSub1Bean extends MultipleBaseBean {\n    public int c;\n}"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/MultipleSub2Bean.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.model;\n\n@io.swagger.v3.oas.annotations.media.Schema(\n        description = \"MultipleSub2Bean\"\n)\npublic class MultipleSub2Bean extends MultipleBaseBean {\n    public int d;\n}"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/NotFoundModel.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.model;\n\npublic class NotFoundModel {\n    int code;\n    String message;\n\n    public NotFoundModel() {\n    }\n\n    public NotFoundModel(int code, String message) {\n        this.code = code;\n        this.message = message;\n    }\n\n    public int getCode() {\n        return code;\n    }\n\n    public void setCode(int code) {\n        this.code = code;\n    }\n\n    public String getMessage() {\n        return message;\n    }\n\n    public void setMessage(String message) {\n        this.message = message;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/Pet.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.model;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlElementWrapper;\nimport javax.xml.bind.annotation.XmlRootElement;\nimport java.util.ArrayList;\nimport java.util.List;\n\n@XmlRootElement(name = \"Pet\")\npublic class Pet {\n    private long id;\n    private Category category;\n    private String name;\n    private List<String> photoUrls = new ArrayList<String>();\n    private List<Tag> tags = new ArrayList<Tag>();\n    private String status;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"category\")\n    public Category getCategory() {\n        return category;\n    }\n\n    public void setCategory(Category category) {\n        this.category = category;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    @XmlElementWrapper(name = \"photoUrls\")\n    @XmlElement(name = \"photoUrl\")\n    public List<String> getPhotoUrls() {\n        return photoUrls;\n    }\n\n    public void setPhotoUrls(List<String> photoUrls) {\n        this.photoUrls = photoUrls;\n    }\n\n    @XmlElementWrapper(name = \"tags\")\n    @XmlElement(name = \"tag\")\n    public List<Tag> getTags() {\n        return tags;\n    }\n\n    public void setTags(List<Tag> tags) {\n        this.tags = tags;\n    }\n\n    @XmlElement(name = \"status\")\n    @Schema(description = \"pet status in the store\", allowableValues = \"available,pending,sold\")\n    public String getStatus() {\n        return status;\n    }\n\n    public void setStatus(String status) {\n        this.status = status;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/Tag.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.model;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Tag\")\npublic class Tag {\n    private long id;\n    private String name;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/User.java",
    "content": "package io.swagger.v3.plugins.gradle.resources.model;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"User\")\npublic class User {\n    private long id;\n    private String username;\n    private String firstName;\n    private String lastName;\n    private String email;\n    private String password;\n    private String phone;\n    private int userStatus;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"firstName\")\n    public String getFirstName() {\n        return firstName;\n    }\n\n    public void setFirstName(String firstName) {\n        this.firstName = firstName;\n    }\n\n    @XmlElement(name = \"username\")\n    public String getUsername() {\n        return username;\n    }\n\n    public void setUsername(String username) {\n        this.username = username;\n    }\n\n    @XmlElement(name = \"lastName\")\n    public String getLastName() {\n        return lastName;\n    }\n\n    public void setLastName(String lastName) {\n        this.lastName = lastName;\n    }\n\n    @XmlElement(name = \"email\")\n    public String getEmail() {\n        return email;\n    }\n\n    public void setEmail(String email) {\n        this.email = email;\n    }\n\n    @XmlElement(name = \"password\")\n    public String getPassword() {\n        return password;\n    }\n\n    public void setPassword(String password) {\n        this.password = password;\n    }\n\n    @XmlElement(name = \"phone\")\n    public String getPhone() {\n        return phone;\n    }\n\n    public void setPhone(String phone) {\n        this.phone = phone;\n    }\n\n    @XmlElement(name = \"userStatus\")\n    //@Schema(description = \"User Status\", type = \"string\", allowableValues = {\"1-registered\", \"2-active\", \"3-closed\"})\n    @Schema(description = \"User Status\", allowableValues = \"1-registered,2-active,3-closed\")\n    public int getUserStatus() {\n        return userStatus;\n    }\n\n    public void setUserStatus(int userStatus) {\n        this.userStatus = userStatus;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-integration/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\"\n\txmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n\t<modelVersion>4.0.0</modelVersion>\n\t<parent>\n\t\t<groupId>io.swagger.core.v3</groupId>\n\t\t<artifactId>swagger-project</artifactId>\n\t\t<version>2.2.46-SNAPSHOT</version>\n\t\t<relativePath>../..</relativePath>\n\t</parent>\n\t<artifactId>swagger-integration</artifactId>\n\t<name>swagger-integration</name>\n\t<description>swagger-integration</description>\n\t<dependencies>\n\t\t<dependency>\n\t\t\t<groupId>io.github.classgraph</groupId>\n\t\t\t<artifactId>classgraph</artifactId>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>jakarta.ws.rs</groupId>\n\t\t\t<artifactId>jakarta.ws.rs-api</artifactId>\n\t\t\t<scope>test</scope>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>org.testng</groupId>\n\t\t\t<artifactId>testng</artifactId>\n\t\t\t<scope>test</scope>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>io.swagger.core.v3</groupId>\n\t\t\t<artifactId>swagger-core</artifactId>\n\t\t\t<version>${project.version}</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>io.swagger.core.v3</groupId>\n\t\t\t<artifactId>swagger-models</artifactId>\n\t\t\t<version>${project.version}</version>\n\t\t</dependency>\n\t</dependencies>\n\t<build>\n\t\t<sourceDirectory>src/main/java</sourceDirectory>\n\t\t<defaultGoal>install</defaultGoal>\n\t\t<plugins>\n            <plugin>\n                <groupId>biz.aQute.bnd</groupId>\n                <artifactId>bnd-maven-plugin</artifactId>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <configuration>\n                    <archive>\n                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>\n\t\t\t\t\t\t<manifestEntries>\n\t\t\t\t\t\t\t<Automatic-Module-Name>io.swagger.v3.oas.integration</Automatic-Module-Name>\n\t\t\t\t\t\t</manifestEntries>\n\t\t\t\t\t</archive>\n                </configuration>\n            </plugin>\n\t\t</plugins>\n\t</build>\n</project>\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/ClasspathOpenApiConfigurationLoader.java",
    "content": "package io.swagger.v3.oas.integration;\n\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\n\nimport java.io.IOException;\n\npublic class ClasspathOpenApiConfigurationLoader implements StringOpenApiConfigurationLoader {\n\n    @Override\n    public OpenAPIConfiguration load(String path) throws IOException {\n        String sanitized = (path.startsWith(\"/\") ? path : \"/\" + path);\n        String configString = readInputStreamToString(this.getClass().getResource(sanitized).openStream());\n        return deserializeConfig(path, configString);\n\n    }\n\n    @Override\n    public boolean exists(String path) {\n        String sanitized = (path.startsWith(\"/\") ? path : \"/\" + path);\n        return this.getClass().getResource(sanitized) != null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/ContextUtils.java",
    "content": "package io.swagger.v3.oas.integration;\n\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class ContextUtils {\n\n    private static Logger LOGGER = LoggerFactory.getLogger(ContextUtils.class);\n\n    // TODO implement proper clone see #2227\n    public static OpenAPIConfiguration deepCopy(OpenAPIConfiguration config) {\n        if (config == null) {\n            return null;\n        }\n        try {\n            return Json.mapper().readValue(Json.pretty(config), SwaggerConfiguration.class);\n        } catch (Exception e) {\n            LOGGER.error(\"Exception cloning config: \" + e.getMessage(), e);\n            return config;\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/FileOpenApiConfigurationLoader.java",
    "content": "package io.swagger.v3.oas.integration;\n\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\n\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.IOException;\n\npublic class FileOpenApiConfigurationLoader implements StringOpenApiConfigurationLoader {\n\n    @Override\n    public OpenAPIConfiguration load(String path) throws IOException {\n        File file = new File(path);\n        return deserializeConfig(path, readInputStreamToString(new FileInputStream(file)));\n    }\n\n    @Override\n    public boolean exists(String path) {\n        File file = new File(path);\n        return file.exists();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/GenericOpenApiContext.java",
    "content": "package io.swagger.v3.oas.integration;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonPropertyOrder;\nimport com.fasterxml.jackson.databind.MapperFeature;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.SerializationFeature;\nimport com.fasterxml.jackson.databind.annotation.JsonSerialize;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.filter.OpenAPI31SpecFilter;\nimport io.swagger.v3.core.filter.SpecFilter;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.jackson.PathsSerializer;\nimport io.swagger.v3.core.jackson.mixin.Schema31Mixin;\nimport io.swagger.v3.core.util.Configuration;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.core.util.Yaml31;\nimport io.swagger.v3.oas.integration.api.ObjectMapperProcessor;\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiConfigurationLoader;\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport io.swagger.v3.oas.integration.api.OpenApiReader;\nimport io.swagger.v3.oas.integration.api.OpenApiScanner;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Paths;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.apache.commons.lang3.StringUtils;\nimport org.apache.commons.lang3.tuple.ImmutablePair;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.io.IOException;\nimport java.math.BigDecimal;\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.concurrent.ConcurrentHashMap;\n\npublic class GenericOpenApiContext<T extends GenericOpenApiContext> implements OpenApiContext {\n\n    private static Logger LOGGER = LoggerFactory.getLogger(GenericOpenApiContext.class);\n\n    protected Set<String> resourcePackages;\n    protected Set<String> resourceClasses;\n    protected String id = OPENAPI_CONTEXT_ID_DEFAULT;\n    protected OpenApiContext parent;\n    protected String configLocation;\n    private OpenAPIConfiguration openApiConfiguration;\n\n    private OpenApiReader openApiReader;\n    private OpenApiScanner openApiScanner;\n    private OpenApiReader providedOpenApiReader;\n\n    private ObjectMapperProcessor objectMapperProcessor;\n    private Set<ModelConverter> modelConverters;\n\n    private ObjectMapper outputJsonMapper;\n    private ObjectMapper outputYamlMapper;\n\n    private ConcurrentHashMap<String, Cache> cache = new ConcurrentHashMap<>();\n\n    // 0 doesn't cache\n    // -1 perpetual\n    private long cacheTTL = -1;\n\n    private Boolean openAPI31;\n\n    private Boolean convertToOpenAPI31;\n\n    private Schema.SchemaResolution schemaResolution;\n\n    private String openAPIVersion;\n\n    public long getCacheTTL() {\n        return cacheTTL;\n    }\n\n    public void setCacheTTL(long cacheTTL) {\n        this.cacheTTL = cacheTTL;\n    }\n\n    public T cacheTTL(long cacheTTL) {\n        this.cacheTTL = cacheTTL;\n        return (T) this;\n    }\n\n    public OpenApiReader getOpenApiReader() {\n        return openApiReader;\n    }\n\n    @Override\n    public void setOpenApiReader(OpenApiReader openApiReader) {\n        this.openApiReader = openApiReader;\n        providedOpenApiReader = openApiReader;\n    }\n\n    public OpenApiScanner getOpenApiScanner() {\n        return openApiScanner;\n    }\n\n    @Override\n    public void setOpenApiScanner(OpenApiScanner openApiScanner) {\n        this.openApiScanner = openApiScanner;\n    }\n\n    public final T openApiReader(OpenApiReader openApiReader) {\n        setOpenApiReader(openApiReader);\n        return (T) this;\n    }\n\n    public final T openApiScanner(OpenApiScanner openApiScanner) {\n        this.openApiScanner = openApiScanner;\n        return (T) this;\n    }\n\n    public Set<String> getResourcePackages() {\n        return resourcePackages;\n    }\n\n    public void setResourcePackages(Set<String> resourcePackages) {\n        this.resourcePackages = resourcePackages;\n    }\n\n    public T resourcePackages(Set<String> resourcePackages) {\n        this.resourcePackages = resourcePackages;\n        return (T) this;\n    }\n\n    public Set<String> getResourceClasses() {\n        return resourceClasses;\n    }\n\n    public void setResourceClasses(Set<String> resourceClasses) {\n        this.resourceClasses = resourceClasses;\n    }\n\n    public T resourceClasses(Set<String> resourceClasses) {\n        this.resourceClasses = resourceClasses;\n        return (T) this;\n    }\n\n    public T openApiConfiguration(OpenAPIConfiguration openApiConfiguration) {\n        this.openApiConfiguration = openApiConfiguration;\n        return (T) this;\n    }\n\n    @Override\n    public String getConfigLocation() {\n        return configLocation;\n    }\n\n    public void setConfigLocation(String configLocation) {\n        this.configLocation = configLocation;\n    }\n\n    public final T configLocation(String configLocation) {\n        this.configLocation = configLocation;\n        return (T) this;\n    }\n\n    @Override\n    public String getId() {\n        return this.id;\n    }\n\n    public void setId(String id) {\n        this.id = id;\n    }\n\n    public final T id(String id) {\n        this.id = id;\n        return (T) this;\n    }\n\n    @Override\n    public OpenApiContext getParent() {\n        return this.parent;\n    }\n\n    public void setParent(OpenApiContext parent) {\n        this.parent = parent;\n    }\n\n    public final T parent(OpenApiContext parent) {\n        this.parent = parent;\n        return (T) this;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public ObjectMapperProcessor getObjectMapperProcessor() {\n        return objectMapperProcessor;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    @Override\n    public void setObjectMapperProcessor(ObjectMapperProcessor objectMapperProcessor) {\n        this.objectMapperProcessor = objectMapperProcessor;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public final T objectMapperProcessor(ObjectMapperProcessor objectMapperProcessor) {\n        this.objectMapperProcessor = objectMapperProcessor;\n        return (T) this;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public Set<ModelConverter> getModelConverters() {\n        return modelConverters;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    @Override\n    public void setModelConverters(Set<ModelConverter> modelConverters) {\n        this.modelConverters = modelConverters;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public final T modelConverters(Set<ModelConverter> modelConverters) {\n        this.modelConverters = modelConverters;\n        return (T) this;\n    }\n\n    /**\n     * @since 2.1.6\n     */\n    public ObjectMapper getOutputJsonMapper() {\n        return outputJsonMapper;\n    }\n\n    /**\n     * @since 2.1.6\n     */\n    @Override\n    public void setOutputJsonMapper(ObjectMapper outputJsonMapper) {\n        this.outputJsonMapper = outputJsonMapper;\n    }\n\n    /**\n     * @since 2.1.6\n     */\n    public final T outputJsonMapper(ObjectMapper outputJsonMapper) {\n        this.outputJsonMapper = outputJsonMapper;\n        return (T) this;\n    }\n\n    /**\n     * @since 2.1.6\n     */\n    public ObjectMapper getOutputYamlMapper() {\n        return outputYamlMapper;\n    }\n\n    /**\n     * @since 2.1.6\n     */\n    @Override\n    public void setOutputYamlMapper(ObjectMapper outputYamlMapper) {\n        this.outputYamlMapper = outputYamlMapper;\n    }\n\n    /**\n     * @since 2.1.6\n     */\n    public final T outputYamlMapper(ObjectMapper outputYamlMapper) {\n        this.outputYamlMapper = outputYamlMapper;\n        return (T) this;\n    }\n\n    /**\n     * @since 2.1.8\n     */\n    public Boolean isOpenAPI31() {\n        return openAPI31;\n    }\n\n    /**\n     * @since 2.1.8\n     */\n    public void setOpenAPI31(Boolean v) {\n        this.openAPI31 = openAPI31;\n    }\n\n    /**\n     * @since 2.1.8\n     */\n    public T openAPI31(Boolean openAPI31) {\n        this.openAPI31 = openAPI31;\n        return (T) this;\n    }\n\n    /**\n     * @since 2.2.12\n     */\n    public Boolean isConvertToOpenAPI31() {\n        return convertToOpenAPI31;\n    }\n\n    /**\n     * @since 2.2.12\n     */\n    public void setConvertToOpenAPI31(Boolean convertToOpenAPI31) {\n        this.convertToOpenAPI31 = convertToOpenAPI31;\n        if (Boolean.TRUE.equals(convertToOpenAPI31)) {\n            this.openAPI31 = true;\n        }\n    }\n\n    /**\n     * @since 2.2.12\n     */\n    public T convertToOpenAPI31(Boolean convertToOpenAPI31) {\n        this.setConvertToOpenAPI31(convertToOpenAPI31);\n        return (T) this;\n    }\n\n    /**\n     * @since 2.2.24\n     */\n    public Schema.SchemaResolution getSchemaResolution() {\n        return schemaResolution;\n    }\n\n    /**\n     * @since 2.2.24\n     */\n    public void setSchemaResolution(Schema.SchemaResolution schemaResolution) {\n        this.schemaResolution = schemaResolution;\n    }\n\n    /**\n     * @since 2.2.24\n     */\n    public T schemaResolution(Schema.SchemaResolution schemaResolution) {\n        this.schemaResolution = schemaResolution;\n        return (T) this;\n    }\n\n    /**\n     * @since 2.2.28\n     */\n    public String getOpenAPIVersion() {\n        return openAPIVersion;\n    }\n\n    /**\n     * @since 2.2.28\n     */\n    public void setOpenAPIVersion(String openAPIVersion) {\n        this.openAPIVersion = openAPIVersion;\n    }\n\n    /**\n     * @since 2.2.28\n     */\n    public T openAPIVersion(String openAPIVersion) {\n        this.openAPIVersion = openAPIVersion;\n        return (T) this;\n    }\n\n    protected void register() {\n        OpenApiContextLocator.getInstance().putOpenApiContext(id, this);\n    }\n\n    @Override\n    public OpenAPIConfiguration getOpenApiConfiguration() {\n        return openApiConfiguration;\n    }\n\n    public void setOpenApiConfiguration(OpenAPIConfiguration openApiConfiguration) {\n        this.openApiConfiguration = openApiConfiguration;\n    }\n\n    protected OpenApiReader buildReader(final OpenAPIConfiguration openApiConfiguration) throws Exception {\n        OpenApiReader reader;\n        if (StringUtils.isNotBlank(openApiConfiguration.getReaderClass())) {\n            Class cls = getClass().getClassLoader().loadClass(openApiConfiguration.getReaderClass());\n            reader = (OpenApiReader) cls.newInstance();\n        } else {\n            reader = new OpenApiReader() {\n\n                OpenAPIConfiguration openApiConfiguration;\n\n                @Override\n                public void setConfiguration(OpenAPIConfiguration openApiConfiguration) {\n                    this.openApiConfiguration = openApiConfiguration;\n                }\n\n                @Override\n                public OpenAPI read(Set<Class<?>> classes, Map<String, Object> resources) {\n                    return openApiConfiguration.getOpenAPI();\n                }\n            };\n        }\n        reader.setConfiguration(openApiConfiguration);\n        return reader;\n    }\n\n    protected OpenApiScanner buildScanner(final OpenAPIConfiguration openApiConfiguration) throws Exception {\n        OpenApiScanner scanner;\n        if (StringUtils.isNotBlank(openApiConfiguration.getScannerClass())) {\n            Class cls = getClass().getClassLoader().loadClass(openApiConfiguration.getScannerClass());\n            scanner = (OpenApiScanner) cls.newInstance();\n        } else {\n            scanner = new GenericOpenApiScanner();\n        }\n        scanner.setConfiguration(openApiConfiguration);\n        return scanner;\n    }\n\n    protected ObjectMapperProcessor buildObjectMapperProcessor(final OpenAPIConfiguration openApiConfiguration) throws Exception {\n        ObjectMapperProcessor objectMapperProcessor = null;\n        if (StringUtils.isNotBlank(openApiConfiguration.getObjectMapperProcessorClass())) {\n            Class cls = getClass().getClassLoader().loadClass(openApiConfiguration.getObjectMapperProcessorClass());\n            objectMapperProcessor = (ObjectMapperProcessor) cls.newInstance();\n        }\n        return objectMapperProcessor;\n    }\n\n    protected Set<ModelConverter> buildModelConverters(final OpenAPIConfiguration openApiConfiguration) throws Exception {\n        if (openApiConfiguration.getModelConverterClasses() != null && !openApiConfiguration.getModelConverterClasses().isEmpty()) {\n            LinkedHashSet<ModelConverter> modelConverters = new LinkedHashSet<>();\n            for (String converterClass: openApiConfiguration.getModelConverterClasses()) {\n                Class cls = getClass().getClassLoader().loadClass(converterClass);\n                ModelConverter converter = (ModelConverter) cls.newInstance();\n                modelConverters.add(converter);\n            }\n            return modelConverters;\n        }\n        return null;\n    }\n\n    protected List<ImmutablePair<String, String>> getKnownLocations() {\n        return Arrays.asList(\n                new ImmutablePair<>(\"classpath\", \"openapi-configuration.yaml\"),\n                new ImmutablePair<>(\"classpath\", \"openapi-configuration.json\"),\n                new ImmutablePair<>(\"file\", \"openapi-configuration.yaml\"),\n                new ImmutablePair<>(\"file\", \"openapi-configuration.json\"),\n                new ImmutablePair<>(\"classpath\", \"openapi.yaml\"),\n                new ImmutablePair<>(\"classpath\", \"openapi.json\"),\n                new ImmutablePair<>(\"file\", \"openapi.yaml\"),\n                new ImmutablePair<>(\"file\", \"openapi.json\"),\n                new ImmutablePair<>(\"service\", \"\")\n        );\n    }\n\n    protected Map<String, OpenApiConfigurationLoader> getLocationLoaders() {\n        Map<String, OpenApiConfigurationLoader> map = new HashMap<>();\n        map.put(\"classpath\", new ClasspathOpenApiConfigurationLoader());\n        map.put(\"file\", new FileOpenApiConfigurationLoader());\n        map.put(\"url\", new URLOpenApiConfigurationLoader());\n        map.put(\"service\", new ServiceOpenApiConfigurationLoader());\n        return map;\n    }\n\n    protected OpenAPIConfiguration loadConfiguration() throws OpenApiConfigurationException {\n\n        Map<String, OpenApiConfigurationLoader> loaders = getLocationLoaders();\n        try {\n\n            if (StringUtils.isNotEmpty(configLocation)) {\n                if (loaders.get(\"classpath\").exists(configLocation)) {\n                    return loaders.get(\"classpath\").load(configLocation);\n                }\n                if (loaders.get(\"file\").exists(configLocation)) {\n                    return loaders.get(\"file\").load(configLocation);\n                }\n            }\n            // check known locations\n            List<ImmutablePair<String, String>> knownLocations = getKnownLocations();\n            for (ImmutablePair<String, String> location : knownLocations) {\n                if (loaders.get(location.left).exists(location.right)) {\n                    try {\n                        return loaders.get(location.left).load(location.right);\n                    } catch (IOException ioe) {\n                        // try next one\n                    }\n                }\n            }\n            return null;\n        } catch (Exception e) {\n            throw new OpenApiConfigurationException(e.getMessage(), e);\n        }\n    }\n\n    @Override\n    public T init() throws OpenApiConfigurationException {\n\n        if (openApiConfiguration == null) {\n            openApiConfiguration = loadConfiguration();\n        }\n\n        if (openApiConfiguration == null) {\n            openApiConfiguration = new SwaggerConfiguration().resourcePackages(resourcePackages).resourceClasses(resourceClasses);\n            ((SwaggerConfiguration) openApiConfiguration).setId(id);\n            ((SwaggerConfiguration) openApiConfiguration).setOpenAPI31(openAPI31);\n            ((SwaggerConfiguration) openApiConfiguration).setConvertToOpenAPI31(convertToOpenAPI31);\n            if (schemaResolution != null) {\n                ((SwaggerConfiguration) openApiConfiguration).setSchemaResolution(schemaResolution);\n            }\n            if (openAPIVersion != null && !openAPIVersion.isEmpty()) {\n                ((SwaggerConfiguration) openApiConfiguration).openAPIVersion(openAPIVersion);\n                ((SwaggerConfiguration) openApiConfiguration).setSchemaResolution(schemaResolution);\n            }\n        }\n\n        openApiConfiguration = mergeParentConfiguration(openApiConfiguration, parent);\n\n        try {\n            if (openApiReader == null) {\n                openApiReader = buildReader(ContextUtils.deepCopy(openApiConfiguration));\n            }\n            if (openApiScanner == null) {\n                openApiScanner = buildScanner(ContextUtils.deepCopy(openApiConfiguration));\n            }\n            if (objectMapperProcessor == null) {\n                objectMapperProcessor = buildObjectMapperProcessor(ContextUtils.deepCopy(openApiConfiguration));\n            }\n            if (modelConverters == null || modelConverters.isEmpty()) {\n                modelConverters = buildModelConverters(ContextUtils.deepCopy(openApiConfiguration));\n            }\n            if (outputJsonMapper == null) {\n                if (Boolean.TRUE.equals(openApiConfiguration.isOpenAPI31())) {\n                    outputJsonMapper = Json31.mapper().copy();\n                } else {\n                    outputJsonMapper = Json.mapper().copy();\n                }\n            }\n            if (outputYamlMapper == null) {\n                if (Boolean.TRUE.equals(openApiConfiguration.isOpenAPI31())) {\n                    outputYamlMapper = Yaml31.mapper().copy();\n                } else {\n                    outputYamlMapper = Yaml.mapper().copy();\n                }\n            }\n            if (openApiConfiguration.isSortOutput() != null && openApiConfiguration.isSortOutput()) {\n                outputJsonMapper.configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true);\n                outputJsonMapper.configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true);\n                outputYamlMapper.configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true);\n                outputYamlMapper.configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true);\n                if (Boolean.TRUE.equals(openApiConfiguration.isOpenAPI31())) {\n                    outputJsonMapper.addMixIn(OpenAPI.class, SortedOpenAPIMixin31.class);\n                    outputJsonMapper.addMixIn(Schema.class, SortedSchemaMixin31.class);\n                    outputYamlMapper.addMixIn(OpenAPI.class, SortedOpenAPIMixin31.class);\n                    outputYamlMapper.addMixIn(Schema.class, SortedSchemaMixin31.class);\n                } else {\n                    outputJsonMapper.addMixIn(OpenAPI.class, SortedOpenAPIMixin.class);\n                    outputJsonMapper.addMixIn(Schema.class, SortedSchemaMixin.class);\n                    outputYamlMapper.addMixIn(OpenAPI.class, SortedOpenAPIMixin.class);\n                    outputYamlMapper.addMixIn(Schema.class, SortedSchemaMixin.class);\n                }\n            }\n        } catch (Exception e) {\n            LOGGER.error(\"error initializing context: \" + e.getMessage(), e);\n            throw new OpenApiConfigurationException(\"error initializing context: \" + e.getMessage(), e);\n        }\n\n\n        try {\n            if (objectMapperProcessor != null) {\n                ObjectMapper mapper = IntegrationObjectMapperFactory.createJson();\n                objectMapperProcessor.processJsonObjectMapper(mapper);\n                ModelConverters.getInstance(Boolean.TRUE.equals(openApiConfiguration.isOpenAPI31()), openApiConfiguration.getSchemaResolution()).addConverter(new ModelResolver(mapper));\n\n                objectMapperProcessor.processOutputJsonObjectMapper(outputJsonMapper);\n                objectMapperProcessor.processOutputYamlObjectMapper(outputYamlMapper);\n            }\n        } catch (Exception e) {\n            LOGGER.error(\"error configuring objectMapper: \" + e.getMessage(), e);\n            throw new OpenApiConfigurationException(\"error configuring objectMapper: \" + e.getMessage(), e);\n        }\n\n        try {\n            if (modelConverters != null && !modelConverters.isEmpty()) {\n                for (ModelConverter converter: modelConverters) {\n                    ModelConverters.getInstance(Boolean.TRUE.equals(openApiConfiguration.isOpenAPI31())).addConverter(converter);\n                }\n            }\n        } catch (Exception e) {\n            LOGGER.error(\"error configuring model converters: \" + e.getMessage(), e);\n            throw new OpenApiConfigurationException(\"error configuring model converters: \" + e.getMessage(), e);\n        }\n\n        // set cache TTL if present in configuration\n        if (openApiConfiguration.getCacheTTL() != null) {\n            this.cacheTTL = openApiConfiguration.getCacheTTL();\n        }\n\n        // set openAPI31 if present in configuration\n        if (openApiConfiguration.isOpenAPI31() != null && this.openAPI31 == null) {\n            this.openAPI31 = openApiConfiguration.isOpenAPI31();\n        }\n\n        if (openApiConfiguration.isConvertToOpenAPI31() != null && this.convertToOpenAPI31 == null) {\n            this.convertToOpenAPI31 = openApiConfiguration.isConvertToOpenAPI31();\n        }\n\n        if (openApiConfiguration.getSchemaResolution() != null && this.getSchemaResolution() == null) {\n            this.schemaResolution = openApiConfiguration.getSchemaResolution();\n        }\n        register();\n        return (T) this;\n    }\n\n    private OpenAPIConfiguration mergeParentConfiguration(OpenAPIConfiguration config, OpenApiContext parent) {\n        if (parent == null || parent.getOpenApiConfiguration() == null) {\n            return config;\n        }\n        OpenAPIConfiguration parentConfig = parent.getOpenApiConfiguration();\n\n        SwaggerConfiguration merged = null;\n\n        if (config instanceof SwaggerConfiguration) {\n            merged = (SwaggerConfiguration) config;\n        } else {\n            merged = (SwaggerConfiguration) ContextUtils.deepCopy(config);\n        }\n\n        if (merged.getResourceClasses() == null) {\n            merged.setResourceClasses(parentConfig.getResourceClasses());\n        }\n        if (merged.getFilterClass() == null) {\n            merged.setFilterClass(parentConfig.getFilterClass());\n        }\n        if (merged.getIgnoredRoutes() == null) {\n            merged.setIgnoredRoutes(parentConfig.getIgnoredRoutes());\n        }\n        if (merged.getOpenAPI() == null) {\n            merged.setOpenAPI(parentConfig.getOpenAPI());\n        }\n        if (merged.getReaderClass() == null) {\n            merged.setReaderClass(parentConfig.getReaderClass());\n        }\n        if (merged.getResourcePackages() == null) {\n            merged.setResourcePackages(parentConfig.getResourcePackages());\n        }\n        if (merged.getScannerClass() == null) {\n            merged.setScannerClass(parentConfig.getScannerClass());\n        }\n        if (merged.getCacheTTL() == null) {\n            merged.setCacheTTL(parentConfig.getCacheTTL());\n        }\n        if (merged.getUserDefinedOptions() == null) {\n            merged.setUserDefinedOptions(parentConfig.getUserDefinedOptions());\n        }\n        if (merged.isPrettyPrint() == null) {\n            merged.setPrettyPrint(parentConfig.isPrettyPrint());\n        }\n        if (merged.isSortOutput() == null) {\n            merged.setSortOutput(parentConfig.isSortOutput());\n        }\n        if (merged.isAlwaysResolveAppPath() == null) {\n            merged.setAlwaysResolveAppPath(parentConfig.isAlwaysResolveAppPath());\n        }\n        if (merged.isSkipResolveAppPath() == null) {\n            merged.setSkipResolveAppPath(parentConfig.isSkipResolveAppPath());\n        }\n        if (merged.isReadAllResources() == null) {\n            merged.setReadAllResources(parentConfig.isReadAllResources());\n        }\n        if (merged.getObjectMapperProcessorClass() == null) {\n            merged.setObjectMapperProcessorClass(parentConfig.getObjectMapperProcessorClass());\n        }\n        if (merged.getModelConverterClasses() == null) {\n            merged.setModelConverterClassess(parentConfig.getModelConverterClasses());\n        }\n        if (merged.isOpenAPI31() == null) {\n            merged.setOpenAPI31(parentConfig.isOpenAPI31());\n        }\n        if (merged.isConvertToOpenAPI31() == null) {\n            merged.setConvertToOpenAPI31(parentConfig.isConvertToOpenAPI31());\n        }\n        if (merged.getDefaultResponseCode() == null) {\n            merged.setDefaultResponseCode(parentConfig.getDefaultResponseCode());\n        }\n\n        if (merged.getSchemaResolution() == null) {\n            merged.setSchemaResolution(parentConfig.getSchemaResolution());\n        }\n\n        if (merged.getValidatorProcessorClass() == null) {\n            merged.setValidatorProcessorClass(parentConfig.getValidatorProcessorClass());\n        }\n\n        if (merged.getGroupsValidationStrategy() == null || merged.getGroupsValidationStrategy().equals(Configuration.GroupsValidationStrategy.DEFAULT)) {\n            merged.setGroupsValidationStrategy(parentConfig.getGroupsValidationStrategy());\n        }\n\n        return merged;\n    }\n\n    @Override\n    public OpenAPI read() {\n\n        if (cacheTTL == 0) {\n            resetReader();\n            OpenAPI openAPI = getOpenApiReader().read(getOpenApiScanner().classes(), getOpenApiScanner().resources());\n            if (Boolean.TRUE.equals(convertToOpenAPI31)) {\n                openAPI = new SpecFilter().filter(openAPI, new OpenAPI31SpecFilter(), null, null, null);\n            }\n            return openAPI;\n\n        }\n        Cache cached = cache.get(\"openapi\");\n        if (cached == null || cached.isStale(cacheTTL)) {\n            cached = new Cache();\n            cached.createdAt = System.currentTimeMillis();\n            resetReader();\n            cached.openApi = getOpenApiReader().read(getOpenApiScanner().classes(), getOpenApiScanner().resources());\n            if (Boolean.TRUE.equals(convertToOpenAPI31)) {\n                cached.openApi = new SpecFilter().filter(cached.openApi, new OpenAPI31SpecFilter(), null, null, null);\n            }\n            cache.put(\"openapi\", cached);\n        }\n        return cached.openApi;\n    }\n\n    protected void resetReader() {\n        if (providedOpenApiReader == null) {\n            try {\n                openApiReader = buildReader(ContextUtils.deepCopy(openApiConfiguration));\n            } catch (Exception e) {\n                LOGGER.error(\"error building reader: \" + e.getMessage(), e);\n                // keep previous reader\n            }\n        }\n    }\n\n    static class Cache {\n        long createdAt = 0;\n        OpenAPI openApi;\n\n        boolean isStale(long cacheTTL) {\n            return (cacheTTL > 0 && System.currentTimeMillis() - createdAt > cacheTTL);\n        }\n    }\n\n    @JsonPropertyOrder(value = {\"openapi\", \"info\", \"externalDocs\", \"servers\", \"security\", \"tags\", \"paths\", \"components\"}, alphabetic = true)\n    static abstract class SortedOpenAPIMixin {\n\n        @JsonAnyGetter\n        @JsonPropertyOrder(alphabetic = true)\n        public abstract Map<String, Object> getExtensions();\n\n        @JsonAnySetter\n        public abstract void addExtension(String name, Object value);\n\n        @JsonSerialize(using = PathsSerializer.class)\n        public abstract Paths getPaths();\n    }\n\n    @JsonPropertyOrder(value = {\"type\", \"format\"}, alphabetic = true)\n    static abstract class SortedSchemaMixin {\n\n        @JsonAnyGetter\n        @JsonPropertyOrder(alphabetic = true)\n        public abstract Map<String, Object> getExtensions();\n\n        @JsonAnySetter\n        public abstract void addExtension(String name, Object value);\n\n        @JsonIgnore\n        public abstract boolean getExampleSetFlag();\n\n        @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)\n        public abstract Object getExample();\n\n        @JsonIgnore\n        public abstract Map<String, Object> getJsonSchema();\n\n        @JsonIgnore\n        public abstract BigDecimal getExclusiveMinimumValue();\n\n        @JsonIgnore\n        public abstract BigDecimal getExclusiveMaximumValue();\n\n        @JsonIgnore\n        public abstract Map<String, Schema> getPatternProperties();\n\n        @JsonIgnore\n        public abstract Schema getContains();\n        @JsonIgnore\n        public abstract String get$id();\n        @JsonIgnore\n        public abstract String get$anchor();\n        @JsonIgnore\n        public abstract String get$schema();\n        @JsonIgnore\n        public abstract Set<String> getTypes();\n\n        @JsonIgnore\n        public abstract Object getJsonSchemaImpl();\n\n        @JsonIgnore\n        public abstract List<Schema> getPrefixItems();\n\n        @JsonIgnore\n        public abstract String getContentEncoding();\n\n        @JsonIgnore\n        public abstract String getContentMediaType();\n\n        @JsonIgnore\n        public abstract Schema getContentSchema();\n\n        @JsonIgnore\n        public abstract Schema getPropertyNames();\n\n        @JsonIgnore\n        public abstract Object getUnevaluatedProperties();\n\n        @JsonIgnore\n        public abstract Integer getMaxContains();\n\n        @JsonIgnore\n        public abstract Integer getMinContains();\n\n        @JsonIgnore\n        public abstract Schema getAdditionalItems();\n\n        @JsonIgnore\n        public abstract Schema getUnevaluatedItems();\n\n        @JsonIgnore\n        public abstract Schema getIf();\n\n        @JsonIgnore\n        public abstract Schema getElse();\n\n        @JsonIgnore\n        public abstract Schema getThen();\n\n        @JsonIgnore\n        public abstract Map<String, Schema> getDependentSchemas();\n\n        @JsonIgnore\n        public abstract Map<String, List<String>> getDependentRequired();\n\n        @JsonIgnore\n        public abstract String get$comment();\n\n        @JsonIgnore\n        public abstract List<Object> getExamples();\n\n        @JsonIgnore\n        public abstract Object getConst();\n\n        @JsonIgnore\n        public abstract Boolean getBooleanSchemaValue();\n    }\n\n    @JsonPropertyOrder(value = {\"openapi\", \"info\", \"externalDocs\", \"servers\", \"security\", \"tags\", \"paths\", \"components\", \"webhooks\"}, alphabetic = true)\n    static abstract class SortedOpenAPIMixin31 {\n\n        @JsonAnyGetter\n        @JsonPropertyOrder(alphabetic = true)\n        public abstract Map<String, Object> getExtensions();\n\n        @JsonAnySetter\n        public abstract void addExtension(String name, Object value);\n\n        @JsonSerialize(using = PathsSerializer.class)\n        public abstract Paths getPaths();\n    }\n\n    @JsonPropertyOrder(value = {\"type\", \"format\", \"if\", \"then\", \"else\"}, alphabetic = true)\n    static abstract class SortedSchemaMixin31 {\n\n        @JsonAnyGetter\n        @JsonPropertyOrder(alphabetic = true)\n        public abstract Map<String, Object> getExtensions();\n\n        @JsonIgnore\n        public abstract Map<String, Object> getJsonSchema();\n\n        @JsonIgnore\n        public abstract Boolean getNullable();\n\n        @JsonIgnore\n        public abstract Boolean getExclusiveMinimum();\n\n        @JsonIgnore\n        public abstract Boolean getExclusiveMaximum();\n\n        @JsonProperty(\"exclusiveMinimum\")\n        public abstract BigDecimal getExclusiveMinimumValue();\n\n        @JsonProperty(\"exclusiveMaximum\")\n        public abstract BigDecimal getExclusiveMaximumValue();\n\n        @JsonIgnore\n        public abstract String getType();\n\n        @JsonProperty(\"type\")\n        @JsonSerialize(using = Schema31Mixin.TypeSerializer.class)\n        public abstract Set<String> getTypes();\n\n        @JsonAnySetter\n        public abstract void addExtension(String name, Object value);\n\n        @JsonIgnore\n        public abstract boolean getExampleSetFlag();\n\n        @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)\n        public abstract Object getExample();\n\n        @JsonIgnore\n        public abstract Object getJsonSchemaImpl();\n\n        @JsonIgnore\n        public abstract Boolean getBooleanSchemaValue();\n\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/GenericOpenApiContextBuilder.java",
    "content": "package io.swagger.v3.oas.integration;\n\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport io.swagger.v3.oas.integration.api.OpenApiContextBuilder;\nimport org.apache.commons.lang3.StringUtils;\n\nimport java.util.Set;\n\npublic class GenericOpenApiContextBuilder<T extends GenericOpenApiContextBuilder> implements OpenApiContextBuilder {\n\n    protected String ctxId;\n\n    protected String configLocation;\n    protected Set<String> resourcePackages;\n    protected Set<String> resourceClasses;\n    protected OpenAPIConfiguration openApiConfiguration;\n\n    @Override\n    public OpenApiContext buildContext(boolean init) throws OpenApiConfigurationException {\n        if (StringUtils.isBlank(ctxId)) {\n            ctxId = OpenApiContext.OPENAPI_CONTEXT_ID_DEFAULT;\n        }\n\n        OpenApiContext ctx = OpenApiContextLocator.getInstance().getOpenApiContext(ctxId);\n\n        if (ctx == null) {\n            OpenApiContext rootCtx = OpenApiContextLocator.getInstance().getOpenApiContext(OpenApiContext.OPENAPI_CONTEXT_ID_DEFAULT);\n            ctx = new GenericOpenApiContext()\n                    .openApiConfiguration(openApiConfiguration)\n                    .id(ctxId)\n                    .parent(rootCtx);\n\n            if (ctx.getConfigLocation() == null && configLocation != null) {\n                ((GenericOpenApiContext) ctx).configLocation(configLocation);\n            }\n            if (((GenericOpenApiContext) ctx).getResourcePackages() == null && resourcePackages != null) {\n                ((GenericOpenApiContext) ctx).resourcePackages(resourcePackages);\n            }\n            if (((GenericOpenApiContext) ctx).getResourceClasses() == null && resourceClasses != null) {\n                ((GenericOpenApiContext) ctx).resourceClasses(resourceClasses);\n            }\n            if (init) {\n                ctx.init(); // includes registering itself with OpenApiContextLocator\n            }\n        }\n        return ctx;\n    }\n\n    public String getCtxId() {\n        return ctxId;\n    }\n\n    public void setCtxId(String ctxId) {\n        this.ctxId = ctxId;\n    }\n\n    public String getConfigLocation() {\n        return configLocation;\n    }\n\n    public void setConfigLocation(String configLocation) {\n        this.configLocation = configLocation;\n    }\n\n    public Set<String> getResourcePackages() {\n        return resourcePackages;\n    }\n\n    public void setResourcePackages(Set<String> resourcePackages) {\n        this.resourcePackages = resourcePackages;\n    }\n\n    public OpenAPIConfiguration getOpenApiConfiguration() {\n        return openApiConfiguration;\n    }\n\n    public void setOpenApiConfiguration(OpenAPIConfiguration openApiConfiguration) {\n        this.openApiConfiguration = openApiConfiguration;\n    }\n\n    public T ctxId(String ctxId) {\n        this.ctxId = ctxId;\n        return (T) this;\n    }\n\n    public T configLocation(String configLocation) {\n        this.configLocation = configLocation;\n        return (T) this;\n    }\n\n    public T resourcePackages(Set<String> resourcePackages) {\n        this.resourcePackages = resourcePackages;\n        return (T) this;\n    }\n\n    public T openApiConfiguration(OpenAPIConfiguration openApiConfiguration) {\n        this.openApiConfiguration = openApiConfiguration;\n        return (T) this;\n    }\n\n    public Set<String> getResourceClasses() {\n        return resourceClasses;\n    }\n\n    public void setResourceClasses(Set<String> resourceClasses) {\n        this.resourceClasses = resourceClasses;\n    }\n\n    public T resourceClasses(Set<String> resourceClasses) {\n        this.resourceClasses = resourceClasses;\n        return (T) this;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/GenericOpenApiScanner.java",
    "content": "package io.swagger.v3.oas.integration;\n\nimport io.github.classgraph.ClassGraph;\nimport io.github.classgraph.ScanResult;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.Webhooks;\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiScanner;\nimport org.apache.commons.lang3.StringUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.util.Set;\n\npublic class GenericOpenApiScanner implements OpenApiScanner {\n\n    static final Set<String> ignored = new HashSet<>();\n\n    static {\n        ignored.addAll(IgnoredPackages.ignored);\n    }\n\n    private static Logger LOGGER = LoggerFactory.getLogger(GenericOpenApiScanner.class);\n\n    OpenAPIConfiguration openApiConfiguration;\n\n    @Override\n    public void setConfiguration(OpenAPIConfiguration openApiConfiguration) {\n        this.openApiConfiguration = openApiConfiguration;\n    }\n\n    @Override\n    public Set<Class<?>> classes() {\n        ClassGraph graph = new ClassGraph().enableAllInfo();\n\n        Set<String> acceptablePackages = new HashSet<>();\n\n        Set<Class<?>> output = new HashSet<>();\n\n        boolean allowAllPackages = false;\n\n        // if classes are passed, use them\n        if (openApiConfiguration.getResourceClasses() != null && !openApiConfiguration.getResourceClasses().isEmpty()) {\n            for (String className : openApiConfiguration.getResourceClasses()) {\n                if (!isIgnored(className)) {\n                    try {\n                        output.add(Class.forName(className));\n                    } catch (ClassNotFoundException e) {\n                        LOGGER.warn(\"error loading class from resourceClasses: \" + e.getMessage(), e);\n                    }\n                }\n            }\n            return output;\n        }\n\n        if (openApiConfiguration.getResourcePackages() != null && !openApiConfiguration.getResourcePackages().isEmpty()) {\n            for (String pkg : openApiConfiguration.getResourcePackages()) {\n                if (!isIgnored(pkg)) {\n                    acceptablePackages.add(pkg);\n                    graph.whitelistPackages(pkg);\n                }\n            }\n        } else {\n            allowAllPackages = true;\n        }\n\n        // this is generic, specific Jaxrs scanner will also look for @Path\n        final Set<Class<?>> classes;\n        try (ScanResult scanResult = graph.scan()) {\n            classes = new HashSet<>(scanResult.getClassesWithAnnotation(OpenAPIDefinition.class.getName()).loadClasses());\n            classes.addAll(new HashSet<>(scanResult.getClassesWithAnnotation(Webhooks.class.getName()).loadClasses()));\n        }\n\n\n        for (Class<?> cls : classes) {\n            if (allowAllPackages) {\n                output.add(cls);\n            } else {\n                for (String pkg : acceptablePackages) {\n                    if (cls.getPackage().getName().startsWith(pkg)) {\n                        output.add(cls);\n                    }\n                }\n            }\n        }\n\n        return output;\n    }\n\n    @Override\n    public Map<String, Object> resources() {\n        return new HashMap<>();\n    }\n\n    protected boolean isIgnored(String classOrPackageName) {\n        if (StringUtils.isBlank(classOrPackageName)) {\n            return true;\n        }\n        return ignored.stream().anyMatch(classOrPackageName::startsWith);\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/IgnoredPackages.java",
    "content": "package io.swagger.v3.oas.integration;\n\nimport java.util.HashSet;\nimport java.util.Set;\n\npublic final class IgnoredPackages {\n\n    public static final Set<String> ignored = new HashSet<>();\n\n    static {\n        ignored.add(\"io.swagger.v3.jaxrs2.integration.resources\");\n        ignored.add(\"org.glassfish.jersey\");\n        ignored.add(\"org.jboss.resteasy\");\n        ignored.add(\"com.sun.jersey\");\n        ignored.add(\"com.fasterxml.jackson\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/IntegrationObjectMapperFactory.java",
    "content": "package io.swagger.v3.oas.integration;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.util.ObjectMapperFactory;\n\npublic class IntegrationObjectMapperFactory extends ObjectMapperFactory {\n\n    public static ObjectMapper createJson() {\n        return ObjectMapperFactory.createJson();\n    }\n\n    public static ObjectMapper createJson31() {\n        return ObjectMapperFactory.createJson31();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/OpenApiConfigurationException.java",
    "content": "package io.swagger.v3.oas.integration;\n\npublic class OpenApiConfigurationException extends Exception {\n\n    public OpenApiConfigurationException(String message, Throwable cause) {\n        super(message, cause);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/OpenApiContextLocator.java",
    "content": "package io.swagger.v3.oas.integration;\n\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\n\nimport java.util.concurrent.ConcurrentHashMap;\nimport java.util.concurrent.ConcurrentMap;\n\npublic class OpenApiContextLocator {\n\n    private static OpenApiContextLocator instance;\n\n    private ConcurrentMap<String, OpenApiContext> map = new ConcurrentHashMap<>();\n\n    private OpenApiContextLocator() {\n    }\n\n    public static synchronized OpenApiContextLocator getInstance() {\n        if (instance == null) {\n            instance = new OpenApiContextLocator();\n        }\n        return instance;\n    }\n\n    public OpenApiContext getOpenApiContext(String id) {\n        return map.get(id);\n    }\n\n    public void putOpenApiContext(String id, OpenApiContext openApiContext) {\n        map.put(id, openApiContext);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/ServiceOpenApiConfigurationLoader.java",
    "content": "package io.swagger.v3.oas.integration;\n\nimport io.swagger.v3.oas.integration.api.OpenAPIConfigBuilder;\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiConfigurationLoader;\n\nimport java.io.IOException;\nimport java.util.ServiceLoader;\n\n// doesn't support multiple configs\npublic class ServiceOpenApiConfigurationLoader implements OpenApiConfigurationLoader {\n\n    @Override\n    public OpenAPIConfiguration load(String path) throws IOException {\n\n        ServiceLoader<OpenAPIConfigBuilder> loader = ServiceLoader.load(OpenAPIConfigBuilder.class);\n        if (loader.iterator().hasNext()) {\n            return loader.iterator().next().build();\n        }\n        throw new IOException(\"Error loading OpenAPIConfigBuilder service implementation.\");\n    }\n\n    @Override\n    public boolean exists(String path) {\n\n        try {\n            ServiceLoader<OpenAPIConfigBuilder> loader = ServiceLoader.load(OpenAPIConfigBuilder.class);\n            if (loader.iterator().hasNext()) {\n                loader.iterator().next();\n                return true;\n            }\n            return false;\n        } catch (Exception e) {\n            return false;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/StringOpenApiConfigurationLoader.java",
    "content": "package io.swagger.v3.oas.integration;\n\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiConfigurationLoader;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic interface StringOpenApiConfigurationLoader extends OpenApiConfigurationLoader {\n\n    Logger LOGGER = LoggerFactory.getLogger(StringOpenApiConfigurationLoader.class);\n\n    default OpenAPIConfiguration deserializeConfig(String path, String configAsString) {\n\n        try {\n            if (path.toLowerCase().endsWith(\"json\")) {\n                return Json.mapper().readValue(configAsString, SwaggerConfiguration.class);\n            } else { // assume yaml\n                return Yaml.mapper().readValue(configAsString, SwaggerConfiguration.class);\n            }\n\n        } catch (Exception e) {\n            LOGGER.error(\"exception reading config: \" + e.getMessage(), e);\n            return null;\n        }\n\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/SwaggerConfiguration.java",
    "content": "package io.swagger.v3.oas.integration;\n\nimport io.swagger.v3.core.util.Configuration;\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.Collection;\nimport java.util.Map;\nimport java.util.Set;\n\npublic class SwaggerConfiguration implements OpenAPIConfiguration {\n\n    Map<String, Object> userDefinedOptions;\n    private OpenAPI openAPI;\n\n    private String id;\n    private Set<String> resourcePackages;\n    private Set<String> resourceClasses;\n    private String filterClass;\n    private String readerClass;\n    private String scannerClass;\n\n    private Boolean prettyPrint;\n\n    // read all operations also with no @Operation; set to false to read only methods annotated with @Operation\n    private Boolean readAllResources = Boolean.TRUE;\n\n    private Collection<String> ignoredRoutes;\n    private Long cacheTTL = -1L;\n\n    private Set<String> modelConverterClasses;\n    private String objectMapperProcessorClass;\n\n    private Boolean sortOutput;\n\n    private Boolean alwaysResolveAppPath;\n\n    private Boolean skipResolveAppPath;\n\n    private Boolean openAPI31 = false;\n\n    private Boolean convertToOpenAPI31;\n\n    private Schema.SchemaResolution schemaResolution = Schema.SchemaResolution.DEFAULT;\n\n    private String openAPIVersion;\n\n    private Configuration.GroupsValidationStrategy groupsValidationStrategy = Configuration.GroupsValidationStrategy.DEFAULT;\n\n    private String validatorProcessorClass;\n\n\n    @Override\n    public String getDefaultResponseCode() {\n        return defaultResponseCode;\n    }\n\n    public void setDefaultResponseCode(String defaultResponseCode) {\n        this.defaultResponseCode = defaultResponseCode;\n    }\n\n    public SwaggerConfiguration defaultResponseCode(String defaultResponseCode) {\n        this.defaultResponseCode = defaultResponseCode;\n        return this;\n    }\n\n    private String defaultResponseCode;\n\n    public Long getCacheTTL() {\n        return cacheTTL;\n    }\n\n    public void setCacheTTL(Long cacheTTL) {\n        this.cacheTTL = cacheTTL;\n    }\n\n    public SwaggerConfiguration cacheTTL(Long cacheTTL) {\n        this.cacheTTL = cacheTTL;\n        return this;\n    }\n\n    public Boolean isReadAllResources() {\n        return readAllResources;\n    }\n\n    public void setReadAllResources(Boolean readAllResources) {\n        this.readAllResources = readAllResources;\n    }\n\n    public SwaggerConfiguration readAllResources(Boolean readAllResources) {\n        this.readAllResources = readAllResources;\n        return this;\n    }\n\n    public Collection<String> getIgnoredRoutes() {\n        return ignoredRoutes;\n    }\n\n    public void setIgnoredRoutes(Collection<String> ignoredRoutes) {\n        this.ignoredRoutes = ignoredRoutes;\n    }\n\n    public SwaggerConfiguration ignoredRoutes(Collection<String> ignoredRoutes) {\n        this.ignoredRoutes = ignoredRoutes;\n        return this;\n    }\n\n    public Boolean isPrettyPrint() {\n        return prettyPrint;\n    }\n\n    public void setPrettyPrint(Boolean prettyPrint) {\n        this.prettyPrint = prettyPrint;\n    }\n\n    public SwaggerConfiguration prettyPrint(Boolean prettyPrint) {\n        this.prettyPrint = prettyPrint;\n        return this;\n    }\n\n    @Override\n    public OpenAPI getOpenAPI() {\n        return openAPI;\n    }\n\n    public void setOpenAPI(OpenAPI openAPI) {\n        this.openAPI = openAPI;\n    }\n\n    public SwaggerConfiguration openAPI(OpenAPI openAPI) {\n        this.openAPI = openAPI;\n        return this;\n    }\n\n    public String getReaderClass() {\n        return readerClass;\n    }\n\n    public void setReaderClass(String readerClass) {\n        this.readerClass = readerClass;\n    }\n\n    public String getScannerClass() {\n        return scannerClass;\n    }\n\n    public void setScannerClass(String scannerClass) {\n        this.scannerClass = scannerClass;\n    }\n\n    public Map<String, Object> getUserDefinedOptions() {\n        return userDefinedOptions;\n    }\n\n    public void setUserDefinedOptions(Map<String, Object> userDefinedOptions) {\n        this.userDefinedOptions = userDefinedOptions;\n    }\n\n    public SwaggerConfiguration scannerClass(String scannerClass) {\n        this.scannerClass = scannerClass;\n        return this;\n    }\n\n    public SwaggerConfiguration readerClass(String readerClass) {\n        this.readerClass = readerClass;\n        return this;\n    }\n\n    public SwaggerConfiguration userDefinedOptions(Map<String, Object> userDefinedOptions) {\n        this.userDefinedOptions = userDefinedOptions;\n        return this;\n    }\n\n    @Override\n    public Set<String> getResourcePackages() {\n        return resourcePackages;\n    }\n\n    public void setResourcePackages(Set<String> resourcePackages) {\n        this.resourcePackages = resourcePackages;\n    }\n\n    public SwaggerConfiguration resourcePackages(Set<String> resourcePackages) {\n        this.resourcePackages = resourcePackages;\n        return this;\n    }\n\n    public Set<String> getResourceClasses() {\n        return resourceClasses;\n    }\n\n    public void setResourceClasses(Set<String> resourceClasses) {\n        this.resourceClasses = resourceClasses;\n    }\n\n    public SwaggerConfiguration resourceClasses(Set<String> resourceClasses) {\n        this.resourceClasses = resourceClasses;\n        return this;\n    }\n\n    public String getFilterClass() {\n        return filterClass;\n    }\n\n    public void setFilterClass(String filterClass) {\n        this.filterClass = filterClass;\n    }\n\n    public SwaggerConfiguration filterClass(String filterClass) {\n        this.filterClass = filterClass;\n        return this;\n    }\n\n    public SwaggerConfiguration id(String id) {\n        this.id = id;\n        return this;\n    }\n\n    public String getId() {\n        return id;\n    }\n\n    public void setId(String id) {\n        this.id = id;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public SwaggerConfiguration objectMapperProcessorClass(String objectMapperProcessorClass) {\n        this.objectMapperProcessorClass = objectMapperProcessorClass;\n        return this;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public String getObjectMapperProcessorClass() {\n        return objectMapperProcessorClass;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public void setObjectMapperProcessorClass(String objectMapperProcessorClass) {\n        this.objectMapperProcessorClass = objectMapperProcessorClass;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public Set<String> getModelConverterClasses() {\n        return modelConverterClasses;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public void setModelConverterClassess(Set<String> modelConverterClasses) {\n        this.modelConverterClasses = modelConverterClasses;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public SwaggerConfiguration modelConverterClasses(Set<String> modelConverterClasses) {\n        this.modelConverterClasses = modelConverterClasses;\n        return this;\n    }\n\n    /**\n     * @since 2.1.6\n     */\n    @Override\n    public Boolean isSortOutput() {\n        return sortOutput;\n    }\n\n    /**\n     * @since 2.1.6\n     */\n    public void setSortOutput(Boolean sortOutput) {\n        this.sortOutput = sortOutput;\n    }\n\n    /**\n     * @since 2.1.6\n     */\n    public SwaggerConfiguration sortOutput(Boolean sortOutput) {\n        setSortOutput(sortOutput);\n        return this;\n    }\n\n    /**\n     * @since 2.1.9\n     */\n    @Override\n    public Boolean isAlwaysResolveAppPath() {\n        return alwaysResolveAppPath;\n    }\n\n    /**\n     * @since 2.1.9\n     */\n    public void setAlwaysResolveAppPath(Boolean alwaysResolveAppPath) {\n        this.alwaysResolveAppPath = alwaysResolveAppPath;\n    }\n\n    /**\n     * @since 2.1.9\n     */\n    public SwaggerConfiguration alwaysResolveAppPath(Boolean alwaysResolveAppPath) {\n        setAlwaysResolveAppPath(alwaysResolveAppPath);\n        return this;\n    }\n\n    /**\n     * @since 2.1.15\n     */\n    @Override\n    public Boolean isSkipResolveAppPath() {\n        return skipResolveAppPath;\n    }\n\n    /**\n     * @since 2.1.15\n     */\n    public void setSkipResolveAppPath(Boolean skipResolveAppPath) {\n        this.skipResolveAppPath = skipResolveAppPath;\n    }\n\n    /**\n     * @since 2.1.15\n     */\n    public SwaggerConfiguration skipResolveAppPath(Boolean skipResolveAppPath) {\n        setSkipResolveAppPath(skipResolveAppPath);\n        return this;\n    }\n\n    /**\n     * @since 2.1.9\n     */\n    public Boolean isOpenAPI31() {\n        return openAPI31;\n    }\n\n    /**\n     * @since 2.1.9\n     */\n    public void setOpenAPI31(Boolean openAPI31) {\n        this.openAPI31 = openAPI31;\n    }\n\n    /**\n     * @since 2.1.9\n     */\n    public SwaggerConfiguration openAPI31(Boolean openAPI31) {\n        this.openAPI31 = openAPI31;\n        return this;\n    }\n\n    /**\n     * @since 2.2.12\n     */\n    public Boolean isConvertToOpenAPI31() {\n        return convertToOpenAPI31;\n    }\n\n    /**\n     * @since 2.2.12\n     */\n    public void setConvertToOpenAPI31(Boolean convertToOpenAPI31) {\n        this.convertToOpenAPI31 = convertToOpenAPI31;\n        if (Boolean.TRUE.equals(convertToOpenAPI31)) {\n            this.openAPI31 = true;\n        }\n    }\n\n    /**\n     * @since 2.2.12\n     */\n    public SwaggerConfiguration convertToOpenAPI31(Boolean convertToOpenAPI31) {\n        this.setConvertToOpenAPI31(convertToOpenAPI31);\n        return this;\n    }\n\n    @Override\n    public Schema.SchemaResolution getSchemaResolution() {\n        return schemaResolution;\n    }\n\n    public void setSchemaResolution(Schema.SchemaResolution schemaResolution) {\n        this.schemaResolution = schemaResolution;\n    }\n\n    public SwaggerConfiguration schemaResolution(Schema.SchemaResolution schemaResolution) {\n        this.setSchemaResolution(schemaResolution);\n        return this;\n    }\n\n    /**\n     * @since 2.2.28\n     */\n    @Override\n    public String getOpenAPIVersion() {\n        return openAPIVersion;\n    }\n\n    /**\n     * @since 2.2.28\n     */\n    public void setOpenAPIVersion(String openAPIVersion) {\n        this.openAPIVersion = openAPIVersion;\n    }\n\n    /**\n     * @since 2.2.28\n     */\n    public SwaggerConfiguration openAPIVersion(String openAPIVersion) {\n        this.setOpenAPIVersion(openAPIVersion);\n        return this;\n    }\n\n    /**\n     * @since 2.2.29\n     */\n    @Override\n    public Configuration.GroupsValidationStrategy getGroupsValidationStrategy() {\n        return groupsValidationStrategy;\n    }\n\n    /**\n     * @since 2.2.29\n     */\n    public void setGroupsValidationStrategy(Configuration.GroupsValidationStrategy groupsValidationStrategy) {\n        this.groupsValidationStrategy = groupsValidationStrategy;\n    }\n\n    /**\n     * @since 2.2.29\n     */\n    public SwaggerConfiguration groupsValidationStrategy(Configuration.GroupsValidationStrategy groupsValidationStrategy) {\n        this.groupsValidationStrategy = groupsValidationStrategy;\n        return this;\n    }\n\n    /**\n     * see io.swagger.v3.core.util.ValidatorProcessor\n     *\n     * @since 2.2.29\n     */\n\n    @Override\n    public String getValidatorProcessorClass() {\n        return validatorProcessorClass;\n    }\n\n    /**\n     * @since 2.2.29\n     */\n    public void setValidatorProcessorClass(String validatorProcessorClass) {\n        this.validatorProcessorClass = validatorProcessorClass;\n    }\n\n    /**\n     * @since 2.2.29\n     */\n    public SwaggerConfiguration validatorProcessorClass(String validatorProcessorClass) {\n        this.validatorProcessorClass = validatorProcessorClass;\n        return this;\n    }\n\n    public Configuration toConfiguration() {\n        Configuration configuration = new Configuration();\n\n        configuration.setOpenAPI(getOpenAPI());\n        configuration.setUserDefinedOptions(getUserDefinedOptions());\n        configuration.setModelConverterClasses(getModelConverterClasses());\n        configuration.setObjectMapperProcessorClass(getObjectMapperProcessorClass());\n        configuration.setOpenAPI31(isOpenAPI31());\n        configuration.setSchemaResolution(getSchemaResolution());\n        configuration.setOpenAPIVersion(getOpenAPIVersion());\n        configuration.setGroupsValidationStrategy(getGroupsValidationStrategy());\n        configuration.setValidatorProcessorClass(getValidatorProcessorClass());\n\n        return configuration;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/URLOpenApiConfigurationLoader.java",
    "content": "package io.swagger.v3.oas.integration;\n\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiConfigurationLoader;\n\nimport java.io.IOException;\n\n// TODO\npublic class URLOpenApiConfigurationLoader implements OpenApiConfigurationLoader {\n\n    @Override\n    public OpenAPIConfiguration load(String path) throws IOException {\n        return null;\n    }\n\n    @Override\n    public boolean exists(String path) {\n        return false;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/api/ObjectMapperProcessor.java",
    "content": "package io.swagger.v3.oas.integration.api;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\n\n/**\n * @since 2.0.6\n */\npublic interface ObjectMapperProcessor {\n\n    default void processJsonObjectMapper(ObjectMapper mapper) {};\n\n    /**\n     * @deprecated since 2.0.7, as no-op\n     *\n     */\n    @Deprecated\n    default void processYamlObjectMapper(ObjectMapper mapper) {}\n\n    /**\n     * @since 2.1.6\n     */\n    default void processOutputJsonObjectMapper(ObjectMapper mapper) {}\n\n    /**\n     * @since 2.1.6\n     */\n    default void processOutputYamlObjectMapper(ObjectMapper mapper) {\n        processOutputJsonObjectMapper(mapper);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/api/OpenAPIConfigBuilder.java",
    "content": "package io.swagger.v3.oas.integration.api;\n\npublic interface OpenAPIConfigBuilder {\n    OpenAPIConfiguration build();\n}"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/api/OpenAPIConfiguration.java",
    "content": "package io.swagger.v3.oas.integration.api;\n\nimport io.swagger.v3.core.util.Configuration;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.Collection;\nimport java.util.Map;\nimport java.util.Set;\n\npublic interface OpenAPIConfiguration {\n    Set<String> getResourcePackages();\n\n    Set<String> getResourceClasses();\n\n    String getReaderClass();\n\n    String getScannerClass();\n\n    String getFilterClass();\n\n    Collection<String> getIgnoredRoutes();\n\n    OpenAPI getOpenAPI();\n\n    Map<String, Object> getUserDefinedOptions();\n\n    Boolean isReadAllResources();\n\n    Boolean isPrettyPrint();\n\n    Long getCacheTTL();\n\n    /**\n     * @since 2.0.6\n     */\n    public String getObjectMapperProcessorClass();\n\n    /**\n     * @since 2.0.6\n     */\n    public Set<String> getModelConverterClasses();\n\n    /**\n     * @since 2.1.6\n     */\n    Boolean isSortOutput();\n\n    /**\n     * @since 2.1.9\n     */\n    Boolean isAlwaysResolveAppPath();\n\n    /**\n     * @since 2.1.15\n     */\n    Boolean isSkipResolveAppPath();\n\n    /**\n     * @since 2.2.12\n     */\n    Boolean isOpenAPI31();\n\n    /**\n     * @since 2.2.12\n     */\n    Boolean isConvertToOpenAPI31();\n\n    /**\n     * @since 2.2.17\n     */\n    public String getDefaultResponseCode();\n\n    /**\n     * @since 2.2.24\n     */\n    public Schema.SchemaResolution getSchemaResolution();\n\n    /**\n     * @since 2.2.28\n     */\n    public String getOpenAPIVersion();\n\n    /**\n     * @since 2.2.29\n     */\n    public String getValidatorProcessorClass();\n\n    /**\n     * @since 2.2.29\n     */\n    public Configuration.GroupsValidationStrategy getGroupsValidationStrategy();\n\n    /**\n     * @since 2.2.29\n     */\n    public Configuration toConfiguration();\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/api/OpenApiConfigurationLoader.java",
    "content": "package io.swagger.v3.oas.integration.api;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\n\npublic interface OpenApiConfigurationLoader {\n\n    OpenAPIConfiguration load(String path) throws IOException;\n\n    boolean exists(String path);\n\n    default String readInputStreamToString(InputStream stream) throws IOException {\n        StringBuilder sb = new StringBuilder();\n        try (BufferedReader in = new BufferedReader(\n                new InputStreamReader(stream))) {\n            String inputLine;\n            while ((inputLine = in.readLine()) != null) {\n                sb.append(inputLine).append(\"\\n\");\n            }\n        }\n        return sb.toString();\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/api/OpenApiContext.java",
    "content": "package io.swagger.v3.oas.integration.api;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.oas.integration.OpenApiConfigurationException;\nimport io.swagger.v3.oas.models.OpenAPI;\n\nimport java.util.Set;\n\npublic interface OpenApiContext {\n\n    String OPENAPI_CONTEXT_ID_KEY = \"openapi.context.id\";\n    String OPENAPI_CONTEXT_ID_PREFIX = OPENAPI_CONTEXT_ID_KEY + \".\";\n    String OPENAPI_CONTEXT_ID_DEFAULT = OPENAPI_CONTEXT_ID_PREFIX + \"default\";\n\n    String getId();\n\n    OpenApiContext init() throws OpenApiConfigurationException;\n\n    OpenAPI read();\n\n    OpenAPIConfiguration getOpenApiConfiguration();\n\n    String getConfigLocation();\n\n    OpenApiContext getParent();\n\n    void setOpenApiScanner(OpenApiScanner openApiScanner);\n\n    void setOpenApiReader(OpenApiReader openApiReader);\n\n    /**\n     * @since 2.0.6\n     */\n    void setObjectMapperProcessor(ObjectMapperProcessor objectMapperProcessor);\n\n    /**\n     * @since 2.0.6\n     */\n    void setModelConverters(Set<ModelConverter> modelConverters);\n\n\n    /**\n     * @since 2.1.6\n     */\n    ObjectMapper getOutputJsonMapper();\n\n    /**\n     * @since 2.1.6\n     */\n    ObjectMapper getOutputYamlMapper();\n\n\n    /**\n     * @since 2.1.6\n     */\n    void setOutputJsonMapper(ObjectMapper outputJsonMapper);\n\n    /**\n     * @since 2.1.6\n     */\n    void setOutputYamlMapper(ObjectMapper outputYamlMapper);\n\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/api/OpenApiContextBuilder.java",
    "content": "package io.swagger.v3.oas.integration.api;\n\nimport io.swagger.v3.oas.integration.OpenApiConfigurationException;\n\npublic interface OpenApiContextBuilder {\n\n    OpenApiContext buildContext(boolean init) throws OpenApiConfigurationException;\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/api/OpenApiReader.java",
    "content": "package io.swagger.v3.oas.integration.api;\n\nimport io.swagger.v3.oas.models.OpenAPI;\n\nimport java.util.Map;\nimport java.util.Set;\n\npublic interface OpenApiReader {\n\n    void setConfiguration(OpenAPIConfiguration openApiConfiguration);\n\n    OpenAPI read(Set<Class<?>> classes, Map<String, Object> resources);\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/api/OpenApiScanner.java",
    "content": "package io.swagger.v3.oas.integration.api;\n\nimport java.util.Map;\nimport java.util.Set;\n\npublic interface OpenApiScanner {\n\n    void setConfiguration(OpenAPIConfiguration openApiConfiguration);\n\n    Set<Class<?>> classes();\n\n    Map<String, Object> resources();\n\n}\n"
  },
  {
    "path": "modules/swagger-integration/src/test/java/io/swagger/v3/oas/integration/IntegrationTest.java",
    "content": "package io.swagger.v3.oas.integration;\n\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.info.Info;\nimport org.testng.annotations.Test;\n\nimport java.util.Arrays;\nimport java.util.HashSet;\nimport java.util.Set;\nimport java.util.stream.Collectors;\nimport java.util.stream.Stream;\n\nimport static org.testng.Assert.assertNotNull;\n\npublic class IntegrationTest {\n\n    // TODO after implementation of generic reader and possibly generic scanner if we reintroduce \"api\" or similar annotation\n    private final Set expectedKeys = new HashSet<String>(Arrays.asList(\"/packageA\", \"/packageB\"));\n\n    @Test(description = \"initialize a context and read\")\n    public void shouldInitialize() throws Exception {\n\n        OpenAPIConfiguration config = new SwaggerConfiguration()\n                .resourcePackages(Stream.of(\"com.my.project.resources\", \"org.my.project.resources\").collect(Collectors.toSet()))\n                .openAPI(new OpenAPI().info(new Info().description(\"TEST INFO DESC\")));\n\n        OpenApiContext ctx = new GenericOpenApiContext()\n                .openApiConfiguration(config)\n                .init();\n        OpenAPI openApi = ctx.read();\n\n        assertNotNull(openApi);\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-java17-support/pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>io.swagger.core.v3</groupId>\n        <artifactId>swagger-project</artifactId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../../pom.xml</relativePath>\n    </parent>\n    <artifactId>swagger-java17-support</artifactId>\n    <packaging>jar</packaging>\n    <name>swagger-java17-support</name>\n    <description>Module for Java 17 specific tests</description>\n    <dependencies>\n        <dependency>\n            <groupId>org.testng</groupId>\n            <artifactId>testng</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-core</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-annotations</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-models</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.glassfish.jersey.media</groupId>\n            <artifactId>jersey-media-multipart</artifactId>\n            <version>${jersey2-version}</version>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>javax.annotation</groupId>\n                    <artifactId>javax.annotation-api</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.javassist</groupId>\n                    <artifactId>javassist</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.glassfish.jersey.inject</groupId>\n            <artifactId>jersey-hk2</artifactId>\n            <version>${jersey2-version}</version>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>javax.annotation</groupId>\n                    <artifactId>javax.annotation-api</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.javassist</groupId>\n                    <artifactId>javassist</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <version>3.11.0</version>\n                <configuration>\n                    <release>17</release>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <properties>\n        <maven.compiler.release>17</maven.compiler.release>\n    </properties>\n\n</project>\n"
  },
  {
    "path": "modules/swagger-java17-support/src/test/java/io/swagger/v3/java17/Reader/ReaderTest.java",
    "content": "package io.swagger.v3.java17.Reader;\n\nimport io.swagger.v3.java17.matchers.SerializationMatchers;\nimport io.swagger.v3.java17.resources.JavaRecordWithPathResource;\nimport io.swagger.v3.java17.resources.OtherJavaRecordWithPathsResource;\nimport io.swagger.v3.java17.resources.TestControllerWithRecordResource;\nimport io.swagger.v3.jaxrs2.Reader;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.testng.annotations.Test;\n\nimport java.util.HashSet;\nimport java.util.Set;\n\npublic class ReaderTest {\n\n    @Test\n    public void TestJavaRecordRef(){\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).openAPI31(true));\n\n        OpenAPI openAPI = reader.read(TestControllerWithRecordResource.class);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /v17:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: opsRecordID\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: Successful operation\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: '#/components/schemas/JavaRecordResource'\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    JavaRecordResource:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        test:\\n\" +\n                \"          type: string\\n\" +\n                \"          description: Testing of Java Record Processing\\n\" +\n                \"        isLatest:\\n\" +\n                \"          type: boolean\\n\" +\n                \"        id:\\n\" +\n                \"          type: string\\n\" +\n                \"        age:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n\n    @Test\n    public void TestSetOfRecords(){\n        Set<Class<?>> classes = new HashSet<>();\n        classes.add(JavaRecordWithPathResource.class);\n        classes.add(OtherJavaRecordWithPathsResource.class);\n\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(classes);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /sample/1:\\n\" +\n                \"    post:\\n\" +\n                \"      description: description 1\\n\" +\n                \"      operationId: id 1\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /sample/2:\\n\" +\n                \"    post:\\n\" +\n                \"      description: description 2\\n\" +\n                \"      operationId: id 2\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /sample2:\\n\" +\n                \"    get:\\n\" +\n                \"      description: description\\n\" +\n                \"      operationId: Operation Id\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"      security:\\n\" +\n                \"      - security_key:\\n\" +\n                \"        - write:pets\\n\" +\n                \"        - read:pets\\n\" +\n                \"  /sample2/2:\\n\" +\n                \"    get:\\n\" +\n                \"      description: description 2\\n\" +\n                \"      operationId: Operation Id 2\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"      security:\\n\" +\n                \"      - security_key2:\\n\" +\n                \"        - write:pets\\n\" +\n                \"        - read:pets\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-java17-support/src/test/java/io/swagger/v3/java17/Reader/SchemaResolutionRecordsTest.java",
    "content": "package io.swagger.v3.java17.Reader;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.java17.matchers.SerializationMatchers;\nimport io.swagger.v3.java17.resources.SchemaResolutionWithRecordSimpleResource;\nimport io.swagger.v3.java17.resources.SchemaResolutionWithRecordsResource;\nimport io.swagger.v3.jaxrs2.Reader;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class SchemaResolutionRecordsTest {\n\n    @Test\n    public void testSchemaResolutionInlineWithRecords(){\n        ModelConverters.reset();\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).schemaResolution(Schema.SchemaResolution.INLINE));\n        OpenAPI openAPI = reader.read(SchemaResolutionWithRecordsResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/inlineSchemaFirst:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: inlineSchemaFirst\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: object\\n\" +\n                \"                properties:\\n\" +\n                \"                  property1:\\n\" +\n                \"                    type: object\\n\" +\n                \"                    properties:\\n\" +\n                \"                      bar:\\n\" +\n                \"                        type: string\\n\" +\n                \"                    description: property\\n\" +\n                \"                    example: example\\n\" +\n                \"                  property2:\\n\" +\n                \"                    type: object\\n\" +\n                \"                    properties:\\n\" +\n                \"                      bar:\\n\" +\n                \"                        type: string\\n\" +\n                \"                    description: property\\n\" +\n                \"                    example: example\\n\" +\n                \"  /test/inlineSchemaSecond:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: inlineSchemaSecond\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                foo:\\n\" +\n                \"                  type: string\\n\" +\n                \"                propertySecond1:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    bar:\\n\" +\n                \"                      type: object\\n\" +\n                \"                      properties:\\n\" +\n                \"                        property1:\\n\" +\n                \"                          type: object\\n\" +\n                \"                          properties:\\n\" +\n                \"                            bar:\\n\" +\n                \"                              type: string\\n\" +\n                \"                          description: property 1\\n\" +\n                \"                        property2:\\n\" +\n                \"                          type: object\\n\" +\n                \"                          properties:\\n\" +\n                \"                            bar:\\n\" +\n                \"                              type: string\\n\" +\n                \"                          description: property 2\\n\" +\n                \"                          example: example\\n\" +\n                \"                  description: InlineSchemaSecond property 1\\n\" +\n                \"                  nullable: true\\n\" +\n                \"                  example: exampleSecond\\n\" +\n                \"                property2:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    bar:\\n\" +\n                \"                      type: string\\n\" +\n                \"                  description: InlineSchemaSecond property 2\\n\" +\n                \"                  nullable: true\\n\" +\n                \"                  example: example\\n\" +\n                \"              description: InlineSchemaSecond API\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: object\\n\" +\n                \"                properties:\\n\" +\n                \"                  foo:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  propertySecond1:\\n\" +\n                \"                    type: object\\n\" +\n                \"                    properties:\\n\" +\n                \"                      bar:\\n\" +\n                \"                        type: object\\n\" +\n                \"                        properties:\\n\" +\n                \"                          property1:\\n\" +\n                \"                            type: object\\n\" +\n                \"                            properties:\\n\" +\n                \"                              bar:\\n\" +\n                \"                                type: string\\n\" +\n                \"                            description: property 1\\n\" +\n                \"                          property2:\\n\" +\n                \"                            type: object\\n\" +\n                \"                            properties:\\n\" +\n                \"                              bar:\\n\" +\n                \"                                type: string\\n\" +\n                \"                            description: property 2\\n\" +\n                \"                            example: example\\n\" +\n                \"                    description: InlineSchemaSecond property 1\\n\" +\n                \"                    nullable: true\\n\" +\n                \"                    example: exampleSecond\\n\" +\n                \"                  property2:\\n\" +\n                \"                    type: object\\n\" +\n                \"                    properties:\\n\" +\n                \"                      bar:\\n\" +\n                \"                        type: string\\n\" +\n                \"                    description: InlineSchemaSecond property 2\\n\" +\n                \"                    nullable: true\\n\" +\n                \"                    example: example\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    InlineSchemaPropertyFirst:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: string\\n\" +\n                \"      description: property\\n\" +\n                \"      nullable: true\\n\" +\n                \"      example: example\\n\" +\n                \"    InlineSchemaRecordFirst:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        property1:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            bar:\\n\" +\n                \"              type: string\\n\" +\n                \"          description: property\\n\" +\n                \"          example: example\\n\" +\n                \"        property2:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            bar:\\n\" +\n                \"              type: string\\n\" +\n                \"          description: property\\n\" +\n                \"          example: example\\n\" +\n                \"    InlineSchemaPropertySecond:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            property1:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                bar:\\n\" +\n                \"                  type: string\\n\" +\n                \"              description: property 1\\n\" +\n                \"            property2:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                bar:\\n\" +\n                \"                  type: string\\n\" +\n                \"              description: property 2\\n\" +\n                \"              example: example\\n\" +\n                \"      description: propertySecond\\n\" +\n                \"      nullable: true\\n\" +\n                \"      example: exampleSecond\\n\" +\n                \"    InlineSchemaPropertySimple:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: string\\n\" +\n                \"      description: property\\n\" +\n                \"      example: example\\n\" +\n                \"    InlineSchemaRecordSecond:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        foo:\\n\" +\n                \"          type: string\\n\" +\n                \"        propertySecond1:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            bar:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                property1:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    bar:\\n\" +\n                \"                      type: string\\n\" +\n                \"                  description: property 1\\n\" +\n                \"                property2:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    bar:\\n\" +\n                \"                      type: string\\n\" +\n                \"                  description: property 2\\n\" +\n                \"                  example: example\\n\" +\n                \"          description: InlineSchemaSecond property 1\\n\" +\n                \"          nullable: true\\n\" +\n                \"          example: exampleSecond\\n\" +\n                \"        property2:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            bar:\\n\" +\n                \"              type: string\\n\" +\n                \"          description: InlineSchemaSecond property 2\\n\" +\n                \"          nullable: true\\n\" +\n                \"          example: example\\n\" +\n                \"      description: InlineSchemaSecond API\\n\" +\n                \"    InlineSchemaSimple:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        property1:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            bar:\\n\" +\n                \"              type: string\\n\" +\n                \"          description: property 1\\n\" +\n                \"        property2:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            bar:\\n\" +\n                \"              type: string\\n\" +\n                \"          description: property 2\\n\" +\n                \"          example: example\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test\n    public void testSchemaResolutionAllOfWithRecordTest(){\n        ModelConverters.reset();\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).schemaResolution(Schema.SchemaResolution.ALL_OF));\n        OpenAPI openAPI = reader.read(SchemaResolutionWithRecordSimpleResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/inlineSchemaFirst:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: inlineSchemaFirst\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: InlineSchemaFirst Response API\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: '#/components/schemas/SchemaRecordFirst'\\n\" +\n                \"  /test/inlineSchemaSecond:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: inlineSchemaFirst_1\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              allOf:\\n\" +\n                \"              - description: InlineSchemaSecond API\\n\" +\n                \"              - $ref: '#/components/schemas/SchemaRecordFirst'\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    InlineSchemaPropertyFirst:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: string\\n\" +\n                \"      description: property\\n\" +\n                \"      nullable: true\\n\" +\n                \"      example: example\\n\" +\n                \"    SchemaRecordFirst:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        property1:\\n\" +\n                \"          $ref: '#/components/schemas/InlineSchemaPropertyFirst'\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test\n    public void testSchemaResolutionAllOfRefWithRecordsTest(){\n        ModelConverters.reset();\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).schemaResolution(Schema.SchemaResolution.ALL_OF_REF));\n        OpenAPI openAPI = reader.read(SchemaResolutionWithRecordsResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/inlineSchemaFirst:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: inlineSchemaFirst\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: '#/components/schemas/InlineSchemaRecordFirst'\\n\" +\n                \"  /test/inlineSchemaSecond:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: inlineSchemaSecond\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              description: InlineSchemaSecond API\\n\" +\n                \"              allOf:\\n\" +\n                \"              - $ref: '#/components/schemas/InlineSchemaRecordSecond'\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: '#/components/schemas/InlineSchemaRecordSecond'\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    InlineSchemaPropertyFirst:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: string\\n\" +\n                \"      description: property\\n\" +\n                \"      example: example\\n\" +\n                \"    InlineSchemaRecordFirst:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        property1:\\n\" +\n                \"          $ref: '#/components/schemas/InlineSchemaPropertyFirst'\\n\" +\n                \"        property2:\\n\" +\n                \"          $ref: '#/components/schemas/InlineSchemaPropertyFirst'\\n\" +\n                \"    InlineSchemaPropertySecond:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          $ref: '#/components/schemas/InlineSchemaSimple'\\n\" +\n                \"      description: propertySecond\\n\" +\n                \"      example: exampleSecond\\n\" +\n                \"    InlineSchemaPropertySimple:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: string\\n\" +\n                \"      description: property\\n\" +\n                \"    InlineSchemaRecordSecond:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        foo:\\n\" +\n                \"          type: string\\n\" +\n                \"        propertySecond1:\\n\" +\n                \"          description: InlineSchemaSecond property 1\\n\" +\n                \"          nullable: true\\n\" +\n                \"          allOf:\\n\" +\n                \"          - $ref: '#/components/schemas/InlineSchemaPropertySecond'\\n\" +\n                \"        property2:\\n\" +\n                \"          description: InlineSchemaSecond property 2\\n\" +\n                \"          nullable: true\\n\" +\n                \"          allOf:\\n\" +\n                \"          - $ref: '#/components/schemas/InlineSchemaPropertyFirst'\\n\" +\n                \"    InlineSchemaSimple:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        property1:\\n\" +\n                \"          description: property 1\\n\" +\n                \"          allOf:\\n\" +\n                \"          - $ref: '#/components/schemas/InlineSchemaPropertySimple'\\n\" +\n                \"        property2:\\n\" +\n                \"          description: property 2\\n\" +\n                \"          example: example\\n\" +\n                \"          allOf:\\n\" +\n                \"          - $ref: '#/components/schemas/InlineSchemaPropertySimple'\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-java17-support/src/test/java/io/swagger/v3/java17/matchers/SerializationMatchers.java",
    "content": "package io.swagger.v3.java17.matchers;\n\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.node.NumericNode;\nimport com.fasterxml.jackson.databind.node.ObjectNode;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.core.util.Yaml31;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.io.IOException;\nimport java.util.Comparator;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class SerializationMatchers {\n    private static final Logger LOGGER = LoggerFactory.getLogger(SerializationMatchers.class);\n\n    public static void assertEqualsToYaml(Object objectToSerialize, String yamlStr) {\n        apply(objectToSerialize, yamlStr, Yaml.mapper(), false);\n    }\n\n    public static void assertEqualsToYamlExact(Object objectToSerialize, String yamlStr) {\n        apply(objectToSerialize, yamlStr, Yaml.mapper(), true);\n    }\n\n    public static void assertEqualsToJson(Object objectToSerialize, String jsonStr) {\n        apply(objectToSerialize, jsonStr, Json.mapper(), false);\n    }\n\n    public static void assertEqualsToYaml31(Object objectToSerialize, String yamlStr) {\n        apply31(objectToSerialize, yamlStr, Yaml31.mapper());\n    }\n\n    public static void assertEqualsToJson31(Object objectToSerialize, String jsonStr) {\n        apply31(objectToSerialize, jsonStr, Json31.mapper());\n    }\n\n    private static void apply(Object objectToSerialize, String str, ObjectMapper mapper, boolean exactMatch) {\n        final ObjectNode lhs = mapper.convertValue(objectToSerialize, ObjectNode.class);\n        ObjectNode rhs = null;\n        try {\n            rhs = mapper.readValue(str, ObjectNode.class);\n        } catch (IOException e) {\n            LOGGER.error(\"Failed to read value\", e);\n        }\n        if (exactMatch || !lhs.equals(new ObjectNodeComparator(), rhs)) {\n            assertEquals(Yaml.pretty(lhs), Yaml.pretty(rhs));\n            //fail(String.format(\"Serialized object:\\n%s\\ndoes not equal to expected serialized string:\\n%s\", lhs, rhs));\n        }\n    }\n\n    private static void apply31(Object objectToSerialize, String str, ObjectMapper mapper) {\n        final ObjectNode lhs = mapper.convertValue(objectToSerialize, ObjectNode.class);\n        ObjectNode rhs = null;\n        try {\n            rhs = mapper.readValue(str, ObjectNode.class);\n        } catch (IOException e) {\n            LOGGER.error(\"Failed to read value\", e);\n        }\n        if (!lhs.equals(new ObjectNodeComparator(), rhs)) {\n            assertEquals(Yaml31.pretty(lhs), Yaml31.pretty(rhs));\n        }\n    }\n\n    static final class ObjectNodeComparator implements Comparator<JsonNode> {\n        @Override\n        public int compare(JsonNode o1, JsonNode o2) {\n            if (o1.equals(o2)) {\n                return 0;\n            }\n            if ((o1 instanceof NumericNode) && (o2 instanceof NumericNode)) {\n                double d1 = ((NumericNode) o1).asDouble();\n                double d2 = ((NumericNode) o2).asDouble();\n                return Double.compare(d1, d2);\n            }\n            int comp = o1.asText().compareTo(o2.asText());\n            if (comp == 0) {\n                return Integer.compare(o1.hashCode(), o2.hashCode());\n            }\n            return comp;\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-java17-support/src/test/java/io/swagger/v3/java17/resolving/JavaRecordTest.java",
    "content": "package io.swagger.v3.java17.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.java17.matchers.SerializationMatchers;\nimport org.testng.annotations.Test;\n\nimport javax.validation.constraints.*;\nimport java.util.List;\nimport java.util.Map;\n\npublic class JavaRecordTest {\n\n    @Test\n    public void testJavaRecordWithSchema() {\n        String expectedYaml = \"JavaRecordClassWithSchema:\\n\" +\n                \"  type: object\\n\" +\n                \"  description: Java Record with Schema Test\\n\" +\n                \"  properties:\\n\" +\n                \"    test:\\n\" +\n                \"      type: string\\n\" +\n                \"      description: Testing of Schema on fields processing in Java Records\\n\" +\n                \"    isLatest:\\n\" +\n                \"      type: boolean\";\n\n        Map<String, Schema> stringSchemaMap = ModelConverters.getInstance(false).readAll(JavaRecordClassWithSchema.class);\n        SerializationMatchers.assertEqualsToYaml(stringSchemaMap, expectedYaml);\n    }\n\n    @Test\n    public void testJavaRecordWithBeanValidation() {\n        String expectedYaml = \"JavaRecordClassWithBeanValidation:\\n\" +\n                \"  type: object\\n\" +\n                \"  description: Java Record with Bean Validation Test\\n\" +\n                \"  properties:\\n\" +\n                \"    test:\\n\" +\n                \"      maxLength: 100\\n\" +\n                \"      minLength: 1\\n\" +\n                \"      type: string\\n\" +\n                \"    isLatest:\\n\" +\n                \"      type: boolean\\n\" +\n                \"    randomList:\\n\" +\n                \"      maxItems: 101\\n\" +\n                \"      minItems: 2\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        type: string\\n\" +\n                \"    myField:\\n\" +\n                \"      maximum: 100\\n\" +\n                \"      exclusiveMaximum: false\\n\" +\n                \"      minimum: 1\\n\" +\n                \"      exclusiveMinimum: false\\n\" +\n                \"      type: number\\n\" +\n                \"    email:\\n\" +\n                \"      pattern: (.+?)@(.+?)\\n\" +\n                \"      type: string\";\n\n        Map<String, Schema> stringSchemaMap = ModelConverters.getInstance(false).readAll(JavaRecordClassWithBeanValidation.class);\n        SerializationMatchers.assertEqualsToYaml(stringSchemaMap, expectedYaml);\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"Java Record with Schema Test\")\n    public record JavaRecordClassWithSchema(\n            @io.swagger.v3.oas.annotations.media.Schema(description = \"Testing of Schema on fields processing in Java Records\") String test,\n            boolean isLatest\n    ){\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(description = \"Java Record with Bean Validation Test\")\n    public record JavaRecordClassWithBeanValidation(\n            @Size(min = 1, max = 100) String test,\n            boolean isLatest,\n            @Size(min = 2, max = 101)\n            List<String> randomList,\n            @DecimalMin(\"1\")\n            @DecimalMax(\"100\")\n            Number myField,\n            @Pattern(regexp = \"(.+?)@(.+?)\")\n            String email\n    ){\n    }\n\n    @Test\n    public void testJavaRecordWithBeanValidationSizeTypeUse() {\n        String expectedYaml = \"JavaRecordWithAnnotationsOnGenericType:\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    randomList:\\n\" +\n                \"      maxItems: 10000\\n\" +\n                \"      minItems: 100\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        maxLength: 10\\n\" +\n                \"        minLength: 1\\n\" +\n                \"        type: string\\n\" +\n                \"    secondList:\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        pattern: (.+?)@(.+?)\\n\" +\n                \"        type: string\\n\" +\n                \"    id:\\n\" +\n                \"      type: array\\n\" +\n                \"      items:\\n\" +\n                \"        maximum: 10000\\n\" +\n                \"        minimum: 1\\n\" +\n                \"        type: integer\\n\" +\n                \"        format: int32\";\n\n        Map<String, Schema> stringSchemaMap = ModelConverters.getInstance(false).readAll(JavaRecordWithAnnotationsOnGenericType.class);\n        SerializationMatchers.assertEqualsToYaml(stringSchemaMap, expectedYaml);\n        }\n\n    public record JavaRecordWithAnnotationsOnGenericType(\n            @Size(min = 100, max = 10000)\n            List<@Size(min = 1, max = 10) String> randomList,\n            List<@Pattern(regexp = \"(.+?)@(.+?)\") String> secondList,\n            List<@Min(1)@Max(10000) Integer> id\n    ){\n    }\n\n    @Test\n    public void testJavaRecordWithJsonPropertyAnnotationNotMatchingFieldName() {\n        String expectedYaml = \"JavaRecordWithJsonPropertyAnnotationNotMatchingFieldName:\\n\" +\n            \"  type: object\\n\" +\n            \"  properties:\\n\" +\n            \"    listOfStrings:\\n\" +\n            \"      type: array\\n\" +\n            \"      items:\\n\" +\n            \"        maxLength: 5\\n\" +\n            \"        minLength: 1\\n\" +\n            \"        type: string\";\n\n        Map<String, Schema> stringSchemaMap = ModelConverters.getInstance(false).readAll(JavaRecordWithJsonPropertyAnnotationNotMatchingFieldName.class);\n        SerializationMatchers.assertEqualsToYaml(stringSchemaMap, expectedYaml);\n    }\n\n    public record JavaRecordWithJsonPropertyAnnotationNotMatchingFieldName(\n        @JsonProperty(\"listOfStrings\") List<@Size(min = 1, max = 5)String> stringList\n    ) { }\n\n}\n"
  },
  {
    "path": "modules/swagger-java17-support/src/test/java/io/swagger/v3/java17/resolving/SwaggerTestBase.java",
    "content": "package io.swagger.v3.java17.resolving;\n\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport com.fasterxml.jackson.core.util.DefaultPrettyPrinter;\nimport com.fasterxml.jackson.databind.DeserializationFeature;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.SerializationFeature;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic abstract class SwaggerTestBase {\n    static ObjectMapper mapper;\n    private static final Logger LOGGER = LoggerFactory.getLogger(SwaggerTestBase.class);\n\n    public static ObjectMapper mapper() {\n        if (mapper == null) {\n            mapper = new ObjectMapper();\n            mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);\n            mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);\n            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n        }\n        return mapper;\n    }\n\n    protected ModelResolver modelResolver() {\n        return new ModelResolver(new ObjectMapper());\n    }\n\n    protected void prettyPrint(Object o) {\n        try {\n            LOGGER.debug(mapper().writer(new DefaultPrettyPrinter()).writeValueAsString(o));\n        } catch (Exception e) {\n            LOGGER.error(\"Failed to pretty print object\", e);\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-java17-support/src/test/java/io/swagger/v3/java17/resolving/v31/ModelResolverOAS31Test.java",
    "content": "package io.swagger.v3.java17.resolving.v31;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.java17.resolving.SwaggerTestBase;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\nimport io.swagger.v3.java17.matchers.SerializationMatchers;\nimport java.util.List;\nimport java.util.Map;\n\npublic class ModelResolverOAS31Test extends SwaggerTestBase {\n\n    @Test\n    public void testOAS31JavaRecord() {\n        String expectedYaml = \"JavaRecordWithOAS31Fields:\\n\" +\n                \"  type: object\\n\" +\n                \"  $comment: Random comment at schema level\\n\" +\n                \"  $id: http://yourdomain.com/schemas/myschema.json\\n\" +\n                \"  description: this is model for testing OAS 3.1 Java Record resolving\\n\" +\n                \"  properties:\\n\" +\n                \"    test:\\n\" +\n                \"      type: string\\n\" +\n                \"    isLatest:\\n\" +\n                \"      type: boolean\\n\" +\n                \"    randomList:\\n\" +\n                \"      type: array\\n\" +\n                \"      contains:\\n\" +\n                \"        type: string\\n\" +\n                \"      items:\\n\" +\n                \"        type: string\\n\" +\n                \"      maxContains: 10\\n\" +\n                \"      minContains: 1\\n\" +\n                \"      prefixItems:\\n\" +\n                \"      - type: string\\n\" +\n                \"      unevaluatedItems:\\n\" +\n                \"        type: number\\n\" +\n                \"    Status:\\n\" +\n                \"      type:\\n\" +\n                \"      - string\\n\" +\n                \"      - number\\n\";\n\n        Map<String, Schema> stringSchemaMap = ModelConverters.getInstance(true).readAll(JavaRecordWithOAS31Fields.class);\n        SerializationMatchers.assertEqualsToYaml31(stringSchemaMap, expectedYaml);\n    }\n\n    @io.swagger.v3.oas.annotations.media.Schema(\n            $id = \"http://yourdomain.com/schemas/myschema.json\",\n            description = \"this is model for testing OAS 3.1 Java Record resolving\",\n            $comment = \"Random comment at schema level\",\n            types = \"object\"\n    )\n    private record JavaRecordWithOAS31Fields(\n            String test,\n            boolean isLatest,\n            @ArraySchema(\n                    maxContains = 10,\n                    minContains = 1,\n                    contains = @io.swagger.v3.oas.annotations.media.Schema(\n                            types = \"string\"\n                    ),\n                    unevaluatedItems = @io.swagger.v3.oas.annotations.media.Schema(\n                            types = \"number\"\n                    ),\n                    prefixItems = {\n                            @io.swagger.v3.oas.annotations.media.Schema(\n                                    types = \"string\"\n                            )\n                    }\n            )\n            List<String> randomList,\n            @io.swagger.v3.oas.annotations.media.Schema(types = {\n                    \"string\",\n                    \"number\"\n            })\n            Object Status\n    ){\n    }\n}\n"
  },
  {
    "path": "modules/swagger-java17-support/src/test/java/io/swagger/v3/java17/resources/JavaRecordResource.java",
    "content": "package io.swagger.v3.java17.resources;\n\npublic record JavaRecordResource(\n        @io.swagger.v3.oas.annotations.media.Schema(description = \"Testing of Java Record Processing\") String test,\n        boolean isLatest,\n        String id,\n        Integer age\n) {\n}\n"
  },
  {
    "path": "modules/swagger-java17-support/src/test/java/io/swagger/v3/java17/resources/JavaRecordWithPathResource.java",
    "content": "package io.swagger.v3.java17.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\n@Path(\"sample\")\npublic record JavaRecordWithPathResource() {\n\n    @POST\n    @Path(\"/1\")\n    @Operation(description = \"description 1\", operationId = \"id 1\")\n    public void postExample(){\n\n    }\n\n    @POST\n    @Path(\"/2\")\n    @Operation(description = \"description 2\", operationId = \"id 2\")\n    public void postExample2(){\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-java17-support/src/test/java/io/swagger/v3/java17/resources/OtherJavaRecordWithPathsResource.java",
    "content": "package io.swagger.v3.java17.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.security.*;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@Path(\"sample2\")\npublic record OtherJavaRecordWithPathsResource() {\n    @GET\n    @Path(\"/\")\n    @Operation(operationId = \"Operation Id\",\n            description = \"description\")\n    @SecurityRequirement(name = \"security_key\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    )\n    public void getSecurity() {\n    }\n\n    @GET\n    @Path(\"/2\")\n    @Operation(operationId = \"Operation Id 2\",\n            description = \"description 2\")\n    @SecurityRequirement(name = \"security_key2\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    )\n    public void getSecurity2() {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-java17-support/src/test/java/io/swagger/v3/java17/resources/SchemaResolutionWithRecordSimpleResource.java",
    "content": "package io.swagger.v3.java17.resources;\n\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n@Path(\"test\")\npublic class SchemaResolutionWithRecordSimpleResource{\n\n\n    @GET\n    @Path(\"/inlineSchemaFirst\")\n    @ApiResponse(description = \"InlineSchemaFirst Response API\", content = @Content(schema = @Schema(implementation = SchemaRecordFirst.class)))\n    public Response inlineSchemaFirst() {\n        return null;\n    }\n\n\n    @GET\n    @Path(\"/inlineSchemaSecond\")\n    public void inlineSchemaFirst(@Schema(description = \"InlineSchemaSecond API\") SchemaRecordFirst inlineSchemaFirst) {\n    }\n\n\n\n    public record SchemaRecordFirst (\n            @Schema(description = \"InlineSchemaFirst property 1\", nullable = true) InlineSchemaPropertyFirst property1\n    ){\n    }\n\n    @Schema(description = \"property\", example = \"example\")\n    static class InlineSchemaPropertyFirst {\n        public String bar;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-java17-support/src/test/java/io/swagger/v3/java17/resources/SchemaResolutionWithRecordsResource.java",
    "content": "package io.swagger.v3.java17.resources;\n\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@Path(\"test\")\npublic class SchemaResolutionWithRecordsResource {\n\n    @GET\n    @Path(\"/inlineSchemaSecond\")\n    public InlineSchemaRecordSecond inlineSchemaSecond(@Schema(description = \"InlineSchemaSecond API\") InlineSchemaRecordSecond inlineSchemaSecond) {\n        return null;\n    }\n\n    @GET\n    @Path(\"/inlineSchemaFirst\")\n    public InlineSchemaRecordFirst inlineSchemaFirst() {\n        return null;\n    }\n\n\n    public record InlineSchemaRecordFirst(\n            InlineSchemaPropertyFirst property1,\n            InlineSchemaPropertyFirst property2\n    ){\n    }\n\n    public record InlineSchemaRecordSecond (\n            String foo,\n            @Schema(description = \"InlineSchemaSecond property 1\", nullable = true)\n            InlineSchemaPropertySecond propertySecond1,\n            @Schema(description = \"InlineSchemaSecond property 2\", nullable = true)\n            InlineSchemaPropertyFirst property2\n    ){\n    }\n\n    @Schema(description = \"property\", example = \"example\")\n    static class InlineSchemaPropertyFirst {\n        public String bar;\n    }\n\n    @Schema(description = \"propertySecond\", example = \"exampleSecond\")\n    static class InlineSchemaPropertySecond {\n        public InlineSchemaSimple bar;\n    }\n\n    static class InlineSchemaSimple {\n\n        @Schema(description = \"property 1\")\n        public InlineSchemaPropertySimple property1;\n\n\n        private InlineSchemaPropertySimple property2;\n\n        @Schema(description = \"property 2\", example = \"example\")\n        public InlineSchemaPropertySimple getProperty2() {\n            return null;\n        }\n    }\n\n    @Schema(description = \"property\")\n    static class InlineSchemaPropertySimple {\n        public String bar;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-java17-support/src/test/java/io/swagger/v3/java17/resources/TestControllerWithRecordResource.java",
    "content": "package io.swagger.v3.java17.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\n@Path(\"/v17\")\npublic class TestControllerWithRecordResource {\n\n    @POST\n    @Operation(\n            operationId = \"opsRecordID\",\n            responses = @ApiResponse(description = \"Successful operation\",\n                    content = @Content(mediaType = \"application/json\",schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = JavaRecordResource.class))\n            )\n    )\n    @Consumes({\"application/json\", \"application/xml\"})\n    public void postRecord(){}\n\n}\n\n"
  },
  {
    "path": "modules/swagger-jaxrs2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <artifactId>swagger-project</artifactId>\n        <groupId>io.swagger.core.v3</groupId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../../</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-jaxrs2</artifactId>\n    <name>swagger-jaxrs2</name>\n    <description>swagger-jaxrs2</description>\n    <build>\n        <sourceDirectory>src/main/java</sourceDirectory>\n        <defaultGoal>install</defaultGoal>\n        <testResources>\n            <testResource>\n                <directory>src/test/resources</directory>\n            </testResource>\n        </testResources>\n        <plugins>\n            <plugin>\n                <groupId>biz.aQute.bnd</groupId>\n                <artifactId>bnd-maven-plugin</artifactId>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <configuration>\n                    <archive>\n                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>\n                        <manifestEntries>\n                            <Automatic-Module-Name>io.swagger.v3.jaxrs2</Automatic-Module-Name>\n                        </manifestEntries>\n                    </archive>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>build-helper-maven-plugin</artifactId>\n                <version>3.5.0</version>\n                <configuration>\n                    <portNames>\n                        <portName>jetty.port</portName>\n                        <portName>jetty.port.stop</portName>\n                    </portNames>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>reserve-port</id>\n                        <phase>pre-integration-test</phase>\n                        <goals>\n                            <goal>reserve-network-port</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.eclipse.jetty</groupId>\n                <artifactId>jetty-maven-plugin</artifactId>\n                <configuration>\n                    <scanIntervalSeconds>10</scanIntervalSeconds>\n                    <httpConnector><port>${jetty.port}</port></httpConnector>\n                    <stopKey>a</stopKey>\n                    <stopPort>${jetty.port.stop}</stopPort>\n                    <supportedPackagings>\n                        <supportedPackaging>jar</supportedPackaging>\n                    </supportedPackagings>\n                    <useTestScope>true</useTestScope>\n                    <webAppSourceDirectory>${project.basedir}/src/test/webapp</webAppSourceDirectory>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>start-jetty</id>\n                        <phase>pre-integration-test</phase>\n                        <goals>\n                            <goal>start</goal>\n                        </goals>\n                        <configuration>\n                            <scanIntervalSeconds>0</scanIntervalSeconds>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>stop-jetty</id>\n                        <phase>post-integration-test</phase>\n                        <goals>\n                            <goal>stop</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-surefire-plugin</artifactId>\n                <version>${surefire-version}</version>\n                <configuration>\n                    <argLine>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 --add-opens java.base/java.lang=ALL-UNNAMED</argLine>\n                    <forkCount>0</forkCount>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-failsafe-plugin</artifactId>\n                <version>${failsafe-plugin-version}</version>\n                <configuration>\n                    <argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>\n                </configuration>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>integration-test</goal>\n                            <goal>verify</goal>\n                        </goals>\n                        <configuration>\n                            <systemPropertyVariables>\n                                <jetty.port>${jetty.port}</jetty.port>\n                            </systemPropertyVariables>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>jakarta.ws.rs</groupId>\n            <artifactId>jakarta.ws.rs-api</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>jakarta.servlet</groupId>\n            <artifactId>jakarta.servlet-api</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-classic</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-core</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.core</groupId>\n            <artifactId>jackson-databind</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>io.github.classgraph</groupId>\n            <artifactId>classgraph</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.javassist</groupId>\n            <artifactId>javassist</artifactId>\n            <version>3.30.2-GA</version>\n        </dependency>\n        <dependency>\n            <groupId>commons-io</groupId>\n            <artifactId>commons-io</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-models</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.yaml</groupId>\n            <artifactId>snakeyaml</artifactId>\n            <version>${snakeyaml-version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-annotations</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-integration</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.testng</groupId>\n            <artifactId>testng</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.httpcomponents</groupId>\n            <artifactId>httpmime</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>io.rest-assured</groupId>\n            <artifactId>rest-assured</artifactId>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>javax.xml.bind</groupId>\n                    <artifactId>jaxb-api</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.apache.httpcomponents</groupId>\n                    <artifactId>httpmime</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.mockito</groupId>\n            <artifactId>mockito-core</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.jboss.weld</groupId>\n            <artifactId>weld-core-impl</artifactId>\n            <version>3.1.9.Final</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.jboss.arquillian.testng</groupId>\n            <artifactId>arquillian-testng-container</artifactId>\n            <version>1.9.3.Final</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.jboss.arquillian.container</groupId>\n            <artifactId>arquillian-weld-embedded</artifactId>\n            <version>2.1.0.Final</version>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.jboss.arquillian.container</groupId>\n                    <artifactId>arquillian-container-spi</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.jboss.arquillian.container</groupId>\n                    <artifactId>arquillian-container-test-spi</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.jboss.arquillian.test</groupId>\n                    <artifactId>arquillian-test-spi</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.glassfish.jersey.containers</groupId>\n            <artifactId>jersey-container-servlet</artifactId>\n            <version>${jersey2-version}</version>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>javax.annotation</groupId>\n                    <artifactId>javax.annotation-api</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.javassist</groupId>\n                    <artifactId>javassist</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.glassfish.jersey.media</groupId>\n            <artifactId>jersey-media-multipart</artifactId>\n            <version>${jersey2-version}</version>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>javax.annotation</groupId>\n                    <artifactId>javax.annotation-api</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.javassist</groupId>\n                    <artifactId>javassist</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.glassfish.jersey.inject</groupId>\n            <artifactId>jersey-hk2</artifactId>\n            <version>${jersey2-version}</version>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>javax.annotation</groupId>\n                    <artifactId>javax.annotation-api</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.javassist</groupId>\n                    <artifactId>javassist</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.jaxrs</groupId>\n            <artifactId>jackson-jaxrs-json-provider</artifactId>\n            <version>${jackson-version}</version>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/DefaultParameterExtension.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport com.fasterxml.jackson.annotation.JsonView;\nimport com.fasterxml.jackson.databind.BeanDescription;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.introspect.AnnotatedField;\nimport com.fasterxml.jackson.databind.introspect.AnnotatedMethod;\nimport com.fasterxml.jackson.databind.introspect.AnnotationMap;\nimport com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition;\n\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.ParameterProcessor;\nimport io.swagger.v3.jaxrs2.ext.AbstractOpenAPIExtension;\nimport io.swagger.v3.jaxrs2.ext.OpenAPIExtension;\nimport io.swagger.v3.jaxrs2.ext.OpenAPIExtensions;\nimport io.swagger.v3.oas.annotations.Hidden;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport org.apache.commons.lang3.StringUtils;\n\nimport javax.ws.rs.BeanParam;\nimport javax.ws.rs.CookieParam;\nimport javax.ws.rs.HeaderParam;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.MatrixParam;\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Type;\nimport java.util.ArrayList;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Set;\n\npublic class DefaultParameterExtension extends AbstractOpenAPIExtension {\n    private static final String QUERY_PARAM = \"query\";\n    private static final String HEADER_PARAM = \"header\";\n    private static final String COOKIE_PARAM = \"cookie\";\n    private static final String PATH_PARAM = \"path\";\n\n    final ObjectMapper mapper = Json.mapper();\n\n    @Override\n    public ResolvedParameter extractParameters(List<Annotation> annotations,\n                                               Type type,\n                                               Set<Type> typesToSkip,\n                                               Components components,\n                                               javax.ws.rs.Consumes classConsumes,\n                                               javax.ws.rs.Consumes methodConsumes,\n                                               boolean includeRequestBody,\n                                               JsonView jsonViewAnnotation,\n                                               Iterator<OpenAPIExtension> chain) {\n        if (shouldIgnoreType(type, typesToSkip)) {\n            return new ResolvedParameter();\n        }\n\n\n        Parameter parameter = null;\n        for (Annotation annotation : annotations) {\n            if (annotation instanceof QueryParam) {\n                QueryParam param = (QueryParam) annotation;\n                Parameter qp = new Parameter();\n                qp.setIn(QUERY_PARAM);\n                qp.setName(param.value());\n                parameter = qp;\n            } else if (annotation instanceof PathParam) {\n                PathParam param = (PathParam) annotation;\n                Parameter pp = new Parameter();\n                pp.setIn(PATH_PARAM);\n                pp.setName(param.value());\n                parameter = pp;\n            } else if (annotation instanceof MatrixParam) {\n                MatrixParam param = (MatrixParam) annotation;\n                Parameter pp = new Parameter();\n                pp.setIn(PATH_PARAM);\n                pp.setStyle(Parameter.StyleEnum.MATRIX);\n                pp.setName(param.value());\n                parameter = pp;\n            } else if (annotation instanceof HeaderParam) {\n                HeaderParam param = (HeaderParam) annotation;\n                Parameter pp = new Parameter();\n                pp.setIn(HEADER_PARAM);\n                pp.setName(param.value());\n                parameter = pp;\n            } else if (annotation instanceof CookieParam) {\n                CookieParam param = (CookieParam) annotation;\n                Parameter pp = new Parameter();\n                pp.setIn(COOKIE_PARAM);\n                pp.setName(param.value());\n                parameter = pp;\n            } else if (annotation instanceof io.swagger.v3.oas.annotations.Parameter) {\n                if (((io.swagger.v3.oas.annotations.Parameter) annotation).hidden()) {\n                    return new ResolvedParameter();\n                }\n                if (parameter == null) {\n                    parameter = new Parameter();\n                }\n                if (StringUtils.isNotBlank(((io.swagger.v3.oas.annotations.Parameter) annotation).ref())) {\n                    parameter.$ref(((io.swagger.v3.oas.annotations.Parameter) annotation).ref());\n                }\n            } else {\n                List<Parameter> formParameters = new ArrayList<>();\n                List<Parameter> parameters = new ArrayList<>();\n                if (handleAdditionalAnnotation(parameters, formParameters, annotation, type, typesToSkip, classConsumes, methodConsumes, components, includeRequestBody, jsonViewAnnotation)) {\n                    ResolvedParameter extractParametersResult = new ResolvedParameter();\n                    extractParametersResult.parameters.addAll(parameters);\n                    extractParametersResult.formParameters.addAll(formParameters);\n                    return extractParametersResult;\n                }\n            }\n        }\n        List<Parameter> parameters = new ArrayList<>();\n        ResolvedParameter extractParametersResult = new ResolvedParameter();\n\n        if (parameter != null && (StringUtils.isNotBlank(parameter.getIn()) || StringUtils.isNotBlank(parameter.get$ref()))) {\n            parameters.add(parameter);\n        } else if (includeRequestBody) {\n            Parameter unknownParameter = ParameterProcessor.applyAnnotations(\n                    null,\n                    type,\n                    annotations,\n                    components,\n                    classConsumes == null ? new String[0] : classConsumes.value(),\n                    methodConsumes == null ? new String[0] : methodConsumes.value(), jsonViewAnnotation, configuration);\n            if (unknownParameter != null) {\n                if (StringUtils.isNotBlank(unknownParameter.getIn()) && !\"form\".equals(unknownParameter.getIn())) {\n                    extractParametersResult.parameters.add(unknownParameter);\n                } else if (\"form\".equals(unknownParameter.getIn())) {\n                    unknownParameter.setIn(null);\n                    extractParametersResult.formParameters.add(unknownParameter);\n                } else {            // return as request body\n                    extractParametersResult.requestBody = unknownParameter;\n                }\n            }\n        }\n        for (Parameter p : parameters) {\n            Parameter processedParameter = ParameterProcessor.applyAnnotations(\n                    p,\n                    type,\n                    annotations,\n                    components,\n                    classConsumes == null ? new String[0] : classConsumes.value(),\n                    methodConsumes == null ? new String[0] : methodConsumes.value(),\n                    jsonViewAnnotation,\n                    openapi31,\n                    this.schemaResolution);\n            if (processedParameter != null) {\n                extractParametersResult.parameters.add(processedParameter);\n            }\n        }\n        return extractParametersResult;\n    }\n\n    /**\n     * Adds additional annotation processing support\n     *\n     * @param parameters\n     * @param annotation\n     * @param type\n     * @param typesToSkip\n     */\n\n    private boolean handleAdditionalAnnotation(List<Parameter> parameters, List<Parameter> formParameters, Annotation annotation,\n                                               final Type type, Set<Type> typesToSkip, javax.ws.rs.Consumes classConsumes,\n                                               javax.ws.rs.Consumes methodConsumes, Components components, boolean includeRequestBody, JsonView jsonViewAnnotation) {\n        boolean processed = false;\n        if (BeanParam.class.isAssignableFrom(annotation.getClass())) {\n            // Use Jackson's logic for processing Beans\n            final BeanDescription beanDesc = mapper.getSerializationConfig().introspect(constructType(type));\n            final List<BeanPropertyDefinition> properties = beanDesc.findProperties();\n\n            for (final BeanPropertyDefinition propDef : properties) {\n                final AnnotatedField field = propDef.getField();\n                final AnnotatedMethod setter = propDef.getSetter();\n                final AnnotatedMethod getter = propDef.getGetter();\n                final List<Annotation> paramAnnotations = new ArrayList<>();\n                final Iterator<OpenAPIExtension> extensions = OpenAPIExtensions.chain();\n                Type paramType = null;\n\n                // Gather the field's details\n                if (field != null) {\n                    paramType = field.getType();\n                    AnnotationMap annotationMap = field.getAllAnnotations();\n                    if (annotationMap != null) {\n                        for (final Annotation fieldAnnotation : annotationMap.annotations()) {\n                            if (!paramAnnotations.contains(fieldAnnotation)) {\n                                paramAnnotations.add(fieldAnnotation);\n                            }\n                        }\n                    }\n                }\n\n                // Gather the setter's details but only the ones we need\n                if (setter != null) {\n                    // Do not set the param class/type from the setter if the values are already identified\n                    if (paramType == null) {\n                        // paramType will stay null if there is no parameter\n                        paramType = setter.getParameterType(0);\n                    }\n                    AnnotationMap annotationMap = setter.getAllAnnotations();\n                    if (annotationMap != null) {\n                        for (final Annotation fieldAnnotation : annotationMap.annotations()) {\n                            if (!paramAnnotations.contains(fieldAnnotation)) {\n                                paramAnnotations.add(fieldAnnotation);\n                            }\n                        }\n                    }\n                }\n\n                // Gather the getter's details but only the ones we need\n                if (getter != null) {\n                    // Do not set the param class/type from the getter if the values are already identified\n                    if (paramType == null) {\n                        paramType = getter.getType();\n                    }\n                    AnnotationMap annotationMap = getter.getAllAnnotations();\n                    if (annotationMap != null) {\n                        for (final Annotation fieldAnnotation : annotationMap.annotations()) {\n                            if (!paramAnnotations.contains(fieldAnnotation)) {\n                                paramAnnotations.add(fieldAnnotation);\n                            }\n                        }\n                    }\n                }\n\n                if (paramType == null) {\n                    continue;\n                }\n\n                // skip hidden properties\n                boolean hidden  = false;\n                for (Annotation a : paramAnnotations) {\n                    if (a instanceof io.swagger.v3.oas.annotations.media.Schema) {\n                        if (((io.swagger.v3.oas.annotations.media.Schema) a).hidden()) {\n                            hidden = true;\n                            break;\n                        };\n                    } else if (a instanceof Hidden) {\n                        hidden = true;\n                        break;\n                    }\n                }\n                if (hidden) {\n                    continue;\n                }\n                // Re-process all Bean fields and let the default swagger-jaxrs/swagger-jersey-jaxrs processors do their thing\n                ResolvedParameter resolvedParameter = extensions.next().extractParameters(\n                        paramAnnotations,\n                        paramType,\n                        typesToSkip,\n                        components,\n                        classConsumes,\n                        methodConsumes,\n                        includeRequestBody,\n                        jsonViewAnnotation,\n                        extensions);\n\n                List<Parameter> extractedParameters =\n                        resolvedParameter.parameters;\n\n                for (Parameter p : extractedParameters) {\n                    if (p != null) {\n                        parameters.add(p);\n                    }\n                }\n\n                List<Parameter> extractedFormParameters =\n                        resolvedParameter.formParameters;\n\n                for (Parameter p : extractedFormParameters) {\n                    if (p != null) {\n                        formParameters.add(p);\n                    }\n                }\n\n                processed = true;\n            }\n        }\n        return processed;\n    }\n\n    @Override\n    protected boolean shouldIgnoreClass(Class<?> cls) {\n        return cls.getName().startsWith(\"javax.ws.rs.\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/OperationParser.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport com.fasterxml.jackson.annotation.JsonView;\nimport io.swagger.v3.core.util.AnnotationsUtils;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.links.Link;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport org.apache.commons.lang3.StringUtils;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.Produces;\nimport java.util.Map;\nimport java.util.Optional;\n\npublic class OperationParser {\n\n    public static final String COMPONENTS_REF = Components.COMPONENTS_SCHEMAS_REF;\n\n    public static Optional<RequestBody> getRequestBody(io.swagger.v3.oas.annotations.parameters.RequestBody requestBody, Consumes classConsumes, Consumes methodConsumes, Components components, JsonView jsonViewAnnotation) {\n        return getRequestBody(requestBody, classConsumes, methodConsumes, components, jsonViewAnnotation, false);\n    }\n    public static Optional<RequestBody> getRequestBody(io.swagger.v3.oas.annotations.parameters.RequestBody requestBody, Consumes classConsumes, Consumes methodConsumes, Components components, JsonView jsonViewAnnotation, boolean openapi31) {\n        if (requestBody == null) {\n            return Optional.empty();\n        }\n        RequestBody requestBodyObject = new RequestBody();\n        boolean isEmpty = true;\n\n        if (StringUtils.isNotBlank(requestBody.ref())) {\n            requestBodyObject.set$ref(requestBody.ref());\n            return Optional.of(requestBodyObject);\n        }\n\n        if (StringUtils.isNotBlank(requestBody.description())) {\n            requestBodyObject.setDescription(requestBody.description());\n            isEmpty = false;\n        }\n        if (requestBody.required()) {\n            requestBodyObject.setRequired(requestBody.required());\n            isEmpty = false;\n        }\n        if (requestBody.extensions().length > 0) {\n            Map<String, Object> extensions = AnnotationsUtils.getExtensions(openapi31, requestBody.extensions());\n            if (extensions != null) {\n                extensions.forEach(requestBodyObject::addExtension);\n            }\n            isEmpty = false;\n        }\n\n        if (requestBody.content().length > 0) {\n            isEmpty = false;\n        }\n\n        if (isEmpty) {\n            return Optional.empty();\n        }\n        AnnotationsUtils.getContent(requestBody.content(), classConsumes == null ? new String[0] : classConsumes.value(),\n                methodConsumes == null ? new String[0] : methodConsumes.value(), null, components, jsonViewAnnotation, openapi31).ifPresent(requestBodyObject::setContent);\n        return Optional.of(requestBodyObject);\n    }\n\n    public static Optional<ApiResponses> getApiResponses(final io.swagger.v3.oas.annotations.responses.ApiResponse[] responses, Produces classProduces, Produces methodProduces, Components components, JsonView jsonViewAnnotation) {\n        return getApiResponses(responses, classProduces, methodProduces, components, jsonViewAnnotation, false, ApiResponses.DEFAULT);\n    }\n\n    public static Optional<ApiResponses> getApiResponses(final io.swagger.v3.oas.annotations.responses.ApiResponse[] responses, Produces classProduces, Produces methodProduces, Components components, JsonView jsonViewAnnotation, boolean openapi31, String defaultResponseKey) {\n        if (responses == null) {\n            return Optional.empty();\n        }\n        ApiResponses apiResponsesObject = new ApiResponses();\n        for (io.swagger.v3.oas.annotations.responses.ApiResponse response : responses) {\n            ApiResponse apiResponseObject = new ApiResponse();\n            if (StringUtils.isNotBlank(response.ref())) {\n                apiResponseObject.set$ref(response.ref());\n                if (StringUtils.isNotBlank(response.responseCode())) {\n                    apiResponsesObject.addApiResponse(response.responseCode(), apiResponseObject);\n                } else {\n                    apiResponsesObject._default(apiResponseObject);\n                }\n                continue;\n            }\n            if (StringUtils.isNotBlank(response.description())) {\n                apiResponseObject.setDescription(response.description());\n            }\n            if (response.extensions().length > 0) {\n                Map<String, Object> extensions = AnnotationsUtils.getExtensions(openapi31, response.extensions());\n                if (extensions != null) {\n                    extensions.forEach(apiResponseObject::addExtension);\n                }\n            }\n\n            AnnotationsUtils.getContent(response.content(), classProduces == null ? new String[0] : classProduces.value(),\n                    methodProduces == null ? new String[0] : methodProduces.value(), null, components, jsonViewAnnotation, openapi31).ifPresent(apiResponseObject::content);\n            AnnotationsUtils.getHeaders(response.headers(), components, jsonViewAnnotation).ifPresent(apiResponseObject::headers);\n            if (StringUtils.isNotBlank(apiResponseObject.getDescription()) || apiResponseObject.getContent() != null || apiResponseObject.getHeaders() != null) {\n\n                Map<String, Link> links = AnnotationsUtils.getLinks(response.links());\n                if (links.size() > 0) {\n                    apiResponseObject.setLinks(links);\n                }\n                if (StringUtils.isNotBlank(response.responseCode())) {\n                    apiResponsesObject.addApiResponse(response.responseCode(), apiResponseObject);\n                } else {\n                    apiResponsesObject.addApiResponse(defaultResponseKey, apiResponseObject);\n                }\n            }\n        }\n\n        if (apiResponsesObject.isEmpty()) {\n            return Optional.empty();\n        }\n        return Optional.of(apiResponsesObject);\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/Reader.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport com.fasterxml.jackson.annotation.JsonView;\nimport com.fasterxml.jackson.databind.BeanDescription;\nimport com.fasterxml.jackson.databind.JavaType;\nimport com.fasterxml.jackson.databind.introspect.AnnotatedMethod;\nimport com.fasterxml.jackson.databind.introspect.AnnotatedParameter;\nimport com.fasterxml.jackson.databind.type.TypeFactory;\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.converter.ResolvedSchema;\nimport io.swagger.v3.core.util.AnnotationsUtils;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.core.util.KotlinDetector;\nimport io.swagger.v3.core.util.ParameterProcessor;\nimport io.swagger.v3.core.util.PathUtils;\nimport io.swagger.v3.core.util.ReflectionUtils;\nimport io.swagger.v3.jaxrs2.ext.OpenAPIExtension;\nimport io.swagger.v3.jaxrs2.ext.OpenAPIExtensions;\nimport io.swagger.v3.jaxrs2.util.ReaderUtils;\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.Hidden;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.servers.Server;\nimport io.swagger.v3.oas.integration.ContextUtils;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiReader;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.Paths;\nimport io.swagger.v3.oas.models.callbacks.Callback;\nimport io.swagger.v3.oas.models.media.Content;\nimport io.swagger.v3.oas.models.media.Encoding;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.media.ObjectSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.security.SecurityRequirement;\nimport io.swagger.v3.oas.models.security.SecurityScheme;\nimport io.swagger.v3.oas.models.tags.Tag;\nimport org.apache.commons.lang3.StringUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport javax.ws.rs.ApplicationPath;\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.Application;\nimport java.io.IOException;\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Method;\nimport java.lang.reflect.ParameterizedType;\nimport java.lang.reflect.Type;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Comparator;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Iterator;\nimport java.util.LinkedHashMap;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.Set;\nimport java.util.TreeSet;\nimport java.util.concurrent.CompletionStage;\nimport java.util.stream.Collectors;\n\npublic class Reader implements OpenApiReader {\n    private static final Logger LOGGER = LoggerFactory.getLogger(Reader.class);\n\n    public static final String DEFAULT_MEDIA_TYPE_VALUE = \"*/*\";\n    public static final String DEFAULT_DESCRIPTION = \"default response\";\n\n    protected OpenAPIConfiguration config;\n\n    private Application application;\n    private OpenAPI openAPI;\n    private Components components;\n    private Paths paths;\n    private Set<Tag> openApiTags;\n\n    private String defaultResponseKey = ApiResponses.DEFAULT;\n\n    private static final String GET_METHOD = \"get\";\n    private static final String POST_METHOD = \"post\";\n    private static final String PUT_METHOD = \"put\";\n    private static final String DELETE_METHOD = \"delete\";\n    private static final String PATCH_METHOD = \"patch\";\n    private static final String TRACE_METHOD = \"trace\";\n    private static final String HEAD_METHOD = \"head\";\n    private static final String OPTIONS_METHOD = \"options\";\n\n    public Reader() {\n        this(new OpenAPI(), new Paths(), new LinkedHashSet<>(), new Components());\n    }\n\n    public Reader(OpenAPI openAPI) {\n        this(openAPI, new Paths(), new LinkedHashSet<>(), new Components());\n    }\n\n    public Reader(OpenAPIConfiguration openApiConfiguration) {\n        this(new OpenAPI(), new Paths(), new LinkedHashSet<>(), new Components(), openApiConfiguration);\n    }\n\n    protected Reader(OpenAPI openAPI, Paths paths, Set<Tag> openApiTags, Components components) {\n        this(openAPI, paths, openApiTags, components, new SwaggerConfiguration().openAPI(openAPI));\n    }\n\n    protected Reader(OpenAPI openAPI, Paths paths, Set<Tag> openApiTags, Components components, OpenAPIConfiguration openApiConfiguration) {\n        this.openAPI = openAPI;\n        this.paths = paths;\n        this.openApiTags = openApiTags;\n        this.components = components;\n        setConfiguration(openApiConfiguration);\n\n    }\n\n\n    public OpenAPI getOpenAPI() {\n        return openAPI;\n    }\n    protected Set<Tag> getOpenApiTags() { return openApiTags; }\n    protected  Components getComponents() { return components; }\n    protected Paths getPaths() { return paths; }\n\n    /**\n     * Scans a single class for Swagger annotations - does not invoke ReaderListeners\n     */\n    public OpenAPI read(Class<?> cls) {\n        return read(cls, resolveApplicationPath(), null, false, null, null, new LinkedHashSet<String>(), new ArrayList<Parameter>(), new HashSet<Class<?>>());\n    }\n\n    /**\n     * Scans a set of classes for both ReaderListeners and OpenAPI annotations. All found listeners will\n     * be instantiated before any of the classes are scanned for OpenAPI annotations - so they can be invoked\n     * accordingly.\n     *\n     * @param classes a set of classes to scan\n     * @return the generated OpenAPI definition\n     */\n    public OpenAPI read(Set<Class<?>> classes) {\n\n        Set<Class<?>> sortedClasses = new TreeSet<>((class1, class2) -> {\n            if (class1.equals(class2)) {\n                return 0;\n            } else if (class1.isAssignableFrom(class2)) {\n                return -1;\n            } else if (class2.isAssignableFrom(class1)) {\n                return 1;\n            }\n            return class1.getName().compareTo(class2.getName());\n        });\n        sortedClasses.addAll(classes);\n\n        Map<Class<?>, ReaderListener> listeners = new HashMap<>();\n\n        String appPath = \"\";\n\n        for (Class<?> cls : sortedClasses) {\n            if (ReaderListener.class.isAssignableFrom(cls) && !listeners.containsKey(cls)) {\n                try {\n                    listeners.put(cls, (ReaderListener) cls.getDeclaredConstructor().newInstance());\n                } catch (Exception e) {\n                    LOGGER.error(\"Failed to create ReaderListener\", e);\n                }\n            }\n            if (config != null && Boolean.TRUE.equals(config.isAlwaysResolveAppPath()) && !Boolean.TRUE.equals(config.isSkipResolveAppPath())) {\n                if (Application.class.isAssignableFrom(cls)) {\n                    ApplicationPath appPathAnnotation = ReflectionUtils.getAnnotation(cls, ApplicationPath.class);\n                    if (appPathAnnotation != null) {\n                        appPath = appPathAnnotation.value();\n                    }\n                }\n            }\n        }\n\n        for (ReaderListener listener : listeners.values()) {\n            try {\n                listener.beforeScan(this, openAPI);\n            } catch (Exception e) {\n                LOGGER.error(\"Unexpected error invoking beforeScan listener [\" + listener.getClass().getName() + \"]\", e);\n            }\n        }\n        String appPathRuntime = resolveApplicationPath();\n        if (StringUtils.isNotBlank(appPathRuntime)) {\n            appPath = appPathRuntime;\n        }\n\n        for (Class<?> cls : sortedClasses) {\n            read(cls, appPath, null, false, null, null, new LinkedHashSet<String>(), new ArrayList<Parameter>(), new HashSet<Class<?>>());\n        }\n\n        for (ReaderListener listener : listeners.values()) {\n            try {\n                listener.afterScan(this, openAPI);\n            } catch (Exception e) {\n                LOGGER.error(\"Unexpected error invoking afterScan listener [\" + listener.getClass().getName() + \"]\", e);\n            }\n        }\n        return openAPI;\n    }\n\n    @Override\n    public void setConfiguration(OpenAPIConfiguration openApiConfiguration) {\n        if (openApiConfiguration != null) {\n            this.config = ContextUtils.deepCopy(openApiConfiguration);\n            if (openApiConfiguration.getOpenAPI() != null) {\n                this.openAPI = this.config.getOpenAPI();\n                if (this.openAPI.getComponents() != null) {\n                    this.components = this.openAPI.getComponents();\n                }\n            }\n            if (StringUtils.isNotBlank(openApiConfiguration.getOpenAPIVersion())) {\n                this.openAPI.openapi(openApiConfiguration.getOpenAPIVersion());\n            }\n            this.defaultResponseKey = StringUtils.isBlank(config.getDefaultResponseCode()) ? ApiResponses.DEFAULT : config.getDefaultResponseCode();\n        }\n    }\n\n    @Override\n    public OpenAPI read(Set<Class<?>> classes, Map<String, Object> resources) {\n        return read(classes);\n    }\n\n    protected String resolveApplicationPath() {\n        if (application != null && !Boolean.TRUE.equals(config.isSkipResolveAppPath())) {\n            Class<?> applicationToScan = this.application.getClass();\n            ApplicationPath applicationPath;\n            //search up in the hierarchy until we find one with the annotation, this is needed because for example Weld proxies will not have the annotation and the right class will be the superClass\n            while ((applicationPath = applicationToScan.getAnnotation(ApplicationPath.class)) == null && !applicationToScan.getSuperclass().equals(Application.class)) {\n                applicationToScan = applicationToScan.getSuperclass();\n            }\n\n            if (applicationPath != null) {\n                if (StringUtils.isNotBlank(applicationPath.value())) {\n                    return applicationPath.value();\n                }\n            }\n            // look for inner application, e.g. ResourceConfig\n            try {\n                Application innerApp = application;\n                Method m = application.getClass().getMethod(\"getApplication\");\n                while (m != null) {\n                    Application retrievedApp = (Application) m.invoke(innerApp);\n                    if (retrievedApp == null) {\n                        break;\n                    }\n                    if (retrievedApp.getClass().equals(innerApp.getClass())) {\n                        break;\n                    }\n                    innerApp = retrievedApp;\n                    applicationPath = innerApp.getClass().getAnnotation(ApplicationPath.class);\n                    if (applicationPath != null) {\n                        if (StringUtils.isNotBlank(applicationPath.value())) {\n                            return applicationPath.value();\n                        }\n                    }\n                    m = innerApp.getClass().getMethod(\"getApplication\");\n                }\n            } catch (Exception e) {\n                // no inner application found\n            }\n        }\n        return \"\";\n    }\n\n    public OpenAPI read(Class<?> cls,\n                        String parentPath,\n                        String parentMethod,\n                        boolean isSubresource,\n                        RequestBody parentRequestBody,\n                        ApiResponses parentResponses,\n                        Set<String> parentTags,\n                        List<Parameter> parentParameters,\n                        Set<Class<?>> scannedResources) {\n\n        Hidden hidden = cls.getAnnotation(Hidden.class);\n        // class path\n        final javax.ws.rs.Path apiPath = ReflectionUtils.getAnnotation(cls, javax.ws.rs.Path.class);\n        final boolean openapi31 = Boolean.TRUE.equals(config.isOpenAPI31());\n\n        if (\n                openapi31 &&\n                (\n                        config.getOpenAPI() == null ||\n                        config.getOpenAPI().getOpenapi() == null ||\n                        config.getOpenAPI().getOpenapi().startsWith(\"3.0\")\n                ) && config.getOpenAPIVersion() == null) {\n            openAPI.setOpenapi(\"3.1.0\");\n        }\n\n        if (hidden != null) { //  || (apiPath == null && !isSubresource)) {\n            return openAPI;\n        }\n\n        io.swagger.v3.oas.annotations.responses.ApiResponse[] classResponses = ReflectionUtils.getRepeatableAnnotationsArray(cls, io.swagger.v3.oas.annotations.responses.ApiResponse.class);\n\n        List<io.swagger.v3.oas.annotations.security.SecurityScheme> apiSecurityScheme = ReflectionUtils.getRepeatableAnnotations(cls, io.swagger.v3.oas.annotations.security.SecurityScheme.class);\n        List<io.swagger.v3.oas.annotations.security.SecurityRequirement> apiSecurityRequirements = ReflectionUtils.getRepeatableAnnotations(cls, io.swagger.v3.oas.annotations.security.SecurityRequirement.class);\n\n        io.swagger.v3.oas.annotations.Webhooks webhooksAnnotation = ReflectionUtils.getAnnotation(cls, io.swagger.v3.oas.annotations.Webhooks.class);\n\n        ExternalDocumentation apiExternalDocs = ReflectionUtils.getAnnotation(cls, ExternalDocumentation.class);\n        io.swagger.v3.oas.annotations.tags.Tag[] apiTags = ReflectionUtils.getRepeatableAnnotationsArray(cls, io.swagger.v3.oas.annotations.tags.Tag.class);\n        io.swagger.v3.oas.annotations.servers.Server[] apiServers = ReflectionUtils.getRepeatableAnnotationsArray(cls, io.swagger.v3.oas.annotations.servers.Server.class);\n\n        javax.ws.rs.Consumes classConsumes = ReflectionUtils.getAnnotation(cls, javax.ws.rs.Consumes.class);\n        javax.ws.rs.Produces classProduces = ReflectionUtils.getAnnotation(cls, javax.ws.rs.Produces.class);\n\n        boolean classDeprecated = ReflectionUtils.getAnnotation(cls, Deprecated.class) != null\n                || (KotlinDetector.isKotlinPresent() && ReflectionUtils.getAnnotation(cls, KotlinDetector.getKotlinDeprecated()) != null);\n\n        // OpenApiDefinition\n        OpenAPIDefinition openAPIDefinition = ReflectionUtils.getAnnotation(cls, OpenAPIDefinition.class);\n\n        if (openAPIDefinition != null) {\n\n            // info\n            AnnotationsUtils.getInfo(openAPIDefinition.info()).ifPresent(info -> openAPI.setInfo(info));\n\n            // OpenApiDefinition security requirements\n            SecurityParser\n                    .getSecurityRequirements(openAPIDefinition.security())\n                    .ifPresent(s -> openAPI.setSecurity(s));\n            //\n            // OpenApiDefinition external docs\n            AnnotationsUtils\n                    .getExternalDocumentation(openAPIDefinition.externalDocs())\n                    .ifPresent(docs -> openAPI.setExternalDocs(docs));\n\n            // OpenApiDefinition tags\n            AnnotationsUtils\n                    .getTags(openAPIDefinition.tags(), false)\n                    .ifPresent(tags -> openApiTags.addAll(tags));\n\n            // OpenApiDefinition servers\n            AnnotationsUtils.getServers(openAPIDefinition.servers()).ifPresent(servers -> openAPI.setServers(servers));\n\n            // OpenApiDefinition extensions\n            if (openAPIDefinition.extensions().length > 0) {\n                openAPI.setExtensions(AnnotationsUtils\n                        .getExtensions(openapi31, openAPIDefinition.extensions()));\n            }\n\n        }\n\n        // class security schemes\n        if (apiSecurityScheme != null) {\n            for (io.swagger.v3.oas.annotations.security.SecurityScheme securitySchemeAnnotation : apiSecurityScheme) {\n                Optional<SecurityParser.SecuritySchemePair> securityScheme = SecurityParser.getSecurityScheme(securitySchemeAnnotation);\n                if (securityScheme.isPresent()) {\n                    Map<String, SecurityScheme> securitySchemeMap = new HashMap<>();\n                    if (StringUtils.isNotBlank(securityScheme.get().key)) {\n                        securitySchemeMap.put(securityScheme.get().key, securityScheme.get().securityScheme);\n                        if (components.getSecuritySchemes() != null && !components.getSecuritySchemes().isEmpty()) {\n                            components.getSecuritySchemes().putAll(securitySchemeMap);\n                        } else {\n                            components.setSecuritySchemes(securitySchemeMap);\n                        }\n                    }\n                }\n            }\n        }\n\n        // class security requirements\n        List<SecurityRequirement> classSecurityRequirements = new ArrayList<>();\n        if (apiSecurityRequirements != null) {\n            Optional<List<SecurityRequirement>> requirementsObject = SecurityParser.getSecurityRequirements(\n                    apiSecurityRequirements.toArray(new io.swagger.v3.oas.annotations.security.SecurityRequirement[apiSecurityRequirements.size()])\n            );\n            if (requirementsObject.isPresent()) {\n                classSecurityRequirements = requirementsObject.get();\n            }\n        }\n\n        // class tags, consider only name to add to class operations\n        final Set<String> classTags = new LinkedHashSet<>();\n        if (apiTags != null) {\n            AnnotationsUtils\n                    .getTags(apiTags, false).ifPresent(tags ->\n                    tags\n                            .stream()\n                            .map(Tag::getName)\n                            .forEach(classTags::add)\n            );\n        }\n\n        // parent tags\n        if (isSubresource) {\n            if (parentTags != null) {\n                classTags.addAll(parentTags);\n            }\n        }\n\n        // servers\n        final List<io.swagger.v3.oas.models.servers.Server> classServers = new ArrayList<>();\n        if (apiServers != null) {\n            AnnotationsUtils.getServers(apiServers).ifPresent(classServers::addAll);\n        }\n\n        // class external docs\n        Optional<io.swagger.v3.oas.models.ExternalDocumentation> classExternalDocumentation = AnnotationsUtils.getExternalDocumentation(apiExternalDocs);\n\n\n        JavaType classType = TypeFactory.defaultInstance().constructType(cls);\n        BeanDescription bd;\n        if (openapi31) {\n            bd = Json31.mapper().getSerializationConfig().introspect(classType);\n        } else {\n            bd = Json.mapper().getSerializationConfig().introspect(classType);\n        }\n\n        final List<Parameter> globalParameters = new ArrayList<>();\n\n        // look for constructor-level annotated properties\n        globalParameters.addAll(ReaderUtils.collectConstructorParameters(cls, components, classConsumes, null, config.getSchemaResolution(), openapi31));\n\n        // look for field-level annotated properties\n        globalParameters.addAll(ReaderUtils.collectFieldParameters(cls, components, classConsumes, null));\n\n        // Make sure that the class methods are sorted for deterministic order\n        // See https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getMethods--\n        final List<Method> methods = Arrays.stream(cls.getMethods())\n                .sorted(new MethodComparator())\n                .collect(Collectors.toList());\n\n        // iterate class methods\n        for (Method method : methods) {\n            if (isOperationHidden(method)) {\n                continue;\n            }\n            AnnotatedMethod annotatedMethod = bd.findMethod(method.getName(), method.getParameterTypes());\n            javax.ws.rs.Produces methodProduces = ReflectionUtils.getAnnotation(method, javax.ws.rs.Produces.class);\n            javax.ws.rs.Consumes methodConsumes = ReflectionUtils.getAnnotation(method, javax.ws.rs.Consumes.class);\n\n            if (isMethodOverridden(method, cls)) {\n                continue;\n            }\n\n            boolean methodDeprecated = ReflectionUtils.getAnnotation(method, Deprecated.class) != null\n                    || (KotlinDetector.isKotlinPresent() && ReflectionUtils.getAnnotation(method, KotlinDetector.getKotlinDeprecated()) != null);\n\n            javax.ws.rs.Path methodPath = ReflectionUtils.getAnnotation(method, javax.ws.rs.Path.class);\n\n            String operationPath = ReaderUtils.getPath(apiPath, methodPath, parentPath, isSubresource);\n\n            // skip if path is the same as parent, e.g. for @ApplicationPath annotated application\n            // extending resource config.\n            if (ignoreOperationPath(operationPath, parentPath) && !isSubresource) {\n                continue;\n            }\n\n            Map<String, String> regexMap = new LinkedHashMap<>();\n            operationPath = PathUtils.parsePath(operationPath, regexMap);\n            if (operationPath != null) {\n                if (config != null && ReaderUtils.isIgnored(operationPath, config)) {\n                    continue;\n                }\n\n                final Class<?> subResource = getSubResourceWithJaxRsSubresourceLocatorSpecs(method);\n\n                String httpMethod = ReaderUtils.extractOperationMethod(method, OpenAPIExtensions.chain());\n                httpMethod = (httpMethod == null && isSubresource) ? parentMethod : httpMethod;\n\n                if (StringUtils.isBlank(httpMethod) && subResource == null) {\n                    continue;\n                } else if (StringUtils.isBlank(httpMethod) && subResource != null) {\n                    Type returnType = method.getGenericReturnType();\n                    if (annotatedMethod != null && annotatedMethod.getType() != null) {\n                        returnType = annotatedMethod.getType();\n                    }\n\n                    if (shouldIgnoreClass(returnType.getTypeName()) && !method.getGenericReturnType().equals(subResource)) {\n                        continue;\n                    }\n                }\n\n                io.swagger.v3.oas.annotations.Operation apiOperation = ReflectionUtils.getAnnotation(method, io.swagger.v3.oas.annotations.Operation.class);\n                JsonView jsonViewAnnotation;\n                JsonView jsonViewAnnotationForRequestBody;\n                if (apiOperation != null && apiOperation.ignoreJsonView()) {\n                    jsonViewAnnotation = null;\n                    jsonViewAnnotationForRequestBody = null;\n                } else {\n                    jsonViewAnnotation = ReflectionUtils.getAnnotation(method, JsonView.class);\n                    /* If one and only one exists, use the @JsonView annotation from the method parameter annotated\n                       with @RequestBody. Otherwise fall back to the @JsonView annotation for the method itself. */\n                    jsonViewAnnotationForRequestBody = (JsonView) Arrays.stream(ReflectionUtils.getParameterAnnotations(method))\n                        .filter(arr ->\n                            Arrays.stream(arr)\n                                .anyMatch(annotation ->\n                                    annotation.annotationType()\n                                        .equals(io.swagger.v3.oas.annotations.parameters.RequestBody.class)\n                                )\n                        ).flatMap(Arrays::stream)\n                        .filter(annotation ->\n                            annotation.annotationType()\n                                .equals(JsonView.class)\n                        ).reduce((a, b) -> null)\n                        .orElse(jsonViewAnnotation);\n                }\n\n                Operation operation = parseMethod(\n                        method,\n                        globalParameters,\n                        methodProduces,\n                        classProduces,\n                        methodConsumes,\n                        classConsumes,\n                        classSecurityRequirements,\n                        classExternalDocumentation,\n                        classTags,\n                        classServers,\n                        isSubresource,\n                        parentRequestBody,\n                        parentResponses,\n                        jsonViewAnnotation,\n                        classResponses,\n                        annotatedMethod);\n                if (operation != null) {\n\n                    if (classDeprecated || methodDeprecated) {\n                        operation.setDeprecated(true);\n                    }\n\n                    List<Parameter> operationParameters = new ArrayList<>();\n                    List<Parameter> formParameters = new ArrayList<>();\n                    Annotation[][] paramAnnotations = ReflectionUtils.getParameterAnnotations(method);\n                    if (annotatedMethod == null) { // annotatedMethod not null only when method with 0-2 parameters\n                        Type[] genericParameterTypes = method.getGenericParameterTypes();\n                        for (int i = 0; i < genericParameterTypes.length; i++) {\n                            final Type type = TypeFactory.defaultInstance().constructType(genericParameterTypes[i], cls);\n                            io.swagger.v3.oas.annotations.Parameter paramAnnotation = AnnotationsUtils.getAnnotation(io.swagger.v3.oas.annotations.Parameter.class, paramAnnotations[i]);\n                            Type paramType = ParameterProcessor.getParameterType(paramAnnotation, true);\n                            if (paramType == null) {\n                                paramType = type;\n                            } else {\n                                if (!(paramType instanceof Class)) {\n                                    paramType = type;\n                                }\n                            }\n                            ResolvedParameter resolvedParameter = getParameters(paramType, Arrays.asList(paramAnnotations[i]), operation, classConsumes, methodConsumes, jsonViewAnnotation);\n                            operationParameters.addAll(resolvedParameter.parameters);\n                            // collect params to use together as request Body\n                            formParameters.addAll(resolvedParameter.formParameters);\n                            if (resolvedParameter.requestBody != null) {\n                                processRequestBody(\n                                        resolvedParameter.requestBody,\n                                        operation,\n                                        methodConsumes,\n                                        classConsumes,\n                                        operationParameters,\n                                        paramAnnotations[i],\n                                        type,\n                                        jsonViewAnnotationForRequestBody,\n                                        null);\n                            }\n                        }\n                    } else {\n                        for (int i = 0; i < annotatedMethod.getParameterCount(); i++) {\n                            AnnotatedParameter param = annotatedMethod.getParameter(i);\n                            final Type type = TypeFactory.defaultInstance().constructType(param.getParameterType(), cls);\n                            io.swagger.v3.oas.annotations.Parameter paramAnnotation = AnnotationsUtils.getAnnotation(io.swagger.v3.oas.annotations.Parameter.class, paramAnnotations[i]);\n                            Type paramType = ParameterProcessor.getParameterType(paramAnnotation, true);\n                            if (paramType == null) {\n                                paramType = type;\n                            } else {\n                                if (!(paramType instanceof Class)) {\n                                    paramType = type;\n                                }\n                            }\n                            ResolvedParameter resolvedParameter = getParameters(paramType, Arrays.asList(paramAnnotations[i]), operation, classConsumes, methodConsumes, jsonViewAnnotation);\n                            operationParameters.addAll(resolvedParameter.parameters);\n                            // collect params to use together as request Body\n                            formParameters.addAll(resolvedParameter.formParameters);\n                            if (resolvedParameter.requestBody != null) {\n                                processRequestBody(\n                                        resolvedParameter.requestBody,\n                                        operation,\n                                        methodConsumes,\n                                        classConsumes,\n                                        operationParameters,\n                                        paramAnnotations[i],\n                                        type,\n                                        jsonViewAnnotationForRequestBody,\n                                        null);\n                            }\n                        }\n                    }\n                    // if we have form parameters, need to merge them into single schema and use as request body..\n                    if (!formParameters.isEmpty()) {\n                        Schema<?> mergedSchema = new ObjectSchema();\n                        Map<String, Encoding> encoding = new LinkedHashMap<>();\n                        for (Parameter formParam: formParameters) {\n                            if (formParam.getExplode() != null || (formParam.getStyle() != null) && Encoding.StyleEnum.fromString(formParam.getStyle().toString()) != null) {\n                                Encoding e = new Encoding();\n                                if (formParam.getExplode() != null) {\n                                    e.explode(formParam.getExplode());\n                                }\n                                if (formParam.getStyle() != null  && Encoding.StyleEnum.fromString(formParam.getStyle().toString()) != null) {\n                                    e.style(Encoding.StyleEnum.fromString(formParam.getStyle().toString()));\n                                }\n                                encoding.put(formParam.getName(), e);\n                            }\n                            mergedSchema.addProperty(formParam.getName(), formParam.getSchema());\n                            if (formParam.getSchema() != null &&\n                                    StringUtils.isNotBlank(formParam.getDescription()) &&\n                                    StringUtils.isBlank(formParam.getSchema().getDescription())) {\n                                formParam.getSchema().description(formParam.getDescription());\n                            }\n                            if (null != formParam.getRequired() && formParam.getRequired()) {\n                                mergedSchema.addRequiredItem(formParam.getName());\n                            }\n                        }\n                        Parameter merged = new Parameter().schema(mergedSchema);\n                        processRequestBody(\n                                merged,\n                                operation,\n                                methodConsumes,\n                                classConsumes,\n                                operationParameters,\n                                new Annotation[0],\n                                null,\n                                jsonViewAnnotationForRequestBody,\n                                encoding);\n\n                    }\n                    if (!operationParameters.isEmpty()) {\n                        for (Parameter operationParameter : operationParameters) {\n                            operation.addParametersItem(operationParameter);\n                        }\n                    }\n\n                    // if subresource, merge parent parameters\n                    if (parentParameters != null) {\n                        for (Parameter parentParameter : parentParameters) {\n                            operation.addParametersItem(parentParameter);\n                        }\n                    }\n\n                    if (subResource != null && !scannedResources.contains(subResource)) {\n                        scannedResources.add(subResource);\n                        read(subResource, operationPath, httpMethod, true, operation.getRequestBody(), operation.getResponses(), classTags, operation.getParameters(), scannedResources);\n                        // remove the sub resource so that it can visit it later in another path\n                        // but we have a room for optimization in the future to reuse the scanned result\n                        // by caching the scanned resources in the reader instance to avoid actual scanning\n                        // the the resources again\n                        scannedResources.remove(subResource);\n                        // don't proceed with root resource operation, as it's handled by subresource\n                        continue;\n                    }\n\n                    final Iterator<OpenAPIExtension> chain = OpenAPIExtensions.chain();\n                    if (chain.hasNext()) {\n                        final OpenAPIExtension extension = chain.next();\n                        extension.decorateOperation(operation, method, chain);\n                    }\n\n                    PathItem pathItemObject;\n                    if (openAPI.getPaths() != null && openAPI.getPaths().get(operationPath) != null) {\n                        pathItemObject = openAPI.getPaths().get(operationPath);\n                    } else {\n                        pathItemObject = new PathItem();\n                    }\n\n                    if (StringUtils.isBlank(httpMethod)) {\n                        continue;\n                    }\n                    setPathItemOperation(pathItemObject, httpMethod, operation);\n                    applyPathParamsPatterns(operation, regexMap);\n                    paths.addPathItem(operationPath, pathItemObject);\n                    if (openAPI.getPaths() != null) {\n                        this.paths.putAll(openAPI.getPaths());\n                    }\n\n                    openAPI.setPaths(this.paths);\n\n                }\n            }\n        }\n\n        if (webhooksAnnotation != null && webhooksAnnotation.value().length > 0) {\n            Map<String, PathItem> webhooks = new HashMap<>();\n            for (io.swagger.v3.oas.annotations.Webhook webhookAnnotation : webhooksAnnotation.value()) {\n                io.swagger.v3.oas.annotations.Operation apiOperation = webhookAnnotation.operation();\n                PathItem pathItemObject = new PathItem();\n                Operation operation = new Operation();\n\n                setOperationObjectFromApiOperationAnnotation(operation, apiOperation, null, classProduces, null, classConsumes, null);\n\n                pathItemObject.post(operation);\n                webhooks.put(webhookAnnotation.name(), pathItemObject);\n            }\n            if (!webhooks.isEmpty()) {\n                openAPI.setWebhooks(webhooks);\n            }\n        }\n\n        // if no components object is defined in openApi instance passed by client, set openAPI.components to resolved components (if not empty)\n        if (!isEmptyComponents(components) && openAPI.getComponents() == null) {\n            openAPI.setComponents(components);\n        }\n\n        // add tags from class to definition tags\n        AnnotationsUtils\n                .getTags(apiTags, true).ifPresent(tags -> openApiTags.addAll(tags));\n\n        if (!openApiTags.isEmpty()) {\n            Set<Tag> tagsSet = new LinkedHashSet<>();\n            if (openAPI.getTags() != null) {\n                for (Tag tag : openAPI.getTags()) {\n                    if (tagsSet.stream().noneMatch(t -> t.getName().equals(tag.getName()))) {\n                        tagsSet.add(tag);\n                    }\n                }\n            }\n            for (Tag tag : openApiTags) {\n                if (tagsSet.stream().noneMatch(t -> t.getName().equals(tag.getName()))) {\n                    tagsSet.add(tag);\n                }\n            }\n            openAPI.setTags(new ArrayList<>(tagsSet));\n        }\n\n        return openAPI;\n    }\n\n    protected void applyPathParamsPatterns(Operation operation, Map<String, String> patternsMap) {\n        if (operation.getParameters() == null) {\n            return;\n        }\n        operation.getParameters().stream()\n                .filter(p -> patternsMap.containsKey(p.getName()))\n                .filter(p -> \"path\".equals(p.getIn()))\n                .filter(p -> p.getSchema() != null)\n                .filter(p -> StringUtils.isBlank(p.getSchema().getPattern()))\n                .filter(p -> !Parameter.StyleEnum.MATRIX.equals(p.getStyle()))\n                .filter(p -> \"string\".equals(p.getSchema().getType()) || (p.getSchema().getTypes() != null && p.getSchema().getTypes().contains(\"string\")))\n                .forEach(p -> p.getSchema().setPattern(patternsMap.get(p.getName())));\n    }\n    protected Content processContent(Content content, Schema<?> schema, Consumes methodConsumes, Consumes classConsumes) {\n        if (content == null) {\n            content = new Content();\n        }\n        if (methodConsumes != null) {\n            for (String value : methodConsumes.value()) {\n                setMediaTypeToContent(schema, content, value);\n            }\n        } else if (classConsumes != null) {\n            for (String value : classConsumes.value()) {\n                setMediaTypeToContent(schema, content, value);\n            }\n        } else {\n            setMediaTypeToContent(schema, content, DEFAULT_MEDIA_TYPE_VALUE);\n        }\n        return content;\n    }\n\n    protected void processRequestBody(Parameter requestBodyParameter, Operation operation,\n                                      Consumes methodConsumes, Consumes classConsumes,\n                                      List<Parameter> operationParameters,\n                                      Annotation[] paramAnnotations, Type type,\n                                      JsonView jsonViewAnnotation,\n                                      Map<String, Encoding> encoding) {\n\n        io.swagger.v3.oas.annotations.parameters.RequestBody requestBodyAnnotation = getRequestBody(Arrays.asList(paramAnnotations));\n        if (requestBodyAnnotation != null) {\n            Optional<RequestBody> optionalRequestBody = OperationParser.getRequestBody(requestBodyAnnotation, classConsumes, methodConsumes, components, jsonViewAnnotation, config.isOpenAPI31());\n            if (optionalRequestBody.isPresent()) {\n                RequestBody requestBody = optionalRequestBody.get();\n                if (StringUtils.isBlank(requestBody.get$ref()) &&\n                        (requestBody.getContent() == null || requestBody.getContent().isEmpty())) {\n                    if (requestBodyParameter.getSchema() != null) {\n                        Content content = processContent(requestBody.getContent(), requestBodyParameter.getSchema(), methodConsumes, classConsumes);\n                        requestBody.setContent(content);\n                    }\n                } else if (StringUtils.isBlank(requestBody.get$ref()) &&\n                        requestBody.getContent() != null &&\n                        !requestBody.getContent().isEmpty()) {\n                    if (requestBodyParameter.getSchema() != null) {\n                        Map<String, MediaType> reresolvedMediaTypes = new LinkedHashMap<>();\n                        for (String key: requestBody.getContent().keySet()) {\n                            MediaType mediaType = requestBody.getContent().get(key);\n                            if (mediaType.getSchema() == null) {\n                                if (requestBodyParameter.getSchema() == null) {\n                                    mediaType.setSchema(new Schema());\n                                } else {\n                                    mediaType.setSchema(requestBodyParameter.getSchema());\n                                }\n                            } else if (mediaType.getSchema() != null && requestBodyAnnotation.useParameterTypeSchema()) {\n                                if (requestBodyParameter.getSchema() != null) {\n                                    MediaType newMediaType = clone(mediaType);\n                                    Schema<?> parameterSchema = clone(requestBodyParameter.getSchema());\n                                    Optional<io.swagger.v3.oas.annotations.media.Content> content = Arrays.stream(requestBodyAnnotation.content()).filter(c -> c.mediaType().equals(key)).findFirst();\n                                    if (content.isPresent()) {\n                                        Optional<Schema> reResolvedSchema = AnnotationsUtils.getSchemaFromAnnotation(content.get().schema(), components, null, config.isOpenAPI31(), parameterSchema);\n                                        if (reResolvedSchema.isPresent()) {\n                                            parameterSchema = reResolvedSchema.get();\n                                        }\n                                        reResolvedSchema = AnnotationsUtils.getArraySchema(content.get().array(), components, null, config.isOpenAPI31(), parameterSchema);\n                                        if (reResolvedSchema.isPresent()) {\n                                            parameterSchema = reResolvedSchema.get();\n                                        }\n                                    }\n                                    newMediaType.schema(parameterSchema);\n                                    reresolvedMediaTypes.put(key, newMediaType);\n                                }\n                            }\n                            if (StringUtils.isBlank(mediaType.getSchema().getType()) || requestBodyAnnotation.useParameterTypeSchema()) {\n                                mediaType.getSchema().setType(requestBodyParameter.getSchema().getType());\n                            }\n                        }\n                        requestBody.getContent().putAll(reresolvedMediaTypes);\n                    }\n                }\n                operation.setRequestBody(requestBody);\n            }\n        } else {\n            if (operation.getRequestBody() == null) {\n                boolean isRequestBodyEmpty = true;\n                RequestBody requestBody = new RequestBody();\n                if (StringUtils.isNotBlank(requestBodyParameter.get$ref())) {\n                    requestBody.set$ref(requestBodyParameter.get$ref());\n                    isRequestBodyEmpty = false;\n                }\n                if (StringUtils.isNotBlank(requestBodyParameter.getDescription())) {\n                    requestBody.setDescription(requestBodyParameter.getDescription());\n                    isRequestBodyEmpty = false;\n                }\n                if (Boolean.TRUE.equals(requestBodyParameter.getRequired())) {\n                    requestBody.setRequired(requestBodyParameter.getRequired());\n                    isRequestBodyEmpty = false;\n                }\n\n                if (requestBodyParameter.getSchema() != null) {\n                    Content content = processContent(null, requestBodyParameter.getSchema(), methodConsumes, classConsumes);\n                    requestBody.setContent(content);\n                    isRequestBodyEmpty = false;\n                }\n                if (!isRequestBodyEmpty) {\n                    operation.setRequestBody(requestBody);\n                }\n            }\n        }\n        if (operation.getRequestBody() != null &&\n                operation.getRequestBody().getContent() != null &&\n                encoding != null && !encoding.isEmpty()) {\n            Content content = operation.getRequestBody().getContent();\n            for (String mediaKey: content.keySet()) {\n                if (mediaKey.equals(javax.ws.rs.core.MediaType.APPLICATION_FORM_URLENCODED) ||\n                        mediaKey.equals(javax.ws.rs.core.MediaType.MULTIPART_FORM_DATA)) {\n                    MediaType m = content.get(mediaKey);\n                    m.encoding(encoding);\n                }\n            }\n        }\n    }\n\n    private io.swagger.v3.oas.annotations.parameters.RequestBody getRequestBody(List<Annotation> annotations) {\n        if (annotations == null) {\n            return null;\n        }\n        for (Annotation a : annotations) {\n            if (a instanceof io.swagger.v3.oas.annotations.parameters.RequestBody) {\n                return (io.swagger.v3.oas.annotations.parameters.RequestBody) a;\n            }\n        }\n        return null;\n    }\n\n    private void setMediaTypeToContent(Schema<?> schema, Content content, String value) {\n        MediaType mediaTypeObject = new MediaType();\n        mediaTypeObject.setSchema(schema);\n        content.addMediaType(value, mediaTypeObject);\n    }\n\n    public Operation parseMethod(\n            Method method,\n            List<Parameter> globalParameters,\n            JsonView jsonViewAnnotation) {\n        JavaType classType = TypeFactory.defaultInstance().constructType(method.getDeclaringClass());\n        return parseMethod(\n                classType.getClass(),\n                method,\n                globalParameters,\n                null,\n                null,\n                null,\n                null,\n                new ArrayList<>(),\n                Optional.empty(),\n                new HashSet<>(),\n                new ArrayList<>(),\n                false,\n                null,\n                null,\n                jsonViewAnnotation,\n                null,\n                null);\n    }\n\n    public Operation parseMethod(\n            Method method,\n            List<Parameter> globalParameters,\n            Produces methodProduces,\n            Produces classProduces,\n            Consumes methodConsumes,\n            Consumes classConsumes,\n            List<SecurityRequirement> classSecurityRequirements,\n            Optional<io.swagger.v3.oas.models.ExternalDocumentation> classExternalDocs,\n            Set<String> classTags,\n            List<io.swagger.v3.oas.models.servers.Server> classServers,\n            boolean isSubresource,\n            RequestBody parentRequestBody,\n            ApiResponses parentResponses,\n            JsonView jsonViewAnnotation,\n            io.swagger.v3.oas.annotations.responses.ApiResponse[] classResponses) {\n        JavaType classType = TypeFactory.defaultInstance().constructType(method.getDeclaringClass());\n        return parseMethod(\n                classType.getClass(),\n                method,\n                globalParameters,\n                methodProduces,\n                classProduces,\n                methodConsumes,\n                classConsumes,\n                classSecurityRequirements,\n                classExternalDocs,\n                classTags,\n                classServers,\n                isSubresource,\n                parentRequestBody,\n                parentResponses,\n                jsonViewAnnotation,\n                classResponses,\n                null);\n    }\n\n    public Operation parseMethod(\n            Method method,\n            List<Parameter> globalParameters,\n            Produces methodProduces,\n            Produces classProduces,\n            Consumes methodConsumes,\n            Consumes classConsumes,\n            List<SecurityRequirement> classSecurityRequirements,\n            Optional<io.swagger.v3.oas.models.ExternalDocumentation> classExternalDocs,\n            Set<String> classTags,\n            List<io.swagger.v3.oas.models.servers.Server> classServers,\n            boolean isSubresource,\n            RequestBody parentRequestBody,\n            ApiResponses parentResponses,\n            JsonView jsonViewAnnotation,\n            io.swagger.v3.oas.annotations.responses.ApiResponse[] classResponses,\n            AnnotatedMethod annotatedMethod) {\n        JavaType classType = TypeFactory.defaultInstance().constructType(method.getDeclaringClass());\n        return parseMethod(\n                classType.getClass(),\n                method,\n                globalParameters,\n                methodProduces,\n                classProduces,\n                methodConsumes,\n                classConsumes,\n                classSecurityRequirements,\n                classExternalDocs,\n                classTags,\n                classServers,\n                isSubresource,\n                parentRequestBody,\n                parentResponses,\n                jsonViewAnnotation,\n                classResponses,\n                annotatedMethod);\n    }\n\n    protected Operation parseMethod(\n            Class<?> cls,\n            Method method,\n            List<Parameter> globalParameters,\n            Produces methodProduces,\n            Produces classProduces,\n            Consumes methodConsumes,\n            Consumes classConsumes,\n            List<SecurityRequirement> classSecurityRequirements,\n            Optional<io.swagger.v3.oas.models.ExternalDocumentation> classExternalDocs,\n            Set<String> classTags,\n            List<io.swagger.v3.oas.models.servers.Server> classServers,\n            boolean isSubresource,\n            RequestBody parentRequestBody,\n            ApiResponses parentResponses,\n            JsonView jsonViewAnnotation,\n            io.swagger.v3.oas.annotations.responses.ApiResponse[] classResponses,\n            AnnotatedMethod annotatedMethod) {\n        Operation operation = new Operation();\n\n        io.swagger.v3.oas.annotations.Operation apiOperation = ReflectionUtils.getAnnotation(method, io.swagger.v3.oas.annotations.Operation.class);\n\n        List<io.swagger.v3.oas.annotations.security.SecurityRequirement> apiSecurity = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.v3.oas.annotations.security.SecurityRequirement.class);\n        List<io.swagger.v3.oas.annotations.callbacks.Callback> apiCallbacks = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.v3.oas.annotations.callbacks.Callback.class);\n        List<Server> apiServers = ReflectionUtils.getRepeatableAnnotations(method, Server.class);\n        List<io.swagger.v3.oas.annotations.tags.Tag> apiTags = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.v3.oas.annotations.tags.Tag.class);\n        List<io.swagger.v3.oas.annotations.Parameter> apiParameters = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.v3.oas.annotations.Parameter.class);\n        List<io.swagger.v3.oas.annotations.responses.ApiResponse> apiResponses = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.v3.oas.annotations.responses.ApiResponse.class);\n        io.swagger.v3.oas.annotations.parameters.RequestBody apiRequestBody =\n                ReflectionUtils.getAnnotation(method, io.swagger.v3.oas.annotations.parameters.RequestBody.class);\n\n        io.swagger.v3.oas.annotations.responses.ApiResponse[] operationApiResponses = new io.swagger.v3.oas.annotations.responses.ApiResponse[] {};\n        if (apiOperation != null) {\n            operationApiResponses = apiOperation.responses();\n        }\n\n        ExternalDocumentation apiExternalDocumentation = ReflectionUtils.getAnnotation(method, ExternalDocumentation.class);\n\n        // callbacks\n        Map<String, Callback> callbacks = new LinkedHashMap<>();\n\n        if (apiCallbacks != null) {\n            for (io.swagger.v3.oas.annotations.callbacks.Callback methodCallback : apiCallbacks) {\n                Map<String, Callback> currentCallbacks = getCallbacks(methodCallback, methodProduces, classProduces, methodConsumes, classConsumes, jsonViewAnnotation);\n                callbacks.putAll(currentCallbacks);\n            }\n        }\n        if (!callbacks.isEmpty()) {\n            operation.setCallbacks(callbacks);\n        }\n\n        // security\n        classSecurityRequirements.forEach(operation::addSecurityItem);\n        if (apiSecurity != null) {\n            Optional<List<SecurityRequirement>> requirementsObject = SecurityParser.getSecurityRequirements(apiSecurity.toArray(new io.swagger.v3.oas.annotations.security.SecurityRequirement[apiSecurity.size()]));\n            if (requirementsObject.isPresent()) {\n                requirementsObject.get().stream()\n                        .filter(r -> operation.getSecurity() == null || !operation.getSecurity().contains(r))\n                        .forEach(operation::addSecurityItem);\n            }\n        }\n\n        // servers\n        if (classServers != null) {\n            classServers.forEach(operation::addServersItem);\n        }\n\n        if (apiServers != null) {\n            AnnotationsUtils.getServers(apiServers.toArray(new Server[apiServers.size()])).ifPresent(servers -> servers.forEach(operation::addServersItem));\n        }\n\n        // external docs\n        AnnotationsUtils.getExternalDocumentation(apiExternalDocumentation).ifPresent(operation::setExternalDocs);\n\n        // method tags\n        if (apiTags != null) {\n            apiTags.stream()\n                    .filter(t -> operation.getTags() == null || (operation.getTags() != null && !operation.getTags().contains(t.name())))\n                    .map(io.swagger.v3.oas.annotations.tags.Tag::name)\n                    .forEach(operation::addTagsItem);\n            AnnotationsUtils.getTags(apiTags.toArray(new io.swagger.v3.oas.annotations.tags.Tag[apiTags.size()]), true).ifPresent(tags -> openApiTags.addAll(tags));\n        }\n\n        // parameters\n        if (globalParameters != null) {\n            for (Parameter globalParameter : globalParameters) {\n                operation.addParametersItem(globalParameter);\n            }\n        }\n        if (apiParameters != null) {\n            getParametersListFromAnnotation(\n                    apiParameters.toArray(new io.swagger.v3.oas.annotations.Parameter[apiParameters.size()]),\n                    classConsumes,\n                    methodConsumes,\n                    operation,\n                    jsonViewAnnotation).ifPresent(p -> p.forEach(operation::addParametersItem));\n        }\n\n        // RequestBody in Method\n        if (apiRequestBody != null && operation.getRequestBody() == null){\n            OperationParser.getRequestBody(apiRequestBody, classConsumes, methodConsumes, components, jsonViewAnnotation, config.isOpenAPI31()).ifPresent(\n                    operation::setRequestBody);\n        }\n\n        // operation id\n        if (StringUtils.isBlank(operation.getOperationId())) {\n            operation.setOperationId(getOperationId(method.getName()));\n        }\n\n        // classResponses\n        if (classResponses != null && classResponses.length > 0) {\n            OperationParser.getApiResponses(\n                    classResponses,\n                    classProduces,\n                    methodProduces,\n                    components,\n                    jsonViewAnnotation,\n                    config.isOpenAPI31(),\n                    defaultResponseKey\n            ).ifPresent(responses -> {\n                if (operation.getResponses() == null) {\n                    operation.setResponses(responses);\n                } else {\n                    responses.forEach(operation.getResponses()::addApiResponse);\n                }\n            });\n        }\n\n        if (apiOperation != null) {\n            setOperationObjectFromApiOperationAnnotation(operation, apiOperation, methodProduces, classProduces, methodConsumes, classConsumes, jsonViewAnnotation);\n        }\n\n        // apiResponses\n        if (apiResponses != null && !apiResponses.isEmpty()) {\n            OperationParser.getApiResponses(\n                    apiResponses.toArray(new io.swagger.v3.oas.annotations.responses.ApiResponse[apiResponses.size()]),\n                    classProduces,\n                    methodProduces,\n                    components,\n                    jsonViewAnnotation,\n                    config.isOpenAPI31(),\n                    defaultResponseKey\n            ).ifPresent(responses -> {\n                if (operation.getResponses() == null) {\n                    operation.setResponses(responses);\n                } else {\n                    responses.forEach(operation.getResponses()::addApiResponse);\n                }\n            });\n        }\n\n        // class tags after tags defined as field of @Operation\n        if (classTags != null) {\n            classTags.stream()\n                    .filter(t -> operation.getTags() == null || (operation.getTags() != null && !operation.getTags().contains(t)))\n                    .forEach(operation::addTagsItem);\n        }\n\n        // external docs of class if not defined in annotation of method or as field of Operation annotation\n        if (operation.getExternalDocs() == null) {\n            classExternalDocs.ifPresent(operation::setExternalDocs);\n        }\n\n        // if subresource, merge parent requestBody\n        if (isSubresource && parentRequestBody != null) {\n            if (operation.getRequestBody() == null) {\n                operation.requestBody(parentRequestBody);\n            } else {\n                Content content = operation.getRequestBody().getContent();\n                if (content == null) {\n                    content = parentRequestBody.getContent();\n                    operation.getRequestBody().setContent(content);\n                } else if (parentRequestBody.getContent() != null){\n                    for (String parentMediaType: parentRequestBody.getContent().keySet()) {\n                        if (content.get(parentMediaType) == null) {\n                            content.addMediaType(parentMediaType, parentRequestBody.getContent().get(parentMediaType));\n                        }\n                    }\n                }\n            }\n        }\n\n        // handle return type, add as response in case.\n        Type returnType = method.getGenericReturnType();\n\n        if (annotatedMethod != null && annotatedMethod.getType() != null) {\n            returnType = extractTypeFromMethod(annotatedMethod);\n        }\n\n        final Class<?> subResource = getSubResourceWithJaxRsSubresourceLocatorSpecs(method);\n        Schema returnTypeSchema = null;\n        if (!shouldIgnoreClass(returnType.getTypeName()) && !method.getGenericReturnType().equals(subResource)) {\n            ResolvedSchema resolvedSchema = ModelConverters.getInstance(config.toConfiguration()).resolveAsResolvedSchema(new AnnotatedType(returnType).resolveAsRef(true).jsonViewAnnotation(jsonViewAnnotation).components(components));\n            if (resolvedSchema.schema != null) {\n                returnTypeSchema = resolvedSchema.schema;\n                Content content = new Content();\n                MediaType mediaType = new MediaType().schema(returnTypeSchema);\n                AnnotationsUtils.applyTypes(classProduces == null ? new String[0] : classProduces.value(),\n                        methodProduces == null ? new String[0] : methodProduces.value(), content, mediaType);\n                if (operation.getResponses() == null) {\n                    operation.responses(\n                            new ApiResponses().addApiResponse(defaultResponseKey,\n                                    new ApiResponse().description(DEFAULT_DESCRIPTION)\n                                            .content(content)\n                            )\n                    );\n                }\n                if (operation.getResponses().get(defaultResponseKey) != null &&\n                        StringUtils.isBlank(operation.getResponses().get(defaultResponseKey).get$ref())) {\n                    if (operation.getResponses().get(defaultResponseKey).getContent() == null) {\n                        operation.getResponses().get(defaultResponseKey).content(content);\n                    } else {\n                        for (String key : operation.getResponses().get(defaultResponseKey).getContent().keySet()) {\n                            if (operation.getResponses().get(defaultResponseKey).getContent().get(key).getSchema() == null) {\n                                operation.getResponses().get(defaultResponseKey).getContent().get(key).setSchema(returnTypeSchema);\n                            }\n                        }\n                    }\n                }\n                Map<String, Schema> schemaMap = resolvedSchema.referencedSchemas;\n                if (schemaMap != null) {\n                    schemaMap.forEach((key, schema) -> components.addSchemas(key, schema));\n                }\n\n            }\n        }\n        if (operation.getResponses() == null || operation.getResponses().isEmpty()) {\n            Content content = resolveEmptyContent(classProduces, methodProduces);\n\n            ApiResponse apiResponseObject = new ApiResponse().description(DEFAULT_DESCRIPTION).content(content);\n            operation.setResponses(new ApiResponses().addApiResponse(defaultResponseKey, apiResponseObject));\n        }\n        if (returnTypeSchema != null) {\n            resolveResponseSchemaFromReturnType(operation, classResponses, returnTypeSchema, classProduces, methodProduces);\n            if (apiResponses != null) {\n                resolveResponseSchemaFromReturnType(\n                        operation,\n                    apiResponses.toArray(\n                        new io.swagger.v3.oas.annotations.responses.ApiResponse[0]),\n                        returnTypeSchema,\n                        classProduces,\n                        methodProduces);\n            } else if (operationApiResponses != null && operationApiResponses.length > 0) {\n                resolveResponseSchemaFromReturnType(\n                        operation,\n                        operationApiResponses,\n                        returnTypeSchema,\n                        classProduces,\n                        methodProduces);\n            }\n        }\n\n\n        return operation;\n    }\n\n    private Type extractTypeFromMethod(AnnotatedMethod annotatedMethod) {\n        if(CompletionStage.class.isAssignableFrom(annotatedMethod.getType().getRawClass())) {\n            // CompletionStage's 1st generic type is the real return type.\n            return annotatedMethod.getType().getBindings().getBoundType(0);\n        }\n        return annotatedMethod.getType();\n    }\n\n    protected Content resolveEmptyContent(Produces classProduces, Produces methodProduces) {\n        Content content = new Content();\n        MediaType mediaType = new MediaType();\n        AnnotationsUtils.applyTypes(classProduces == null ? new String[0] : classProduces.value(),\n                methodProduces == null ? new String[0] : methodProduces.value(), content, mediaType);\n        return content;\n    }\n\n    private MediaType clone(MediaType mediaType) {\n        if(mediaType == null)\n            return mediaType;\n        try {\n            if(config.isOpenAPI31()) {\n                mediaType = Json31.mapper().readValue(Json31.pretty(mediaType), MediaType.class);\n            } else {\n                mediaType = Json.mapper().readValue(Json.pretty(mediaType), MediaType.class);\n            }\n        } catch (IOException e) {\n            LOGGER.error(\"Could not clone mediaType\", e);\n        }\n        return mediaType;\n    }\n    private Schema<?> clone(Schema<?> schema) {\n        return AnnotationsUtils.clone(schema, config.isOpenAPI31());\n    }\n\n    protected void resolveResponseSchemaFromReturnType(\n            Operation operation,\n            io.swagger.v3.oas.annotations.responses.ApiResponse[] responses,\n            Schema<?> schema,\n            Produces classProduces, Produces methodProduces) {\n        if (responses != null) {\n            for (io.swagger.v3.oas.annotations.responses.ApiResponse response: responses) {\n                Map<String, MediaType> reresolvedMediaTypes = new LinkedHashMap<>();\n                if (response.useReturnTypeSchema()) {\n                    ApiResponse opResponse = operation.getResponses().get(response.responseCode());\n                    if (opResponse != null) {\n                        if (opResponse.getContent() != null) {\n                            for (String key : opResponse.getContent().keySet()) {\n                                MediaType mediaType = clone(opResponse.getContent().get(key));\n                                Schema<?> existingSchema = clone(schema);\n                                Optional<io.swagger.v3.oas.annotations.media.Content> content = Arrays.stream(response.content()).filter(c -> c.mediaType().equals(key)).findFirst();\n                                if (content.isPresent()) {\n                                    Optional<Schema> reResolvedSchema = AnnotationsUtils.getSchemaFromAnnotation(content.get().schema(), components, null, config.isOpenAPI31(), existingSchema);\n                                    if (reResolvedSchema.isPresent()) {\n                                        existingSchema = reResolvedSchema.get();\n                                    }\n                                    reResolvedSchema = AnnotationsUtils.getArraySchema(content.get().array(), components, null, config.isOpenAPI31(), existingSchema);\n                                    if (reResolvedSchema.isPresent()) {\n                                        existingSchema = reResolvedSchema.get();\n                                    }\n                                }\n                                mediaType.schema(existingSchema);\n                                reresolvedMediaTypes.put(key, mediaType);\n                            }\n                        } else {\n                            Content content = resolveEmptyContent(classProduces, methodProduces);\n                            for (MediaType mediaType : content.values()) {\n                                mediaType.schema(schema);\n                            }\n                            opResponse.content(content);\n                        }\n                        opResponse.getContent().putAll(reresolvedMediaTypes);\n                    }\n                }\n            }\n        }\n    }\n\n    private boolean shouldIgnoreClass(String className) {\n        if (StringUtils.isBlank(className)) {\n            return true;\n        }\n        boolean ignore = false;\n        String rawClassName = className;\n        if (rawClassName.startsWith(\"[\")) { // jackson JavaType\n            rawClassName = className.replace(\"[simple type, class \", \"\");\n            rawClassName = rawClassName.substring(0, rawClassName.length() -1);\n        }\n        ignore = rawClassName.startsWith(\"javax.ws.rs.\");\n        ignore = ignore || rawClassName.equalsIgnoreCase(\"void\");\n        ignore = ignore || ModelConverters.getInstance(config.toConfiguration()).isRegisteredAsSkippedClass(rawClassName);\n        return ignore;\n    }\n\n    private Map<String, Callback> getCallbacks(\n            io.swagger.v3.oas.annotations.callbacks.Callback apiCallback,\n            Produces methodProduces,\n            Produces classProduces,\n            Consumes methodConsumes,\n            Consumes classConsumes,\n            JsonView jsonViewAnnotation) {\n        Map<String, Callback> callbackMap = new HashMap<>();\n        if (apiCallback == null) {\n            return callbackMap;\n        }\n\n        Callback callbackObject = new Callback();\n        if (StringUtils.isNotBlank(apiCallback.ref())) {\n            callbackObject.set$ref(apiCallback.ref());\n            callbackMap.put(apiCallback.name(), callbackObject);\n            return callbackMap;\n        }\n        PathItem pathItemObject = new PathItem();\n        for (io.swagger.v3.oas.annotations.Operation callbackOperation : apiCallback.operation()) {\n            Operation callbackNewOperation = new Operation();\n            setOperationObjectFromApiOperationAnnotation(\n                    callbackNewOperation,\n                    callbackOperation,\n                    methodProduces,\n                    classProduces,\n                    methodConsumes,\n                    classConsumes,\n                    jsonViewAnnotation);\n            setPathItemOperation(pathItemObject, callbackOperation.method(), callbackNewOperation);\n        }\n\n        callbackObject.addPathItem(apiCallback.callbackUrlExpression(), pathItemObject);\n        callbackMap.put(apiCallback.name(), callbackObject);\n\n        return callbackMap;\n    }\n\n    private void setPathItemOperation(PathItem pathItemObject, String method, Operation operation) {\n        switch (method) {\n            case POST_METHOD:\n                pathItemObject.post(operation);\n                break;\n            case GET_METHOD:\n                pathItemObject.get(operation);\n                break;\n            case DELETE_METHOD:\n                pathItemObject.delete(operation);\n                break;\n            case PUT_METHOD:\n                pathItemObject.put(operation);\n                break;\n            case PATCH_METHOD:\n                pathItemObject.patch(operation);\n                break;\n            case TRACE_METHOD:\n                pathItemObject.trace(operation);\n                break;\n            case HEAD_METHOD:\n                pathItemObject.head(operation);\n                break;\n            case OPTIONS_METHOD:\n                pathItemObject.options(operation);\n                break;\n            default:\n                // Do nothing here\n                break;\n        }\n    }\n\n    protected void setOperationObjectFromApiOperationAnnotation(\n            Operation operation,\n            io.swagger.v3.oas.annotations.Operation apiOperation,\n            Produces methodProduces,\n            Produces classProduces,\n            Consumes methodConsumes,\n            Consumes classConsumes,\n            JsonView jsonViewAnnotation) {\n        if (StringUtils.isNotBlank(apiOperation.summary())) {\n            operation.setSummary(apiOperation.summary());\n        }\n        if (StringUtils.isNotBlank(apiOperation.description())) {\n            operation.setDescription(apiOperation.description());\n        }\n        if (StringUtils.isNotBlank(apiOperation.operationId())) {\n            operation.setOperationId(getOperationId(apiOperation.operationId()));\n        }\n        if (apiOperation.deprecated()) {\n            operation.setDeprecated(apiOperation.deprecated());\n        }\n\n        final boolean openapi31 = Boolean.TRUE.equals(config.isOpenAPI31());\n\n        ReaderUtils.getStringListFromStringArray(apiOperation.tags()).ifPresent(tags ->\n            tags.stream()\n                    .filter(t -> operation.getTags() == null || (operation.getTags() != null && !operation.getTags().contains(t)))\n                    .forEach(operation::addTagsItem));\n\n        if (operation.getExternalDocs() == null) { // if not set in root annotation\n            AnnotationsUtils.getExternalDocumentation(apiOperation.externalDocs(), openapi31).ifPresent(operation::setExternalDocs);\n        }\n\n        OperationParser.getApiResponses(apiOperation.responses(), classProduces, methodProduces, components, jsonViewAnnotation, openapi31, defaultResponseKey).ifPresent(responses -> {\n            if (operation.getResponses() == null) {\n                operation.setResponses(responses);\n            } else {\n                responses.forEach(operation.getResponses()::addApiResponse);\n            }\n        });\n        AnnotationsUtils.getServers(apiOperation.servers()).ifPresent(servers -> servers.forEach(operation::addServersItem));\n\n        getParametersListFromAnnotation(\n                apiOperation.parameters(),\n                classConsumes,\n                methodConsumes,\n                operation,\n                jsonViewAnnotation).ifPresent(p -> p.forEach(operation::addParametersItem));\n\n        // security\n        Optional<List<SecurityRequirement>> requirementsObject = SecurityParser.getSecurityRequirements(apiOperation.security());\n        if (requirementsObject.isPresent()) {\n            requirementsObject.get().stream()\n                    .filter(r -> operation.getSecurity() == null || !operation.getSecurity().contains(r))\n                    .forEach(operation::addSecurityItem);\n        }\n\n        // RequestBody in Operation\n        if (apiOperation.requestBody() != null && operation.getRequestBody() == null) {\n            OperationParser.getRequestBody(apiOperation.requestBody(), classConsumes, methodConsumes, components, jsonViewAnnotation, config.isOpenAPI31()).ifPresent(\n                    operation::setRequestBody);\n        }\n\n        // Extensions in Operation\n        if (apiOperation.extensions().length > 0) {\n            Map<String, Object> extensions = AnnotationsUtils.getExtensions(openapi31, apiOperation.extensions());\n            if (extensions != null) {\n                if (openapi31) {\n                    extensions.forEach(operation::addExtension31);\n                } else {\n                    extensions.forEach(operation::addExtension);\n                }\n            }\n        }\n    }\n\n    protected String getOperationId(String operationId) {\n        boolean operationIdUsed = existOperationId(operationId);\n        String operationIdToFind = null;\n        int counter = 0;\n        while (operationIdUsed) {\n            operationIdToFind = String.format(\"%s_%d\", operationId, ++counter);\n            operationIdUsed = existOperationId(operationIdToFind);\n        }\n        if (operationIdToFind != null) {\n            operationId = operationIdToFind;\n        }\n        return operationId;\n    }\n\n    private boolean existOperationId(String operationId) {\n        if (openAPI == null) {\n            return false;\n        }\n        if (openAPI.getPaths() == null || openAPI.getPaths().isEmpty()) {\n            return false;\n        }\n        for (PathItem path : openAPI.getPaths().values()) {\n            Set<String> pathOperationIds = extractOperationIdFromPathItem(path);\n            if (pathOperationIds.contains(operationId)) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    protected Optional<List<Parameter>> getParametersListFromAnnotation(io.swagger.v3.oas.annotations.Parameter[] parameters, Consumes classConsumes, Consumes methodConsumes, Operation operation, JsonView jsonViewAnnotation) {\n        if (parameters == null) {\n            return Optional.empty();\n        }\n        List<Parameter> parametersObject = new ArrayList<>();\n        for (io.swagger.v3.oas.annotations.Parameter parameter : parameters) {\n\n            ResolvedParameter resolvedParameter = getParameters(ParameterProcessor.getParameterType(parameter), Collections.singletonList(parameter), operation, classConsumes, methodConsumes, jsonViewAnnotation);\n            parametersObject.addAll(resolvedParameter.parameters);\n        }\n        if (parametersObject.isEmpty()) {\n            return Optional.empty();\n        }\n        return Optional.of(parametersObject);\n    }\n\n    protected ResolvedParameter getParameters(Type type, List<Annotation> annotations, Operation operation, javax.ws.rs.Consumes classConsumes,\n                                              javax.ws.rs.Consumes methodConsumes, JsonView jsonViewAnnotation) {\n        final Iterator<OpenAPIExtension> chain = OpenAPIExtensions.chain();\n        if (!chain.hasNext()) {\n            return new ResolvedParameter();\n        }\n        LOGGER.debug(\"getParameters for {}\", type);\n        Set<Type> typesToSkip = new HashSet<>();\n        final OpenAPIExtension extension = chain.next();\n        LOGGER.debug(\"trying extension {}\", extension);\n\n        Schema.SchemaResolution curSchemaResolution = config.getSchemaResolution();\n        extension.setConfiguration(config.toConfiguration());\n        ResolvedParameter resolvedParameter = extension.extractParameters(annotations, type, typesToSkip, components, classConsumes, methodConsumes, true, jsonViewAnnotation, chain);\n        ((SwaggerConfiguration)config).setSchemaResolution(curSchemaResolution);\n        return resolvedParameter;\n    }\n\n    private Set<String> extractOperationIdFromPathItem(PathItem path) {\n        Set<String> ids = new HashSet<>();\n        if (path.getGet() != null && StringUtils.isNotBlank(path.getGet().getOperationId())) {\n            ids.add(path.getGet().getOperationId());\n        }\n        if (path.getPost() != null && StringUtils.isNotBlank(path.getPost().getOperationId())) {\n            ids.add(path.getPost().getOperationId());\n        }\n        if (path.getPut() != null && StringUtils.isNotBlank(path.getPut().getOperationId())) {\n            ids.add(path.getPut().getOperationId());\n        }\n        if (path.getDelete() != null && StringUtils.isNotBlank(path.getDelete().getOperationId())) {\n            ids.add(path.getDelete().getOperationId());\n        }\n        if (path.getOptions() != null && StringUtils.isNotBlank(path.getOptions().getOperationId())) {\n            ids.add(path.getOptions().getOperationId());\n        }\n        if (path.getHead() != null && StringUtils.isNotBlank(path.getHead().getOperationId())) {\n            ids.add(path.getHead().getOperationId());\n        }\n        if (path.getPatch() != null && StringUtils.isNotBlank(path.getPatch().getOperationId())) {\n            ids.add(path.getPatch().getOperationId());\n        }\n        return ids;\n    }\n\n    private boolean isEmptyComponents(Components components) {\n        if (components == null) {\n            return true;\n        }\n        if (components.getSchemas() != null && !components.getSchemas().isEmpty()) {\n            return false;\n        }\n        if (components.getSecuritySchemes() != null && !components.getSecuritySchemes().isEmpty()) {\n            return false;\n        }\n        if (components.getCallbacks() != null && !components.getCallbacks().isEmpty()) {\n            return false;\n        }\n        if (components.getExamples() != null && !components.getExamples().isEmpty()) {\n            return false;\n        }\n        if (components.getExtensions() != null && !components.getExtensions().isEmpty()) {\n            return false;\n        }\n        if (components.getHeaders() != null && !components.getHeaders().isEmpty()) {\n            return false;\n        }\n        if (components.getLinks() != null && !components.getLinks().isEmpty()) {\n            return false;\n        }\n        if (components.getParameters() != null && !components.getParameters().isEmpty()) {\n            return false;\n        }\n        if (components.getRequestBodies() != null && !components.getRequestBodies().isEmpty()) {\n            return false;\n        }\n        if (components.getResponses() != null && !components.getResponses().isEmpty()) {\n            return false;\n        }\n        if (components.getPathItems() != null && !components.getPathItems().isEmpty()) {\n            return false;\n        }\n\n        return true;\n    }\n\n    protected boolean isOperationHidden(Method method) {\n        io.swagger.v3.oas.annotations.Operation apiOperation = ReflectionUtils.getAnnotation(method, io.swagger.v3.oas.annotations.Operation.class);\n        if (apiOperation != null && apiOperation.hidden()) {\n            return true;\n        }\n        Hidden hidden = method.getAnnotation(Hidden.class);\n        if (hidden != null) {\n            return true;\n        }\n        if (config != null && !Boolean.TRUE.equals(config.isReadAllResources()) && apiOperation == null) {\n            return true;\n        }\n        return false;\n    }\n\n    protected boolean isMethodOverridden(Method method, Class<?> cls) {\n        return ReflectionUtils.isOverriddenMethod(method, cls);\n    }\n\n    public void setApplication(Application application) {\n        this.application = application;\n    }\n\n    /* Since 2.1.8 does nothing, as previous implementation maintained for ref in\n        `ignoreOperationPathStrict` was ignoring resources which would be ignored\n        due to other checks in Reader class.\n     */\n    protected boolean ignoreOperationPath(String path, String parentPath) {\n        return false;\n    }\n\n    protected boolean ignoreOperationPathStrict(String path, String parentPath) {\n\n        if (StringUtils.isBlank(path) && StringUtils.isBlank(parentPath)) {\n            return true;\n        } else if (StringUtils.isNotBlank(path) && StringUtils.isBlank(parentPath)) {\n            return false;\n        } else if (StringUtils.isBlank(path) && StringUtils.isNotBlank(parentPath)) {\n            return false;\n        }\n        if (parentPath != null && !parentPath.isEmpty() && !\"/\".equals(parentPath)) {\n            if (!parentPath.startsWith(\"/\")) {\n                parentPath = \"/\" + parentPath;\n            }\n            if (parentPath.endsWith(\"/\")) {\n                parentPath = parentPath.substring(0, parentPath.length() - 1);\n            }\n        }\n        if (path != null && !path.isEmpty() && !\"/\".equals(path)) {\n            if (!path.startsWith(\"/\")) {\n                path = \"/\" + path;\n            }\n            if (path.endsWith(\"/\")) {\n                path = path.substring(0, path.length() - 1);\n            }\n        }\n        return path.equals(parentPath);\n    }\n\n    protected Class<?> getSubResourceWithJaxRsSubresourceLocatorSpecs(Method method) {\n        final Class<?> rawType = method.getReturnType();\n        final Class<?> type;\n        if (Class.class.equals(rawType)) {\n            type = getClassArgument(method.getGenericReturnType());\n            if (type == null) {\n                return null;\n            }\n        } else {\n            type = rawType;\n        }\n\n        if (method.getAnnotation(javax.ws.rs.Path.class) != null) {\n            if (ReaderUtils.extractOperationMethod(method, null) == null) {\n                return type;\n            }\n        }\n        return null;\n    }\n\n    private static Class<?> getClassArgument(Type cls) {\n        if (cls instanceof ParameterizedType) {\n            final ParameterizedType parameterized = (ParameterizedType) cls;\n            final Type[] args = parameterized.getActualTypeArguments();\n            if (args.length != 1) {\n                LOGGER.error(\"Unexpected class definition: {}\", cls);\n                return null;\n            }\n            final Type first = args[0];\n            if (first instanceof Class) {\n                return (Class<?>) first;\n            } else {\n                return null;\n            }\n        } else {\n            LOGGER.error(\"Unknown class definition: {}\", cls);\n            return null;\n        }\n    }\n\n    /**\n     * Comparator for uniquely sorting a collection of Method objects.\n     * Supports overloaded methods (with the same name).\n     *\n     * @see Method\n     */\n    private static class MethodComparator implements Comparator<Method> {\n\n        @Override\n        public int compare(Method m1, Method m2) {\n            // First compare the names of the method\n            int val = m1.getName().compareTo(m2.getName());\n\n            // If the names are equal, compare each argument type\n            if (val == 0) {\n                val = m1.getParameterTypes().length - m2.getParameterTypes().length;\n                if (val == 0) {\n                    Class<?>[] types1 = m1.getParameterTypes();\n                    Class<?>[] types2 = m2.getParameterTypes();\n                    for (int i = 0; i < types1.length; i++) {\n                        val = types1[i].getName().compareTo(types2[i].getName());\n\n                        if (val != 0) {\n                            break;\n                        }\n                    }\n                }\n            }\n            return val;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/ReaderListener.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.oas.integration.api.OpenApiReader;\nimport io.swagger.v3.oas.models.OpenAPI;\n\n/**\n * Listener providing hooks for customizing automatically generated OpenAPI definitions in a JAX-RS\n * environment. Any classes picked up during the scanning process implementing this interface will\n * be instantiated via newInstance() and invoked before and after generating OpenAPI definitions, allowing\n * code to add additional data or change the generated definition.\n */\n\npublic interface ReaderListener {\n\n    /**\n     * Called before the OpenAPI definition gets populated from scanned classes. Use this method to\n     * pre-process the OpenAPI definition before it gets populated.\n     *\n     * @param reader  the reader used to read annotations and build the openAPI definition\n     * @param openAPI the initial OpenAPI definition\n     */\n\n    void beforeScan(OpenApiReader reader, OpenAPI openAPI);\n\n    /**\n     * Called after a OpenAPI definition has been populated from scanned classes. Use this method to\n     * post-process OpenAPI definitions.\n     *\n     * @param reader  the reader used to read annotations and build the OpenAPI definition\n     * @param openAPI the configured OpenAPI definition\n     */\n\n    void afterScan(OpenApiReader reader, OpenAPI openAPI);\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/ResolvedParameter.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.oas.models.parameters.Parameter;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class ResolvedParameter {\n    public List<Parameter> parameters = new ArrayList<>();\n    public Parameter requestBody;\n    public List<Parameter> formParameters = new ArrayList<>();\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/SecurityParser.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.core.util.AnnotationsUtils;\nimport io.swagger.v3.oas.annotations.security.OAuthScope;\nimport io.swagger.v3.oas.models.security.OAuthFlow;\nimport io.swagger.v3.oas.models.security.OAuthFlows;\nimport io.swagger.v3.oas.models.security.Scopes;\nimport io.swagger.v3.oas.models.security.SecurityRequirement;\nimport io.swagger.v3.oas.models.security.SecurityScheme;\nimport org.apache.commons.lang3.StringUtils;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\npublic class SecurityParser {\n\n    public static class SecuritySchemePair {\n        public String key;\n        public SecurityScheme securityScheme;\n    }\n\n    public static Optional<List<SecurityRequirement>> getSecurityRequirements(io.swagger.v3.oas.annotations.security.SecurityRequirement[] securityRequirementsApi) {\n        if (securityRequirementsApi == null || securityRequirementsApi.length == 0) {\n            return Optional.empty();\n        }\n        List<SecurityRequirement> securityRequirements = new ArrayList<>();\n        for (io.swagger.v3.oas.annotations.security.SecurityRequirement securityRequirementApi : securityRequirementsApi) {\n            SecurityRequirement securityRequirement = new SecurityRequirement();\n            if (securityRequirementApi.combine().length > 0) {\n                for (io.swagger.v3.oas.annotations.security.SecurityRequirementEntry entry : securityRequirementApi.combine()) {\n                    if (StringUtils.isBlank(entry.name())) {\n                        continue;\n                    }\n                    if (entry.scopes().length > 0) {\n                        securityRequirement.addList(entry.name(), Arrays.asList(entry.scopes()));\n                    } else {\n                        securityRequirement.addList(entry.name());\n                    }\n                }\n            }\n            else {\n                if (StringUtils.isBlank(securityRequirementApi.name())) {\n                    continue;\n                }\n                if (securityRequirementApi.scopes().length > 0) {\n                    securityRequirement.addList(securityRequirementApi.name(), Arrays.asList(securityRequirementApi.scopes()));\n                } else {\n                    securityRequirement.addList(securityRequirementApi.name());\n                }\n            }\n            securityRequirements.add(securityRequirement);\n        }\n        if (securityRequirements.isEmpty()) {\n            return Optional.empty();\n        }\n        return Optional.of(securityRequirements);\n    }\n\n    public static Optional<SecuritySchemePair> getSecurityScheme(io.swagger.v3.oas.annotations.security.SecurityScheme securityScheme) {\n        if (securityScheme == null) {\n            return Optional.empty();\n        }\n        String key = null;\n        SecurityScheme securitySchemeObject = new SecurityScheme();\n\n        if (StringUtils.isNotBlank(securityScheme.in().toString())) {\n            securitySchemeObject.setIn(getIn(securityScheme.in().toString()));\n        }\n        if (StringUtils.isNotBlank(securityScheme.type().toString())) {\n            securitySchemeObject.setType(getType(securityScheme.type().toString()));\n        }\n\n        if (StringUtils.isNotBlank(securityScheme.openIdConnectUrl())) {\n            securitySchemeObject.setOpenIdConnectUrl(securityScheme.openIdConnectUrl());\n        }\n        if (StringUtils.isNotBlank(securityScheme.scheme())) {\n            securitySchemeObject.setScheme(securityScheme.scheme());\n        }\n\n        if (StringUtils.isNotBlank(securityScheme.bearerFormat())) {\n            securitySchemeObject.setBearerFormat(securityScheme.bearerFormat());\n        }\n        if (StringUtils.isNotBlank(securityScheme.description())) {\n            securitySchemeObject.setDescription(securityScheme.description());\n        }\n        if (StringUtils.isNotBlank(securityScheme.paramName())) {\n            securitySchemeObject.setName(securityScheme.paramName());\n        }\n        if (StringUtils.isNotBlank(securityScheme.ref())) {\n            securitySchemeObject.set$ref(securityScheme.ref());\n        }\n        if (StringUtils.isNotBlank(securityScheme.name())) {\n            key = securityScheme.name();\n        }\n\n        if (securityScheme.extensions().length > 0) {\n            Map<String, Object> extensions = AnnotationsUtils.getExtensions(securityScheme.extensions());\n            if (extensions != null) {\n                extensions.forEach(securitySchemeObject::addExtension);\n            }\n        }\n\n        getOAuthFlows(securityScheme.flows()).ifPresent(securitySchemeObject::setFlows);\n\n        SecuritySchemePair result = new SecuritySchemePair();\n        result.key = key;\n        result.securityScheme = securitySchemeObject;\n        return Optional.of(result);\n    }\n\n    public static Optional<OAuthFlows> getOAuthFlows(io.swagger.v3.oas.annotations.security.OAuthFlows oAuthFlows) {\n        if (isEmpty(oAuthFlows)) {\n            return Optional.empty();\n        }\n        OAuthFlows oAuthFlowsObject = new OAuthFlows();\n        if (oAuthFlows.extensions().length > 0) {\n            Map<String, Object> extensions = AnnotationsUtils.getExtensions(oAuthFlows.extensions());\n            if (extensions != null) {\n                extensions.forEach(oAuthFlowsObject::addExtension);\n            }\n        }\n\n        getOAuthFlow(oAuthFlows.authorizationCode()).ifPresent(oAuthFlowsObject::setAuthorizationCode);\n        getOAuthFlow(oAuthFlows.clientCredentials()).ifPresent(oAuthFlowsObject::setClientCredentials);\n        getOAuthFlow(oAuthFlows.implicit()).ifPresent(oAuthFlowsObject::setImplicit);\n        getOAuthFlow(oAuthFlows.password()).ifPresent(oAuthFlowsObject::setPassword);\n        return Optional.of(oAuthFlowsObject);\n    }\n\n    public static Optional<OAuthFlow> getOAuthFlow(io.swagger.v3.oas.annotations.security.OAuthFlow oAuthFlow) {\n        if (isEmpty(oAuthFlow)) {\n            return Optional.empty();\n        }\n        OAuthFlow oAuthFlowObject = new OAuthFlow();\n        if (StringUtils.isNotBlank(oAuthFlow.authorizationUrl())) {\n            oAuthFlowObject.setAuthorizationUrl(oAuthFlow.authorizationUrl());\n        }\n        if (StringUtils.isNotBlank(oAuthFlow.refreshUrl())) {\n            oAuthFlowObject.setRefreshUrl(oAuthFlow.refreshUrl());\n        }\n        if (StringUtils.isNotBlank(oAuthFlow.tokenUrl())) {\n            oAuthFlowObject.setTokenUrl(oAuthFlow.tokenUrl());\n        }\n        if (oAuthFlow.extensions().length > 0) {\n            Map<String, Object> extensions = AnnotationsUtils.getExtensions(oAuthFlow.extensions());\n            if (extensions != null) {\n                extensions.forEach(oAuthFlowObject::addExtension);\n            }\n        }\n\n        getScopes(oAuthFlow.scopes()).ifPresent(oAuthFlowObject::setScopes);\n        return Optional.of(oAuthFlowObject);\n    }\n\n    public static Optional<Scopes> getScopes(OAuthScope[] scopes) {\n        if (isEmpty(scopes)) {\n            return Optional.empty();\n        }\n        Scopes scopesObject = new Scopes();\n\n        for (OAuthScope scope : scopes) {\n            scopesObject.addString(scope.name(), scope.description());\n        }\n        return Optional.of(scopesObject);\n    }\n\n    private static SecurityScheme.In getIn(String value) {\n        return Arrays.stream(SecurityScheme.In.values()).filter(i -> i.toString().equals(value)).findFirst().orElse(null);\n    }\n\n    private static SecurityScheme.Type getType(String value) {\n        return Arrays.stream(SecurityScheme.Type.values()).filter(i -> i.toString().equals(value)).findFirst().orElse(null);\n    }\n\n    private static boolean isEmpty(io.swagger.v3.oas.annotations.security.OAuthFlows oAuthFlows) {\n        if (oAuthFlows == null) {\n            return true;\n        }\n        if (!isEmpty(oAuthFlows.implicit())) {\n            return false;\n        }\n        if (!isEmpty(oAuthFlows.authorizationCode())) {\n            return false;\n        }\n        if (!isEmpty(oAuthFlows.clientCredentials())) {\n            return false;\n        }\n        if (!isEmpty(oAuthFlows.password())) {\n            return false;\n        }\n        return oAuthFlows.extensions().length == 0;\n    }\n\n    private static boolean isEmpty(io.swagger.v3.oas.annotations.security.OAuthFlow oAuthFlow) {\n        if (oAuthFlow == null) {\n            return true;\n        }\n        if (!StringUtils.isBlank(oAuthFlow.authorizationUrl())) {\n            return false;\n        }\n        if (!StringUtils.isBlank(oAuthFlow.refreshUrl())) {\n            return false;\n        }\n        if (!StringUtils.isBlank(oAuthFlow.tokenUrl())) {\n            return false;\n        }\n        if (!isEmpty(oAuthFlow.scopes())) {\n            return false;\n        }\n        return oAuthFlow.extensions().length == 0;\n    }\n\n    private static boolean isEmpty(OAuthScope[] scopes) {\n        return scopes == null || scopes.length == 0;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/SwaggerSerializers.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.core.util.Yaml31;\nimport io.swagger.v3.oas.models.OpenAPI;\n\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.MultivaluedMap;\nimport javax.ws.rs.ext.MessageBodyWriter;\nimport javax.ws.rs.ext.Provider;\nimport java.io.IOException;\nimport java.io.OutputStream;\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Type;\n\n@Provider\n@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, \"application/yaml\"})\npublic class SwaggerSerializers implements MessageBodyWriter<OpenAPI> {\n    static boolean prettyPrint = false;\n    static boolean openapi31 = false;\n\n    public static void setPrettyPrint(boolean shouldPrettyPrint) {\n        SwaggerSerializers.prettyPrint = shouldPrettyPrint;\n    }\n\n    public static void setOpenapi31(boolean openapi31) {\n        SwaggerSerializers.openapi31 = openapi31;\n    }\n\n    @Override\n    public boolean isWriteable(Class type, Type genericType, Annotation[] annotations,\n                               MediaType mediaType) {\n        return OpenAPI.class.isAssignableFrom(type);\n    }\n\n    @Override\n    public long getSize(OpenAPI data, Class type, Type genericType, Annotation[] annotations, MediaType mediaType) {\n        return -1L;\n    }\n\n    @Override\n    public void writeTo(OpenAPI data,\n                        Class<?> type,\n                        Type genericType,\n                        Annotation[] annotations,\n                        MediaType mediaType,\n                        MultivaluedMap<String, Object> headers,\n                        OutputStream out) throws IOException {\n        if (mediaType.isCompatible(MediaType.APPLICATION_JSON_TYPE)) {\n            if (prettyPrint) {\n                if (openapi31) {\n                    out.write(Json31.pretty().writeValueAsBytes(data));\n                } else {\n                    out.write(Json.pretty().writeValueAsBytes(data));\n                }\n            } else {\n                if (openapi31) {\n                    out.write(Json31.mapper().writeValueAsBytes(data));\n                } else {\n                    out.write(Json.mapper().writeValueAsBytes(data));\n                }\n            }\n        } else if (mediaType.toString().startsWith(\"application/yaml\")) {\n            headers.remove(\"Content-Type\");\n            headers.add(\"Content-Type\", \"application/yaml\");\n            if (prettyPrint) {\n                if (openapi31) {\n                    out.write(Yaml31.pretty().writeValueAsBytes(data));\n                } else {\n                    out.write(Yaml.pretty().writeValueAsBytes(data));\n                }\n            } else {\n                if (openapi31) {\n                    out.write(Yaml31.mapper().writeValueAsBytes(data));\n                } else {\n                    out.write(Yaml.mapper().writeValueAsBytes(data));\n                }\n            }\n        } else if (mediaType.isCompatible(MediaType.APPLICATION_XML_TYPE)) {\n            headers.remove(\"Content-Type\");\n            headers.add(\"Content-Type\", MediaType.APPLICATION_JSON);\n            if (prettyPrint) {\n                if (openapi31) {\n                    out.write(Json31.pretty().writeValueAsBytes(data));\n                } else {\n                    out.write(Json.pretty().writeValueAsBytes(data));\n                }\n            } else {\n                if (openapi31) {\n                    out.write(Json31.mapper().writeValueAsBytes(data));\n                } else {\n                    out.write(Json.mapper().writeValueAsBytes(data));\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/ext/AbstractOpenAPIExtension.java",
    "content": "package io.swagger.v3.jaxrs2.ext;\n\nimport com.fasterxml.jackson.annotation.JsonView;\nimport com.fasterxml.jackson.databind.JavaType;\nimport com.fasterxml.jackson.databind.type.TypeFactory;\nimport io.swagger.v3.core.util.Configuration;\nimport io.swagger.v3.jaxrs2.ResolvedParameter;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Method;\nimport java.lang.reflect.Type;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Set;\n\npublic abstract class AbstractOpenAPIExtension implements OpenAPIExtension {\n\n    protected boolean openapi31;\n    protected Schema.SchemaResolution schemaResolution;\n    protected Configuration configuration = new Configuration();\n\n    @Override\n    public String extractOperationMethod(Method method, Iterator<OpenAPIExtension> chain) {\n        if (chain.hasNext()) {\n            return chain.next().extractOperationMethod(method, chain);\n        } else {\n            return null;\n        }\n    }\n\n    @Override\n    public ResolvedParameter extractParameters(List<Annotation> annotations, Type type, Set<Type> typesToSkip,\n                                               Components components, javax.ws.rs.Consumes classConsumes,\n                                               javax.ws.rs.Consumes methodConsumes, boolean includeRequestBody, JsonView jsonViewAnnotation, Iterator<OpenAPIExtension> chain) {\n        if (chain.hasNext()) {\n            return chain.next().extractParameters(annotations, type, typesToSkip, components, classConsumes, methodConsumes, includeRequestBody, jsonViewAnnotation, chain);\n        } else {\n            return new ResolvedParameter();\n        }\n    }\n\n    @Override\n    public void decorateOperation(Operation operation, Method method, Iterator<OpenAPIExtension> chain) {\n        if (chain.hasNext()) {\n            chain.next().decorateOperation(operation, method, chain);\n        }\n    }\n\n    protected boolean shouldIgnoreClass(Class<?> cls) {\n        return false;\n    }\n\n    protected boolean shouldIgnoreType(Type type, Set<Type> typesToSkip) {\n        if (typesToSkip.contains(type)) {\n            return true;\n        }\n        if (shouldIgnoreClass(constructType(type).getRawClass())) {\n            typesToSkip.add(type);\n            return true;\n        }\n        return false;\n    }\n\n    protected JavaType constructType(Type type) {\n        return TypeFactory.defaultInstance().constructType(type);\n    }\n\n    @Override\n    public void setOpenAPI31(boolean openapi31) {\n        this.openapi31 = openapi31;\n    }\n\n    @Override\n    public void setSchemaResolution(Schema.SchemaResolution schemaResolution) {\n        this.schemaResolution = schemaResolution;\n    }\n    @Override\n    public void setConfiguration(Configuration configuration) {\n        this.configuration = configuration;\n        if (configuration != null) {\n            this.openapi31 = configuration.isOpenAPI31() != null ? configuration.isOpenAPI31() : false;\n            this.schemaResolution = configuration.getSchemaResolution();\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/ext/OpenAPIExtension.java",
    "content": "package io.swagger.v3.jaxrs2.ext;\n\nimport com.fasterxml.jackson.annotation.JsonView;\nimport io.swagger.v3.core.util.Configuration;\nimport io.swagger.v3.jaxrs2.ResolvedParameter;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Method;\nimport java.lang.reflect.Type;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Set;\n\npublic interface OpenAPIExtension {\n\n    String extractOperationMethod(Method method, Iterator<OpenAPIExtension> chain);\n\n    ResolvedParameter extractParameters(List<Annotation> annotations, Type type, Set<Type> typesToSkip, Components components,\n                                        javax.ws.rs.Consumes classConsumes, javax.ws.rs.Consumes methodConsumes, boolean includeRequestBody, JsonView jsonViewAnnotation, Iterator<OpenAPIExtension> chain);\n\n    /**\n     * Decorates operation with additional vendor based extensions.\n     *\n     * @param operation the operation, build from swagger definition\n     * @param method    the method for additional scan\n     * @param chain     the chain with swagger extensions to process\n     */\n    void decorateOperation(Operation operation, Method method, Iterator<OpenAPIExtension> chain);\n\n    default void setOpenAPI31(boolean openapi31) {\n        //todo: override me!\n    }\n\n    default void setSchemaResolution(Schema.SchemaResolution schemaResolution) {\n        //todo: override me!\n    }\n\n    default void setConfiguration(Configuration configuration) {\n        //todo: override me!\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/ext/OpenAPIExtensions.java",
    "content": "package io.swagger.v3.jaxrs2.ext;\n\nimport io.swagger.v3.jaxrs2.DefaultParameterExtension;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.util.ArrayList;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.ServiceLoader;\n\npublic class OpenAPIExtensions {\n    private static final Logger LOGGER = LoggerFactory.getLogger(OpenAPIExtensions.class);\n\n    private static List<OpenAPIExtension> extensions = null;\n\n    public static List<OpenAPIExtension> getExtensions() {\n        return extensions;\n    }\n\n    public static void setExtensions(List<OpenAPIExtension> ext) {\n        extensions = ext;\n    }\n\n    public static Iterator<OpenAPIExtension> chain() {\n        return extensions.iterator();\n    }\n\n    static {\n        extensions = new ArrayList<>();\n        ServiceLoader<OpenAPIExtension> loader = ServiceLoader.load(OpenAPIExtension.class, OpenAPIExtensions.class.getClassLoader());\n        for (OpenAPIExtension ext : loader) {\n            LOGGER.debug(\"adding extension {}\", ext);\n            extensions.add(ext);\n        }\n        extensions.add(new DefaultParameterExtension());\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/JaxrsAnnotationScanner.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport io.github.classgraph.ClassGraph;\nimport io.github.classgraph.ScanResult;\nimport io.swagger.v3.jaxrs2.integration.api.JaxrsOpenApiScanner;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.Webhooks;\nimport io.swagger.v3.oas.integration.IgnoredPackages;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport org.apache.commons.lang3.StringUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport javax.ws.rs.ApplicationPath;\nimport javax.ws.rs.core.Application;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.util.Set;\n\npublic class JaxrsAnnotationScanner<T extends JaxrsAnnotationScanner<T>> implements JaxrsOpenApiScanner {\n\n    static final Set<String> ignored = new HashSet<>();\n\n    static {\n        ignored.addAll(IgnoredPackages.ignored);\n    }\n\n    protected OpenAPIConfiguration openApiConfiguration;\n    protected Application application;\n    protected static final Logger LOGGER = LoggerFactory.getLogger(JaxrsAnnotationScanner.class);\n    protected boolean onlyConsiderResourcePackages = false;\n\n    public JaxrsAnnotationScanner application(Application application) {\n        this.application = application;\n        return this;\n    }\n\n    @Override\n    public void setApplication(Application application) {\n        this.application = application;\n    }\n\n    public T openApiConfiguration(OpenAPIConfiguration openApiConfiguration) {\n        this.openApiConfiguration = openApiConfiguration;\n        return (T) this;\n    }\n\n    @Override\n    public void setConfiguration(OpenAPIConfiguration openApiConfiguration) {\n        this.openApiConfiguration = openApiConfiguration;\n    }\n\n    @Override\n    public Set<Class<?>> classes() {\n\n        if (openApiConfiguration == null) {\n            openApiConfiguration = new SwaggerConfiguration();\n        }\n\n        ClassGraph graph = new ClassGraph().enableAllInfo();\n        Set<String> acceptablePackages = new HashSet<>();\n        Set<Class<?>> output = new HashSet<>();\n\n        // if classes are passed, use them\n        if (openApiConfiguration.getResourceClasses() != null && !openApiConfiguration.getResourceClasses().isEmpty()) {\n            for (String className : openApiConfiguration.getResourceClasses()) {\n                if (!isIgnored(className)) {\n                    try {\n                        output.add(Class.forName(className));\n                    } catch (ClassNotFoundException e) {\n                        LOGGER.warn(\"error loading class from resourceClasses: \" + e.getMessage(), e);\n                    }\n                }\n            }\n            return output;\n        }\n\n        boolean allowAllPackages = false;\n        if (openApiConfiguration.getResourcePackages() != null && !openApiConfiguration.getResourcePackages().isEmpty()) {\n            for (String pkg : openApiConfiguration.getResourcePackages()) {\n                if (!isIgnored(pkg)) {\n                    acceptablePackages.add(pkg);\n                    graph.whitelistPackages(pkg);\n                }\n            }\n        } else {\n            if (!onlyConsiderResourcePackages) {\n                allowAllPackages = true;\n            }\n        }\n        final Set<Class<?>> classes;\n        try (ScanResult scanResult = graph.scan()) {\n            classes = new HashSet<>(scanResult.getClassesWithAnnotation(javax.ws.rs.Path.class.getName()).loadClasses());\n            classes.addAll(new HashSet<>(scanResult.getClassesWithAnnotation(OpenAPIDefinition.class.getName()).loadClasses()));\n            classes.addAll(new HashSet<>(scanResult.getClassesWithAnnotation(Webhooks.class.getName()).loadClasses()));\n            if (Boolean.TRUE.equals(openApiConfiguration.isAlwaysResolveAppPath())) {\n                classes.addAll(new HashSet<>(scanResult.getClassesWithAnnotation(ApplicationPath.class.getName()).loadClasses()));\n            }\n        }\n\n        for (Class<?> cls : classes) {\n            if (allowAllPackages) {\n                output.add(cls);\n            } else {\n                for (String pkg : acceptablePackages) {\n                    if (cls.getPackage().getName().startsWith(pkg)) {\n                        output.add(cls);\n                    }\n                }\n            }\n        }\n        LOGGER.trace(\"classes() - output size {}\", output.size());\n        return output;\n    }\n\n    protected boolean isIgnored(String classOrPackageName) {\n        if (StringUtils.isBlank(classOrPackageName)) {\n            return true;\n        }\n        return ignored.stream().anyMatch(classOrPackageName::startsWith);\n    }\n\n    @Override\n    public Map<String, Object> resources() {\n        return new HashMap<>();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/JaxrsApplicationAndAnnotationScanner.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport java.util.HashSet;\nimport java.util.Set;\n\npublic class JaxrsApplicationAndAnnotationScanner extends JaxrsAnnotationScanner<JaxrsApplicationAndAnnotationScanner> {\n\n    @Override\n    public Set<Class<?>> classes() {\n        Set<Class<?>> classes = super.classes();\n        Set<Class<?>> output = new HashSet<>();\n        if (application != null) {\n            Set<Class<?>> clzs = application.getClasses();\n            if (clzs != null) {\n                for (Class<?> clz : clzs) {\n                    if (!isIgnored(clz.getName())) {\n                        output.add(clz);\n                    }\n                }\n            }\n            Set<Object> singletons = application.getSingletons();\n            if (singletons != null) {\n                for (Object o : singletons) {\n                    if (!isIgnored(o.getClass().getName())) {\n                        output.add(o.getClass());\n                    }\n                }\n            }\n        }\n        classes.addAll(output);\n        return classes;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/JaxrsApplicationAndResourcePackagesAnnotationScanner.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport java.util.HashSet;\nimport java.util.Set;\n\n/**\n * @since 2.0.10\n */\npublic class JaxrsApplicationAndResourcePackagesAnnotationScanner extends JaxrsAnnotationScanner<JaxrsApplicationAndResourcePackagesAnnotationScanner> {\n\n    public JaxrsApplicationAndResourcePackagesAnnotationScanner() {\n        onlyConsiderResourcePackages = true;\n    }\n\n    @Override\n    public Set<Class<?>> classes() {\n        Set<Class<?>> classes = super.classes();\n        Set<Class<?>> output = new HashSet<>();\n        if (application != null) {\n            Set<Class<?>> clzs = application.getClasses();\n            if (clzs != null) {\n                for (Class<?> clz : clzs) {\n                    if (!isIgnored(clz.getName())) {\n                        output.add(clz);\n                    }\n                }\n            }\n            Set<Object> singletons = application.getSingletons();\n            if (singletons != null) {\n                for (Object o : singletons) {\n                    if (!isIgnored(o.getClass().getName())) {\n                        output.add(o.getClass());\n                    }\n                }\n            }\n        }\n        classes.addAll(output);\n        return classes;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/JaxrsApplicationScanner.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport java.util.HashSet;\nimport java.util.Set;\n\npublic class JaxrsApplicationScanner extends JaxrsAnnotationScanner<JaxrsApplicationScanner> {\n\n    @Override\n    public Set<Class<?>> classes() {\n        Set<Class<?>> output = new HashSet<>();\n        if (application != null) {\n            Set<Class<?>> clzs = application.getClasses();\n            if (clzs != null) {\n                for (Class<?> clz : clzs) {\n                    if (!isIgnored(clz.getName())) {\n                        output.add(clz);\n                    }\n                }\n            }\n            Set<Object> singletons = application.getSingletons();\n            if (singletons != null) {\n                for (Object o : singletons) {\n                    if (!isIgnored(o.getClass().getName())) {\n                        output.add(o.getClass());\n                    }\n                }\n            }\n        }\n        return output;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/JaxrsOpenApiContext.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport io.swagger.v3.jaxrs2.Reader;\nimport io.swagger.v3.jaxrs2.integration.api.JaxrsOpenApiScanner;\nimport io.swagger.v3.oas.integration.GenericOpenApiContext;\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport io.swagger.v3.oas.integration.api.OpenApiReader;\nimport io.swagger.v3.oas.integration.api.OpenApiScanner;\nimport org.apache.commons.lang3.StringUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport javax.ws.rs.core.Application;\n\npublic class JaxrsOpenApiContext<T extends JaxrsOpenApiContext> extends GenericOpenApiContext<JaxrsOpenApiContext> implements OpenApiContext {\n    Logger LOGGER = LoggerFactory.getLogger(JaxrsOpenApiContext.class);\n\n    private Application app;\n\n    public T app(Application app) {\n        this.app = app;\n        return (T) this;\n    }\n\n    @Override\n    protected OpenApiReader buildReader(OpenAPIConfiguration openApiConfiguration) throws Exception {\n        OpenApiReader reader;\n        if (StringUtils.isNotBlank(openApiConfiguration.getReaderClass())) {\n            Class cls = getClass().getClassLoader().loadClass(openApiConfiguration.getReaderClass());\n            reader = (OpenApiReader) cls.newInstance();\n        } else {\n            reader = new Reader();\n        }\n        if (reader instanceof Reader) {\n            ((Reader) reader).setApplication(app);\n        }\n        reader.setConfiguration(openApiConfiguration);\n        return reader;\n    }\n\n    @Override\n    protected OpenApiScanner buildScanner(OpenAPIConfiguration openApiConfiguration) throws Exception {\n\n        OpenApiScanner scanner;\n        if (StringUtils.isNotBlank(openApiConfiguration.getScannerClass())) {\n            Class cls = getClass().getClassLoader().loadClass(openApiConfiguration.getScannerClass());\n            scanner = (OpenApiScanner) cls.newInstance();\n        } else {\n            scanner = new JaxrsApplicationAndAnnotationScanner();\n        }\n        scanner.setConfiguration(openApiConfiguration);\n        if (scanner instanceof JaxrsOpenApiScanner) {\n            ((JaxrsOpenApiScanner) scanner).setApplication(app);\n        }\n        return scanner;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/JaxrsOpenApiContextBuilder.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport io.swagger.v3.oas.integration.GenericOpenApiContextBuilder;\nimport io.swagger.v3.oas.integration.OpenApiConfigurationException;\nimport io.swagger.v3.oas.integration.OpenApiContextLocator;\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport org.apache.commons.lang3.StringUtils;\n\nimport javax.servlet.ServletConfig;\nimport javax.ws.rs.core.Application;\n\npublic class JaxrsOpenApiContextBuilder<T extends JaxrsOpenApiContextBuilder> extends GenericOpenApiContextBuilder<JaxrsOpenApiContextBuilder> {\n\n    protected Application application;\n    protected ServletConfig servletConfig;\n\n    @Override\n    public OpenApiContext buildContext(boolean init) throws OpenApiConfigurationException {\n        if (StringUtils.isBlank(ctxId)) {\n            ctxId = OpenApiContext.OPENAPI_CONTEXT_ID_DEFAULT;\n        }\n\n        OpenApiContext ctx = OpenApiContextLocator.getInstance().getOpenApiContext(ctxId);\n\n        if (ctx == null) {\n            OpenApiContext rootCtx = OpenApiContextLocator.getInstance().getOpenApiContext(OpenApiContext.OPENAPI_CONTEXT_ID_DEFAULT);\n            ctx = new XmlWebOpenApiContext()\n                    .servletConfig(servletConfig)\n                    .app(application)\n                    .openApiConfiguration(openApiConfiguration)\n                    .id(ctxId)\n                    .parent(rootCtx);\n\n            if (ctx.getConfigLocation() == null && configLocation != null) {\n                ((XmlWebOpenApiContext) ctx).configLocation(configLocation);\n            }\n            if (((XmlWebOpenApiContext) ctx).getResourcePackages() == null && resourcePackages != null) {\n                ((XmlWebOpenApiContext) ctx).resourcePackages(resourcePackages);\n            }\n            if (((XmlWebOpenApiContext) ctx).getResourceClasses() == null && resourceClasses != null) {\n                ((XmlWebOpenApiContext) ctx).resourceClasses(resourceClasses);\n            }\n            if (init) {\n                ctx.init(); // includes registering itself with OpenApiContextLocator\n            }\n        }\n        return ctx;\n    }\n\n    public Application getApplication() {\n        return application;\n    }\n\n    public void setApplication(Application application) {\n        this.application = application;\n    }\n\n    public ServletConfig getServletConfig() {\n        return servletConfig;\n    }\n\n    public void setServletConfig(ServletConfig servletConfig) {\n        this.servletConfig = servletConfig;\n    }\n\n    public T application(Application application) {\n        this.application = application;\n        return (T) this;\n    }\n\n    public T servletConfig(ServletConfig servletConfig) {\n        this.servletConfig = servletConfig;\n        return (T) this;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/OpenApiServlet.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport com.fasterxml.jackson.core.util.DefaultPrettyPrinter;\nimport io.swagger.v3.core.filter.OpenAPISpecFilter;\nimport io.swagger.v3.core.filter.SpecFilter;\nimport io.swagger.v3.jaxrs2.util.ServletUtils;\nimport io.swagger.v3.oas.integration.OpenApiConfigurationException;\nimport io.swagger.v3.oas.integration.OpenApiContextLocator;\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.apache.commons.lang3.StringUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport javax.servlet.ServletConfig;\nimport javax.servlet.ServletException;\nimport javax.servlet.http.HttpServlet;\nimport javax.servlet.http.HttpServletRequest;\nimport javax.servlet.http.HttpServletResponse;\nimport java.io.IOException;\nimport java.io.PrintWriter;\n\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.getContextIdFromServletConfig;\n\npublic class OpenApiServlet extends HttpServlet {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(OpenApiServlet.class);\n\n    public static final String APPLICATION_JSON = \"application/json\";\n    public static final String APPLICATION_YAML = \"application/yaml\";\n    public static final String ACCEPT_HEADER = \"Accept\";\n\n    @Override\n    public void init(ServletConfig config) throws ServletException {\n\n        super.init(config);\n        String ctxId = getContextIdFromServletConfig(config);\n        try {\n            new ServletOpenApiContextBuilder()\n                    .servletConfig(config)\n                    .ctxId(ctxId)\n                    .buildContext(true);\n        } catch (OpenApiConfigurationException e) {\n            LOGGER.error(\"Failed to initialize OpenAPI servlet context\", e);\n        }\n    }\n\n    // TODO move to own servlet non jaxrs project and reference from there\n    // TODO cleanup and errors\n    @Override\n    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\n        String ctxId = getContextIdFromServletConfig(getServletConfig());\n        OpenApiContext ctx = OpenApiContextLocator.getInstance().getOpenApiContext(ctxId);\n        OpenAPI oas = ctx.read();\n\n        if (oas != null && ctx.getOpenApiConfiguration() != null) {\n            if (ctx.getOpenApiConfiguration().getFilterClass() != null) {\n                try {\n                    OpenAPISpecFilter filterImpl = (OpenAPISpecFilter) Class.forName(ctx.getOpenApiConfiguration().getFilterClass()).newInstance();\n                    SpecFilter f = new SpecFilter();\n                    oas = f.filter(oas, filterImpl, ServletUtils.getQueryParams(req.getParameterMap()),\n                            ServletUtils.getCookies(req.getCookies()), ServletUtils.getHeaders(req));\n                } catch (Exception e) {\n                    LOGGER.error(\"failed to load filter\", e);\n                }\n            }\n        }\n\n        String type = \"json\";\n\n        String acceptHeader = req.getHeader(ACCEPT_HEADER);\n        if (!StringUtils.isBlank(acceptHeader) && acceptHeader.toLowerCase().contains(APPLICATION_YAML)) {\n            type = \"yaml\";\n        } else {\n            // check URL:\n            if (req.getRequestURL().toString().toLowerCase().endsWith(\"yaml\")) {\n                type = \"yaml\";\n            }\n        }\n\n        boolean pretty = ctx.getOpenApiConfiguration() != null && Boolean.TRUE.equals(ctx.getOpenApiConfiguration().isPrettyPrint());\n\n        resp.setStatus(200);\n\n        if (type.equalsIgnoreCase(\"yaml\")) {\n            resp.setContentType(APPLICATION_YAML);\n            try (PrintWriter pw = resp.getWriter()) {\n                pw.write(pretty ? ctx.getOutputYamlMapper().writer(new DefaultPrettyPrinter()).writeValueAsString(oas) : ctx.getOutputYamlMapper().writeValueAsString(oas));\n            }\n        } else {\n            resp.setContentType(APPLICATION_JSON);\n            try (PrintWriter pw = resp.getWriter()) {\n                pw.write(pretty ? ctx.getOutputJsonMapper().writer(new DefaultPrettyPrinter()).writeValueAsString(oas) : ctx.getOutputJsonMapper().writeValueAsString(oas));\n            }\n        }\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/ServletConfigContextUtils.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport org.apache.commons.lang3.StringUtils;\n\nimport javax.servlet.ServletConfig;\nimport java.util.Arrays;\nimport java.util.LinkedHashSet;\nimport java.util.Set;\nimport java.util.stream.Collectors;\n\npublic class ServletConfigContextUtils {\n\n    public static final String OPENAPI_CONFIGURATION_RESOURCEPACKAGE_KEY = \"openApi.configuration.resourcePackages\";\n    public static final String OPENAPI_CONFIGURATION_LOCATION_KEY = \"openApi.configuration.location\";\n    public static final String JERSEY1_PACKAGE_KEY = \"com.sun.jersey.config.property.packages\";\n    public static final String JERSEY2_PACKAGE_KEY = \"jersey.config.server.provider.packages\";\n    public static final String JERSEY2_CLASSES_KEY = \"jersey.config.server.provider.classnames\";\n\n    public static final String OPENAPI_CONFIGURATION_READER_KEY = \"openApi.configuration.readerClass\";\n    public static final String OPENAPI_CONFIGURATION_SCANNER_KEY = \"openApi.configuration.scannerClass\";\n    public static final String OPENAPI_CONFIGURATION_BUILDER_KEY = \"openApi.configuration.builderClass\";\n    public static final String OPENAPI_CONFIGURATION_PRETTYPRINT_KEY = \"openApi.configuration.prettyPrint\";\n    public static final String OPENAPI_CONFIGURATION_READALLRESOURCES_KEY = \"openApi.configuration.readAllResources\";\n    public static final String OPENAPI_CONFIGURATION_RESOURCECLASSES_KEY = \"openApi.configuration.resourceClasses\";\n    public static final String OPENAPI_CONFIGURATION_FILTER_KEY = \"openApi.configuration.filterClass\";\n    public static final String OPENAPI_CONFIGURATION_CACHE_TTL_KEY = \"openApi.configuration.cacheTTL\";\n\n    /**\n     * @since 2.1.6\n     */\n    public static final String OPENAPI_CONFIGURATION_SORTOUTPUT_KEY = \"openApi.configuration.sortOutput\";\n\n    /**\n     * @since 2.1.9\n     */\n    public static final String OPENAPI_CONFIGURATION_ALWAYSRESOLVEAPPPATH_KEY = \"openApi.configuration.alwaysResolveAppPath\";\n\n    /**\n     * @since 2.1.15\n     */\n    public static final String OPENAPI_CONFIGURATION_SKIPRESOLVEAPPPATH_KEY = \"openApi.configuration.skipResolveAppPath\";\n\n    /**\n     * @since 2.0.6\n     */\n    public static final String OPENAPI_CONFIGURATION_OBJECT_MAPPER_PROCESSOR_KEY = \"openApi.configuration.objectMapperProcessorClass\";\n\n    /**\n     * @since 2.2.17\n     */\n    public static final String OPENAPI_CONFIGURATION_DEFAULT_RESPONSE_CODE_KEY = \"openApi.configuration.defaultResponseCode\";\n\n    /**\n     * @since 2.2.29\n     */\n    public static final String OPENAPI_CONFIGURATION_GROUPS_VALIDATION_STRATEGY = \"openApi.configuration.groupsValidationStrategy\";\n\n    /**\n     * @since 2.2.29\n     */\n    public static final String OPENAPI_CONFIGURATION_VALIDATOR_PROCESSOR_CLASS = \"openApi.configuration.validatorProcessorClass\";\n\n    /**\n     * @since 2.0.6\n     */\n    public static final String OPENAPI_CONFIGURATION_MODEL_CONVERTERS_KEY = \"openApi.configuration.modelConverterClasses\";\n\n    /**\n     * @since 2.2.0\n     */\n    public static final String OPENAPI_CONFIGURATION_OPENAPI_31_KEY = \"openApi.configuration.openAPI31\";\n\n    public static final String OPENAPI_CONFIGURATION_CONVERT_TO_OPENAPI_31_KEY = \"openApi.configuration.convertToOpenAPI31\";\n\n    /**\n     * @since 2.2.24\n     */\n    public static final String OPENAPI_CONFIGURATION_SCHEMA_RESOLUTION_KEY = \"openApi.configuration.schemaResolution\";\n\n    /**\n     * @since 2.2.28\n     */\n    public static final String OPENAPI_CONFIGURATION_OPENAPI_VERSION_KEY = \"openApi.configuration.openAPIVersion\";\n\n\n    public static Set<String> resolveResourcePackages(ServletConfig servletConfig) {\n        if (!isServletConfigAvailable(servletConfig)) {\n            return null;\n        }\n        String resourcePackage = getInitParam(servletConfig, OPENAPI_CONFIGURATION_RESOURCEPACKAGE_KEY);\n        if (resourcePackage == null) {\n            // jersey 1\n            resourcePackage = getInitParam(servletConfig, JERSEY1_PACKAGE_KEY);\n            if (resourcePackage != null) {\n                resourcePackage = resourcePackage.replace(';', ',');\n            }\n        }\n        if (resourcePackage == null) {\n            // jersey 2\n            resourcePackage = getInitParam(servletConfig, JERSEY2_PACKAGE_KEY);\n            if (resourcePackage != null) {\n                resourcePackage = resourcePackage.replace(';', ',');\n            }\n        }\n        if (StringUtils.isBlank(resourcePackage)) {\n            return null;\n        }\n        return Arrays.stream(resourcePackage.split(\",\")).collect(Collectors.toSet());\n\n    }\n\n    public static Set<String> resolveResourceClasses(ServletConfig servletConfig) {\n        if (!isServletConfigAvailable(servletConfig)) {\n            return null;\n        }\n        String resourceClasses = getInitParam(servletConfig, OPENAPI_CONFIGURATION_RESOURCECLASSES_KEY);\n        if (resourceClasses == null) {\n            // jersey 2\n            resourceClasses = getInitParam(servletConfig, JERSEY2_CLASSES_KEY);\n            if (resourceClasses != null) {\n                resourceClasses = resourceClasses.replace(';', ',');\n            }\n        }\n        if (StringUtils.isBlank(resourceClasses)) {\n            return null;\n        }\n        return Arrays.stream(resourceClasses.split(\",\")).collect(Collectors.toSet());\n\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public static Set<String> resolveModelConverterClasses(ServletConfig servletConfig) {\n        if (!isServletConfigAvailable(servletConfig)) {\n            return null;\n        }\n        String modelConverterClasses = getInitParam(servletConfig, OPENAPI_CONFIGURATION_MODEL_CONVERTERS_KEY);\n        if (modelConverterClasses != null) {\n            modelConverterClasses = modelConverterClasses.replace(';', ',');\n        }\n        if (StringUtils.isBlank(modelConverterClasses)) {\n            return null;\n        }\n        return new LinkedHashSet<>(Arrays.stream(modelConverterClasses.split(\",\")).collect(Collectors.toSet()));\n\n    }\n\n    public static String getInitParam(ServletConfig sc, String paramKey) {\n        if (!isServletConfigAvailable(sc)) {\n            return null;\n        }\n        return sc.getInitParameter(paramKey);\n    }\n\n    public static Boolean getBooleanInitParam(ServletConfig sc, String paramKey) {\n        String param = getInitParam(sc, paramKey);\n        if (StringUtils.isBlank(param)) {\n            return null;\n        }\n        return Boolean.parseBoolean(param);\n    }\n\n    public static Long getLongInitParam(ServletConfig sc, String paramKey) {\n        String param = getInitParam(sc, paramKey);\n        if (StringUtils.isBlank(param)) {\n            return null;\n        }\n        try {\n            return Long.parseLong(param);\n        } catch (NumberFormatException e) {\n            return null;\n        }\n    }\n\n    public static String getContextIdFromServletConfig(ServletConfig config) {\n\n        String ctxId = null;\n        if (isServletConfigAvailable(config)) {\n            ctxId = getInitParam(config, OpenApiContext.OPENAPI_CONTEXT_ID_KEY);\n            if (StringUtils.isBlank(ctxId)) {\n                ctxId = OpenApiContext.OPENAPI_CONTEXT_ID_PREFIX + \"servlet.\" + config.getServletName();\n            }\n        }\n        if (StringUtils.isBlank(ctxId)) {\n            ctxId = OpenApiContext.OPENAPI_CONTEXT_ID_DEFAULT;\n        }\n        return ctxId;\n    }\n\n    public static boolean isServletConfigAvailable(ServletConfig sc) {\n        if (sc == null) {\n            return false;\n        }\n        try {\n            sc.getInitParameter(\"test\");\n        } catch (Exception e) {\n            return false;\n        }\n        return true;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/ServletOpenApiConfigurationLoader.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport io.swagger.v3.core.util.Configuration;\nimport io.swagger.v3.oas.integration.ClasspathOpenApiConfigurationLoader;\nimport io.swagger.v3.oas.integration.FileOpenApiConfigurationLoader;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenAPIConfigBuilder;\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiConfigurationLoader;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.apache.commons.lang3.StringUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport javax.servlet.ServletConfig;\nimport java.io.IOException;\n\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_BUILDER_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_CACHE_TTL_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_FILTER_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_OBJECT_MAPPER_PROCESSOR_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_DEFAULT_RESPONSE_CODE_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_GROUPS_VALIDATION_STRATEGY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_VALIDATOR_PROCESSOR_CLASS;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_OPENAPI_31_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_CONVERT_TO_OPENAPI_31_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_PRETTYPRINT_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_READALLRESOURCES_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_READER_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_SCANNER_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_SCHEMA_RESOLUTION_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_OPENAPI_VERSION_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_SKIPRESOLVEAPPPATH_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_SORTOUTPUT_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.OPENAPI_CONFIGURATION_ALWAYSRESOLVEAPPPATH_KEY;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.getBooleanInitParam;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.getInitParam;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.getLongInitParam;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.resolveModelConverterClasses;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.resolveResourceClasses;\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.resolveResourcePackages;\n\npublic class ServletOpenApiConfigurationLoader implements OpenApiConfigurationLoader {\n\n    private static Logger LOGGER = LoggerFactory.getLogger(ServletOpenApiConfigurationLoader.class);\n\n    private ServletConfig servletConfig;\n\n    private FileOpenApiConfigurationLoader fileOpenApiConfigurationLoader = new FileOpenApiConfigurationLoader();\n    private ClasspathOpenApiConfigurationLoader classpathOpenApiConfigurationLoader = new ClasspathOpenApiConfigurationLoader();\n\n    public ServletOpenApiConfigurationLoader(ServletConfig servletConfig) {\n        this.servletConfig = servletConfig;\n    }\n\n    @Override\n    public OpenAPIConfiguration load(String path) throws IOException {\n        if (servletConfig == null) {\n            return null;\n        }\n        if (StringUtils.isBlank(path)) { // we want to resolve from servlet params\n            SwaggerConfiguration configuration = new SwaggerConfiguration()\n                    .resourcePackages(resolveResourcePackages(servletConfig))\n                    .filterClass(getInitParam(servletConfig, OPENAPI_CONFIGURATION_FILTER_KEY))\n                    .resourceClasses(resolveResourceClasses(servletConfig))\n                    .readAllResources(getBooleanInitParam(servletConfig, OPENAPI_CONFIGURATION_READALLRESOURCES_KEY))\n                    .prettyPrint(getBooleanInitParam(servletConfig, OPENAPI_CONFIGURATION_PRETTYPRINT_KEY))\n                    .sortOutput(getBooleanInitParam(servletConfig, OPENAPI_CONFIGURATION_SORTOUTPUT_KEY))\n                    .alwaysResolveAppPath(getBooleanInitParam(servletConfig, OPENAPI_CONFIGURATION_ALWAYSRESOLVEAPPPATH_KEY))\n                    .skipResolveAppPath(getBooleanInitParam(servletConfig, OPENAPI_CONFIGURATION_SKIPRESOLVEAPPPATH_KEY))\n                    .readerClass(getInitParam(servletConfig, OPENAPI_CONFIGURATION_READER_KEY))\n                    .cacheTTL(getLongInitParam(servletConfig, OPENAPI_CONFIGURATION_CACHE_TTL_KEY))\n                    .scannerClass(getInitParam(servletConfig, OPENAPI_CONFIGURATION_SCANNER_KEY))\n                    .objectMapperProcessorClass(getInitParam(servletConfig, OPENAPI_CONFIGURATION_OBJECT_MAPPER_PROCESSOR_KEY))\n                    .defaultResponseCode(getInitParam(servletConfig, OPENAPI_CONFIGURATION_DEFAULT_RESPONSE_CODE_KEY))\n                    .validatorProcessorClass(getInitParam(servletConfig, OPENAPI_CONFIGURATION_VALIDATOR_PROCESSOR_CLASS))\n                    .openAPI31(getBooleanInitParam(servletConfig, OPENAPI_CONFIGURATION_OPENAPI_31_KEY))\n                    .convertToOpenAPI31(getBooleanInitParam(servletConfig, OPENAPI_CONFIGURATION_CONVERT_TO_OPENAPI_31_KEY))\n                    .modelConverterClasses(resolveModelConverterClasses(servletConfig));\n            if (getInitParam(servletConfig, OPENAPI_CONFIGURATION_SCHEMA_RESOLUTION_KEY) != null) {\n                configuration.schemaResolution(Schema.SchemaResolution.valueOf(getInitParam(servletConfig, OPENAPI_CONFIGURATION_SCHEMA_RESOLUTION_KEY)));\n            }\n            if (getInitParam(servletConfig, OPENAPI_CONFIGURATION_OPENAPI_VERSION_KEY) != null) {\n                configuration.openAPIVersion(getInitParam(servletConfig, OPENAPI_CONFIGURATION_OPENAPI_VERSION_KEY));\n            }\n            if (StringUtils.isNotBlank(getInitParam(servletConfig, OPENAPI_CONFIGURATION_GROUPS_VALIDATION_STRATEGY))) {\n                configuration.groupsValidationStrategy(Configuration.GroupsValidationStrategy.valueOf(getInitParam(servletConfig, OPENAPI_CONFIGURATION_GROUPS_VALIDATION_STRATEGY)));\n            }\n            return configuration;\n\n        }\n        String location = ServletConfigContextUtils.getInitParam(servletConfig, path);\n        if (!StringUtils.isBlank(location)) {\n            if (classpathOpenApiConfigurationLoader.exists(location)) {\n                return classpathOpenApiConfigurationLoader.load(location);\n            } else if (fileOpenApiConfigurationLoader.exists(location)) {\n                return fileOpenApiConfigurationLoader.load(location);\n            }\n        }\n\n        String builderClassName = getInitParam(servletConfig, OPENAPI_CONFIGURATION_BUILDER_KEY);\n        if (StringUtils.isNotBlank(builderClassName)) {\n            try {\n                Class cls = getClass().getClassLoader().loadClass(builderClassName);\n                // TODO instantiate with configuration\n                OpenAPIConfigBuilder builder = (OpenAPIConfigBuilder) cls.newInstance();\n                return builder.build();\n            } catch (Exception e) {\n                LOGGER.error(\"error loading builder: \" + e.getMessage(), e);\n            }\n        }\n        return null;\n    }\n\n    @Override\n    public boolean exists(String path) {\n\n        if (servletConfig == null) {\n            return false;\n        }\n        if (StringUtils.isBlank(path)) {\n            if (resolveResourcePackages(servletConfig) != null) {\n                return true;\n            }\n            if (getInitParam(servletConfig, OPENAPI_CONFIGURATION_FILTER_KEY) != null) {\n                return true;\n            }\n            if (resolveResourceClasses(servletConfig) != null) {\n                return true;\n            }\n            if (getBooleanInitParam(servletConfig, OPENAPI_CONFIGURATION_READALLRESOURCES_KEY) != null) {\n                return true;\n            }\n            if (getBooleanInitParam(servletConfig, OPENAPI_CONFIGURATION_PRETTYPRINT_KEY) != null) {\n                return true;\n            }\n            if (getBooleanInitParam(servletConfig, OPENAPI_CONFIGURATION_SORTOUTPUT_KEY) != null) {\n                return true;\n            }\n            if (getBooleanInitParam(servletConfig, OPENAPI_CONFIGURATION_ALWAYSRESOLVEAPPPATH_KEY) != null) {\n                return true;\n            }\n            if (getBooleanInitParam(servletConfig, OPENAPI_CONFIGURATION_SKIPRESOLVEAPPPATH_KEY) != null) {\n                return true;\n            }\n            if (getInitParam(servletConfig, OPENAPI_CONFIGURATION_READER_KEY) != null) {\n                return true;\n            }\n            if (getLongInitParam(servletConfig, OPENAPI_CONFIGURATION_CACHE_TTL_KEY) != null) {\n                return true;\n            }\n            if (getInitParam(servletConfig, OPENAPI_CONFIGURATION_SCANNER_KEY) != null) {\n                return true;\n            }\n            if (getInitParam(servletConfig, OPENAPI_CONFIGURATION_OBJECT_MAPPER_PROCESSOR_KEY) != null) {\n                return true;\n            }\n            if (getInitParam(servletConfig, OPENAPI_CONFIGURATION_DEFAULT_RESPONSE_CODE_KEY) != null) {\n                return true;\n            }\n            if (getInitParam(servletConfig, OPENAPI_CONFIGURATION_GROUPS_VALIDATION_STRATEGY) != null) {\n                return true;\n            }\n            if (getInitParam(servletConfig, OPENAPI_CONFIGURATION_VALIDATOR_PROCESSOR_CLASS) != null) {\n                return true;\n            }\n            if (getInitParam(servletConfig, OPENAPI_CONFIGURATION_CONVERT_TO_OPENAPI_31_KEY) != null) {\n                return true;\n            }\n            return resolveModelConverterClasses(servletConfig) != null;\n        }\n        String location = ServletConfigContextUtils.getInitParam(servletConfig, path);\n        if (!StringUtils.isBlank(location)) {\n            if (classpathOpenApiConfigurationLoader.exists(location)) {\n                return true;\n            }\n            return fileOpenApiConfigurationLoader.exists(location);\n        }\n        return false;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/ServletOpenApiContextBuilder.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport io.swagger.v3.oas.integration.GenericOpenApiContextBuilder;\nimport io.swagger.v3.oas.integration.OpenApiConfigurationException;\nimport io.swagger.v3.oas.integration.OpenApiContextLocator;\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport org.apache.commons.lang3.StringUtils;\n\nimport javax.servlet.ServletConfig;\n\npublic class ServletOpenApiContextBuilder<T extends ServletOpenApiContextBuilder> extends GenericOpenApiContextBuilder<ServletOpenApiContextBuilder> {\n\n    protected ServletConfig servletConfig;\n\n    @Override\n    public OpenApiContext buildContext(boolean init) throws OpenApiConfigurationException {\n        if (StringUtils.isBlank(ctxId)) {\n            ctxId = OpenApiContext.OPENAPI_CONTEXT_ID_DEFAULT;\n        }\n\n        OpenApiContext ctx = OpenApiContextLocator.getInstance().getOpenApiContext(ctxId);\n\n        if (ctx == null) {\n            OpenApiContext rootCtx = OpenApiContextLocator.getInstance().getOpenApiContext(OpenApiContext.OPENAPI_CONTEXT_ID_DEFAULT);\n            ctx = new XmlWebOpenApiContext()\n                    .servletConfig(servletConfig)\n                    .openApiConfiguration(openApiConfiguration)\n                    .id(ctxId)\n                    .parent(rootCtx);\n\n            if (ctx.getConfigLocation() == null && configLocation != null) {\n                ((XmlWebOpenApiContext) ctx).configLocation(configLocation);\n            }\n            if (((XmlWebOpenApiContext) ctx).getResourcePackages() == null && resourcePackages != null) {\n                ((XmlWebOpenApiContext) ctx).resourcePackages(resourcePackages);\n            }\n            if (((XmlWebOpenApiContext) ctx).getResourceClasses() == null && resourceClasses != null) {\n                ((XmlWebOpenApiContext) ctx).resourceClasses(resourceClasses);\n            }\n            if (init) {\n                ctx.init(); // includes registering itself with OpenApiContextLocator\n            }\n        }\n        return ctx;\n    }\n\n    public ServletConfig getServletConfig() {\n        return servletConfig;\n    }\n\n    public void setServletConfig(ServletConfig servletConfig) {\n        this.servletConfig = servletConfig;\n    }\n\n    public T servletConfig(ServletConfig servletConfig) {\n        this.servletConfig = servletConfig;\n        return (T) this;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/ServletPathConfigurationLoader.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport io.swagger.v3.oas.integration.StringOpenApiConfigurationLoader;\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport org.apache.commons.lang3.StringUtils;\n\nimport javax.servlet.ServletConfig;\nimport java.io.IOException;\n\npublic class ServletPathConfigurationLoader implements StringOpenApiConfigurationLoader {\n\n    private ServletConfig servletConfig;\n\n    public ServletPathConfigurationLoader(ServletConfig servletConfig) {\n        this.servletConfig = servletConfig;\n    }\n\n    @Override\n    public OpenAPIConfiguration load(String path) throws IOException {\n        if (servletConfig == null) {\n            return null;\n        }\n        if (StringUtils.isBlank(path)) {\n            return null;\n        }\n        String sanitized = (path.startsWith(\"/\") ? path : \"/\" + path);\n        String configString = readInputStreamToString(servletConfig.getServletContext().getResourceAsStream(sanitized));\n        return deserializeConfig(path, configString);\n    }\n\n    @Override\n    public boolean exists(String path) {\n\n        if (servletConfig == null) {\n            return false;\n        }\n        if (StringUtils.isBlank(path)) {\n            return false;\n        }\n        String sanitized = (path.startsWith(\"/\") ? path : \"/\" + path);\n        return servletConfig.getServletContext().getResourceAsStream(sanitized) != null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/SwaggerLoader.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport com.fasterxml.jackson.core.util.DefaultPrettyPrinter;\nimport io.swagger.v3.core.filter.OpenAPISpecFilter;\nimport io.swagger.v3.core.filter.SpecFilter;\nimport io.swagger.v3.core.util.Configuration;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.integration.GenericOpenApiContextBuilder;\nimport io.swagger.v3.oas.integration.OpenApiConfigurationException;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.apache.commons.lang3.StringUtils;\n\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.LinkedHashSet;\nimport java.util.Map;\nimport java.util.Set;\n\npublic class SwaggerLoader {\n\n    private String outputFormat;\n\n    private String resourcePackages;\n    private String resourceClasses;\n    private String filterClass;\n    private String readerClass;\n    private String contextId;\n    private String scannerClass;\n    private Boolean prettyPrint = false;\n    private Boolean readAllResources = Boolean.TRUE;\n    private String ignoredRoutes;\n\n    private String openapiAsString;\n\n    private String objectMapperProcessorClass;\n    private String defaultResponseCode;\n\n    private Configuration.GroupsValidationStrategy groupsValidationStrategy = Configuration.GroupsValidationStrategy.DEFAULT;\n    private String validatorProcessorClass;\n\n    private String modelConverterClasses;\n\n    private Boolean sortOutput = false;\n\n    private Boolean alwaysResolveAppPath = false;\n\n    private Boolean skipResolveAppPath = false;\n\n    private Boolean openAPI31 = false;\n\n    private Boolean convertToOpenAPI31 = false;\n\n    private String schemaResolution;\n\n    private String openAPIVersion;\n\n    /**\n     * @since 2.0.6\n     */\n    public String getObjectMapperProcessorClass() {\n        return objectMapperProcessorClass;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public void setObjectMapperProcessorClass(String objectMapperProcessorClass) {\n        this.objectMapperProcessorClass = objectMapperProcessorClass;\n    }\n\n    /**\n     * @since 2.2.17\n     */\n    public String getDefaultResponseCode() {\n        return defaultResponseCode;\n    }\n\n    /**\n     * @since 2.2.17\n     */\n    public void setDefaultResponseCode(String defaultResponseCode) {\n        this.defaultResponseCode = defaultResponseCode;\n    }\n\n    /**\n     * @since 2.2.29\n     */\n    public String getGroupsValidationStrategy() {\n        return groupsValidationStrategy.toString();\n    }\n\n    /**\n     * @since 2.2.29\n     */\n    public void setGroupsValidationStrategy(String groupsValidationStrategy) {\n        if (StringUtils.isNotBlank(groupsValidationStrategy)) {\n            this.groupsValidationStrategy = Configuration.GroupsValidationStrategy.valueOf(groupsValidationStrategy);\n        }\n    }\n\n    /**\n     * @since 2.2.29\n     */\n    public String getValidatorProcessorClass() {\n        return validatorProcessorClass;\n    }\n\n    /**\n     * @since 2.2.29\n     */\n    public void setValidatorProcessorClass(String validatorProcessorClass) {\n        this.validatorProcessorClass = validatorProcessorClass;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public String getModelConverterClasses() {\n        return modelConverterClasses;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public void setModelConverterClasses(String modelConverterClasses) {\n        this.modelConverterClasses = modelConverterClasses;\n    }\n\n    public String getOutputFormat() {\n        return outputFormat;\n    }\n\n    public void setOutputFormat(String outputFormat) {\n        this.outputFormat = outputFormat;\n    }\n\n    public String getResourcePackages() {\n        return resourcePackages;\n    }\n\n    public void setResourcePackages(String resourcePackages) {\n        this.resourcePackages = resourcePackages;\n    }\n\n    public String getResourceClasses() {\n        return resourceClasses;\n    }\n\n    public void setResourceClasses(String resourceClasses) {\n        this.resourceClasses = resourceClasses;\n    }\n\n    public String getFilterClass() {\n        return filterClass;\n    }\n\n    public void setFilterClass(String filterClass) {\n        this.filterClass = filterClass;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public String getContextId() {\n        return contextId;\n    }\n\n    /**\n     * @since 2.0.6\n     */\n    public void setContextId(String contextId) {\n        this.contextId = contextId;\n    }\n\n\n    public String getReaderClass() {\n        return readerClass;\n    }\n\n    public void setReaderClass(String readerClass) {\n        this.readerClass = readerClass;\n    }\n\n    public String getScannerClass() {\n        return scannerClass;\n    }\n\n    public void setScannerClass(String scannerClass) {\n        this.scannerClass = scannerClass;\n    }\n\n    public Boolean getPrettyPrint() {\n        return prettyPrint;\n    }\n\n    public void setPrettyPrint(Boolean prettyPrint) {\n        this.prettyPrint = prettyPrint;\n    }\n\n    public Boolean getReadAllResources() {\n        return readAllResources;\n    }\n\n    public void setReadAllResources(Boolean readAllResources) {\n        this.readAllResources = readAllResources;\n    }\n\n    public String getIgnoredRoutes() {\n        return ignoredRoutes;\n    }\n\n    public void setIgnoredRoutes(String ignoredRoutes) {\n        this.ignoredRoutes = ignoredRoutes;\n    }\n\n    public String getOpenapiAsString() {\n        return openapiAsString;\n    }\n\n    public void setOpenapiAsString(String openapiAsString) {\n        this.openapiAsString = openapiAsString;\n    }\n\n    /**\n     * @since 2.1.6\n     */\n    public Boolean getSortOutput() {\n        return sortOutput;\n    }\n\n    /**\n     * @since 2.1.6\n     */\n    public void setSortOutput(Boolean sortOutput) {\n        this.sortOutput = sortOutput;\n    }\n\n    /**\n     * @since 2.1.9\n     */\n    public Boolean getAlwaysResolveAppPath() {\n        return alwaysResolveAppPath;\n    }\n\n    /**\n     * @since 2.1.9\n     */\n    public void setAlwaysResolveAppPath(Boolean alwaysResolveAppPath) {\n        this.alwaysResolveAppPath = alwaysResolveAppPath;\n    }\n\n    /**\n     * @since 2.1.15\n     */\n    public Boolean getSkipResolveAppPath() {\n        return skipResolveAppPath;\n    }\n\n    /**\n     * @since 2.1.15\n     */\n    public void setSkipResolveAppPath(Boolean skipResolveAppPath) {\n        this.skipResolveAppPath = skipResolveAppPath;\n    }\n\n    public Boolean getOpenAPI31() {\n        return openAPI31;\n    }\n\n    public Boolean getConvertToOpenAPI31() {\n        return convertToOpenAPI31;\n    }\n\n    /**\n     *  @since 2.2.0\n     */\n    public void setOpenAPI31(Boolean openAPI31) {\n        this.openAPI31 = openAPI31;\n    }\n\n    /**\n     *  @since 2.2.12\n     */\n    public void setConvertToOpenAPI31(Boolean convertToOpenAPI31) {\n        this.convertToOpenAPI31 = convertToOpenAPI31;\n    }\n\n    /**\n     *  @since 2.2.24\n     */\n    public String getSchemaResolution() {\n        return schemaResolution;\n    }\n\n    /**\n     *  @since 2.2.24\n     */\n    public void setSchemaResolution(String schemaResolution) {\n        this.schemaResolution = schemaResolution;\n    }\n\n    /**\n     *  @since 2.2.28\n     */\n    public String getOpenAPIVersion() {\n        return openAPIVersion;\n    }\n\n    /**\n     *  @since 2.2.28\n     */\n    public void setOpenAPIVersion(String openAPIVersion) {\n        this.openAPIVersion = openAPIVersion;\n    }\n\n    public Map<String, String> resolve() throws Exception{\n\n        Set<String> ignoredRoutesSet = null;\n        if (StringUtils.isNotBlank(ignoredRoutes)) {\n            ignoredRoutesSet = new HashSet<>(Arrays.asList(ignoredRoutes.split(\",\")));\n        }\n        Set<String> resourceClassesSet = null;\n        if (StringUtils.isNotBlank(resourceClasses)) {\n            resourceClassesSet = new HashSet<>(Arrays.asList(resourceClasses.split(\",\")));\n        }\n        Set<String> resourcePackagesSet = null;\n        if (StringUtils.isNotBlank(resourcePackages)) {\n            resourcePackagesSet = new HashSet<>(Arrays.asList(resourcePackages.split(\",\")));\n        }\n\n        LinkedHashSet<String> modelConverterSet = null;\n        if (StringUtils.isNotBlank(modelConverterClasses)) {\n            modelConverterSet = new LinkedHashSet<>(Arrays.asList(modelConverterClasses.split(\",\")));\n        }\n\n        OpenAPI openAPIInput = null;\n        if (StringUtils.isNotBlank(openapiAsString)) {\n            try {\n                openAPIInput = Json.mapper().readValue(openapiAsString, OpenAPI.class);\n            } catch (Exception e) {\n                try {\n                    openAPIInput = Yaml.mapper().readValue(openapiAsString, OpenAPI.class);\n                } catch (Exception e1) {\n                    throw new Exception(\"Error reading/deserializing openapi input: \" + e.getMessage(), e);\n                }\n            }\n        }\n\n        SwaggerConfiguration config = new SwaggerConfiguration()\n                .filterClass(filterClass)\n                .ignoredRoutes(ignoredRoutesSet)\n                .prettyPrint(prettyPrint)\n                .readAllResources(readAllResources)\n                .openAPI(openAPIInput)\n                .readerClass(readerClass)\n                .scannerClass(scannerClass)\n                .resourceClasses(resourceClassesSet)\n                .resourcePackages(resourcePackagesSet)\n                .objectMapperProcessorClass(objectMapperProcessorClass)\n                .defaultResponseCode(defaultResponseCode)\n                .validatorProcessorClass(validatorProcessorClass)\n                .groupsValidationStrategy(groupsValidationStrategy)\n                .modelConverterClasses(modelConverterSet)\n                .sortOutput(sortOutput)\n                .alwaysResolveAppPath(alwaysResolveAppPath)\n                .skipResolveAppPath(skipResolveAppPath)\n                .openAPI31(openAPI31)\n                .convertToOpenAPI31(convertToOpenAPI31);\n        if (schemaResolution != null) {\n            config.schemaResolution(Schema.SchemaResolution.valueOf(schemaResolution));\n        }\n        if (openAPIVersion != null) {\n            config.openAPIVersion(openAPIVersion);\n        }\n        try {\n            GenericOpenApiContextBuilder builder = new JaxrsOpenApiContextBuilder()\n                    .openApiConfiguration(config);\n            if (StringUtils.isNotBlank(contextId)) {\n                builder.ctxId(contextId);\n            }\n\n            OpenApiContext context = builder.buildContext(true);\n            OpenAPI openAPI = context.read();\n            if (StringUtils.isNotBlank(filterClass)) {\n                try {\n                    OpenAPISpecFilter filterImpl = (OpenAPISpecFilter) this.getClass().getClassLoader().loadClass(filterClass).newInstance();\n                    SpecFilter f = new SpecFilter();\n                    openAPI = f.filter(openAPI, filterImpl, new HashMap<>(), new HashMap<>(),\n                            new HashMap<>());\n                } catch (Exception e) {\n                    throw new Exception(\"Error applying filter to API specification: \" + e.getMessage(), e);\n                }\n            }\n\n            String openapiJson = null;\n            String openapiYaml = null;\n            if (\"JSON\".equals(outputFormat) || \"JSONANDYAML\".equals(outputFormat)) {\n                if (prettyPrint != null && prettyPrint) {\n                    openapiJson = context.getOutputJsonMapper().writer(new DefaultPrettyPrinter()).writeValueAsString(openAPI);\n                } else {\n                    openapiJson = context.getOutputJsonMapper().writeValueAsString(openAPI);\n                }\n            }\n            if (\"YAML\".equals(outputFormat) || \"JSONANDYAML\".equals(outputFormat)) {\n                if (prettyPrint != null && prettyPrint) {\n                    openapiYaml = context.getOutputYamlMapper().writer(new DefaultPrettyPrinter()).writeValueAsString(openAPI);\n                } else {\n                    openapiYaml = context.getOutputYamlMapper().writeValueAsString(openAPI);\n                }\n            }\n            Map<String, String> map = new HashMap<>();\n            map.put(\"JSON\", openapiJson);\n            map.put(\"YAML\", openapiYaml);\n            return map;\n        } catch (OpenApiConfigurationException e) {\n                throw new Exception(\"Error resolving API specification: \" + e.getMessage(), e);\n        } catch (Exception e) {\n                throw new Exception(\"Error resolving API specification: \" + e.getMessage(), e);\n        }\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/XmlWebOpenApiContext.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport io.swagger.v3.jaxrs2.integration.api.WebOpenApiContext;\nimport io.swagger.v3.oas.integration.api.OpenApiConfigurationLoader;\nimport org.apache.commons.lang3.tuple.ImmutablePair;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport javax.servlet.ServletConfig;\nimport javax.servlet.ServletContext;\nimport java.util.Arrays;\nimport java.util.LinkedList;\nimport java.util.List;\nimport java.util.Map;\n\npublic class XmlWebOpenApiContext<T extends XmlWebOpenApiContext<T>> extends JaxrsOpenApiContext<T> implements WebOpenApiContext {\n\n    private ServletContext servletContext;\n    private ServletConfig servletConfig;\n\n    Logger LOGGER = LoggerFactory.getLogger(XmlWebOpenApiContext.class);\n\n    @Override\n    public ServletContext getServletContext() {\n        return servletContext;\n    }\n\n    @Override\n    public ServletConfig getServletConfig() {\n        return servletConfig;\n    }\n\n    public T servletConfig(ServletConfig servletConfig) {\n\n        if (!ServletConfigContextUtils.isServletConfigAvailable(servletConfig)) {\n            return (T) this;\n        }\n        this.servletConfig = servletConfig;\n        this.servletContext = servletConfig.getServletContext();\n        return (T) this;\n    }\n\n    @Override\n    protected List<ImmutablePair<String, String>> getKnownLocations() {\n\n        List<ImmutablePair<String, String>> locations = new LinkedList<>(Arrays.asList(\n                new ImmutablePair<>(\"servlet\", ServletConfigContextUtils.OPENAPI_CONFIGURATION_LOCATION_KEY),\n                new ImmutablePair<>(\"servletpath\", \"openapi-configuration.yaml\"),\n                new ImmutablePair<>(\"servletpath\", \"openapi-configuration.json\"),\n                new ImmutablePair<>(\"servletpath\", \"WEB-INF/openapi-configuration.yaml\"),\n                new ImmutablePair<>(\"servletpath\", \"WEB-INF/openapi-configuration.json\"),\n                new ImmutablePair<>(\"servletpath\", \"openapi.yaml\"),\n                new ImmutablePair<>(\"servletpath\", \"openapi.json\"),\n                new ImmutablePair<>(\"servletpath\", \"WEB-INF/openapi.yaml\"),\n                new ImmutablePair<>(\"servletpath\", \"WEB-INF/openapi.json\")\n        ));\n        locations.addAll(super.getKnownLocations());\n        locations.add(new ImmutablePair<>(\"servlet\", \"\"));  // get config from init params\n        return locations;\n    }\n\n    @Override\n    protected Map<String, OpenApiConfigurationLoader> getLocationLoaders() {\n        Map<String, OpenApiConfigurationLoader> map = super.getLocationLoaders();\n        map.put(\"servlet\", new ServletOpenApiConfigurationLoader(servletConfig));\n        map.put(\"servletpath\", new ServletPathConfigurationLoader(servletConfig));\n        return map;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/api/JaxrsOpenApiScanner.java",
    "content": "package io.swagger.v3.jaxrs2.integration.api;\n\nimport io.swagger.v3.oas.integration.api.OpenApiScanner;\n\nimport javax.ws.rs.core.Application;\n\npublic interface JaxrsOpenApiScanner extends OpenApiScanner {\n\n    void setApplication(Application application);\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/api/WebOpenApiContext.java",
    "content": "package io.swagger.v3.jaxrs2.integration.api;\n\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\n\nimport javax.servlet.ServletConfig;\nimport javax.servlet.ServletContext;\n\npublic interface WebOpenApiContext extends OpenApiContext {\n\n    ServletContext getServletContext();\n\n    ServletConfig getServletConfig();\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/resources/AcceptHeaderOpenApiResource.java",
    "content": "package io.swagger.v3.jaxrs2.integration.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.servlet.ServletConfig;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.Application;\nimport javax.ws.rs.core.Context;\nimport javax.ws.rs.core.HttpHeaders;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\nimport javax.ws.rs.core.UriInfo;\n\n@Path(\"/openapi\")\npublic class AcceptHeaderOpenApiResource extends BaseOpenApiResource {\n    @Context\n    ServletConfig config;\n\n    @Context\n    Application app;\n\n    @GET\n    @Produces({MediaType.APPLICATION_JSON})\n    @Operation(hidden = true)\n    public Response getOpenApiJson(@Context HttpHeaders headers,\n                                   @Context UriInfo uriInfo) throws Exception {\n\n        return super.getOpenApi(headers, config, app, uriInfo, \"json\");\n    }\n\n    @GET\n    @Produces({\"application/yaml\"})\n    @Operation(hidden = true)\n    public Response getOpenApiYaml(@Context HttpHeaders headers,\n                                   @Context UriInfo uriInfo) throws Exception {\n\n        return super.getOpenApi(headers, config, app, uriInfo, \"yaml\");\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/resources/BaseOpenApiResource.java",
    "content": "package io.swagger.v3.jaxrs2.integration.resources;\n\nimport com.fasterxml.jackson.core.util.DefaultPrettyPrinter;\nimport io.swagger.v3.core.filter.OpenAPISpecFilter;\nimport io.swagger.v3.core.filter.SpecFilter;\nimport io.swagger.v3.jaxrs2.integration.JaxrsOpenApiContextBuilder;\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.apache.commons.lang3.StringUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport javax.servlet.ServletConfig;\nimport javax.ws.rs.core.Application;\nimport javax.ws.rs.core.HttpHeaders;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.MultivaluedMap;\nimport javax.ws.rs.core.Response;\nimport javax.ws.rs.core.UriInfo;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\n\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.getContextIdFromServletConfig;\n\npublic abstract class BaseOpenApiResource {\n\n    private static Logger LOGGER = LoggerFactory.getLogger(BaseOpenApiResource.class);\n\n    protected String getContextId(ServletConfig config) {\n        return getContextIdFromServletConfig(config);\n    }\n\n    protected Response getOpenApi(HttpHeaders headers,\n                                  ServletConfig config,\n                                  Application app,\n                                  UriInfo uriInfo,\n                                  String type) throws Exception {\n\n        String ctxId = getContextId(config);\n        OpenApiContext ctx = new JaxrsOpenApiContextBuilder()\n                .servletConfig(config)\n                .application(app)\n                .resourcePackages(resourcePackages)\n                .configLocation(configLocation)\n                .openApiConfiguration(openApiConfiguration)\n                .ctxId(ctxId)\n                .buildContext(true);\n        OpenAPI oas = ctx.read();\n        boolean pretty = ctx.getOpenApiConfiguration() != null && Boolean.TRUE.equals(ctx.getOpenApiConfiguration().isPrettyPrint());\n\n        if (oas != null && ctx.getOpenApiConfiguration() != null) {\n            if (ctx.getOpenApiConfiguration().getFilterClass() != null) {\n                try {\n                    OpenAPISpecFilter filterImpl = (OpenAPISpecFilter) Class.forName(ctx.getOpenApiConfiguration().getFilterClass()).newInstance();\n                    SpecFilter f = new SpecFilter();\n                    oas = f.filter(oas, filterImpl, getQueryParams(uriInfo.getQueryParameters()), getCookies(headers),\n                            getHeaders(headers));\n                } catch (Exception e) {\n                    LOGGER.error(\"failed to load filter\", e);\n                }\n            }\n        }\n\n        if (oas == null) {\n            return Response.status(404).build();\n        }\n\n        if (StringUtils.isNotBlank(type) && type.trim().equalsIgnoreCase(\"yaml\")) {\n            return Response.status(Response.Status.OK)\n                    .entity(pretty ?\n                            ctx.getOutputYamlMapper().writer(new DefaultPrettyPrinter()).writeValueAsString(oas) :\n                            ctx.getOutputYamlMapper().writeValueAsString(oas))\n                    .type(\"application/yaml\")\n                    .build();\n        } else {\n            return Response.status(Response.Status.OK)\n                    .entity(pretty ?\n                            ctx.getOutputJsonMapper().writer(new DefaultPrettyPrinter()).writeValueAsString(oas) :\n                            ctx.getOutputJsonMapper().writeValueAsString(oas))\n                    .type(MediaType.APPLICATION_JSON_TYPE)\n                    .build();\n        }\n    }\n\n    private static Map<String, List<String>> getQueryParams(MultivaluedMap<String, String> params) {\n        Map<String, List<String>> output = new HashMap<>();\n        if (params != null) {\n            params.forEach(output::put);\n        }\n        return output;\n    }\n\n    private static Map<String, String> getCookies(HttpHeaders headers) {\n        Map<String, String> output = new HashMap<>();\n        if (headers != null) {\n            headers.getCookies().forEach((k, v) -> output.put(k, v.getValue()));\n        }\n        return output;\n    }\n\n    private static Map<String, List<String>> getHeaders(HttpHeaders headers) {\n        Map<String, List<String>> output = new HashMap<>();\n        if (headers != null) {\n            headers.getRequestHeaders().forEach(output::put);\n        }\n        return output;\n    }\n\n    protected String configLocation;\n\n    public String getConfigLocation() {\n        return configLocation;\n    }\n\n    public void setConfigLocation(String configLocation) {\n        this.configLocation = configLocation;\n    }\n\n    public BaseOpenApiResource configLocation(String configLocation) {\n        setConfigLocation(configLocation);\n        return this;\n    }\n\n    protected Set<String> resourcePackages;\n\n    public Set<String> getResourcePackages() {\n        return resourcePackages;\n    }\n\n    public void setResourcePackages(Set<String> resourcePackages) {\n        this.resourcePackages = resourcePackages;\n    }\n\n    public BaseOpenApiResource resourcePackages(Set<String> resourcePackages) {\n        setResourcePackages(resourcePackages);\n        return this;\n    }\n\n    protected OpenAPIConfiguration openApiConfiguration;\n\n    public OpenAPIConfiguration getOpenApiConfiguration() {\n        return openApiConfiguration;\n    }\n\n    public void setOpenApiConfiguration(OpenAPIConfiguration openApiConfiguration) {\n        this.openApiConfiguration = openApiConfiguration;\n    }\n\n    public BaseOpenApiResource openApiConfiguration(OpenAPIConfiguration openApiConfiguration) {\n        setOpenApiConfiguration(openApiConfiguration);\n        return this;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/resources/OpenApiResource.java",
    "content": "package io.swagger.v3.jaxrs2.integration.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.servlet.ServletConfig;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.Application;\nimport javax.ws.rs.core.Context;\nimport javax.ws.rs.core.HttpHeaders;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\nimport javax.ws.rs.core.UriInfo;\n\n@Path(\"/openapi.{type:json|yaml}\")\npublic class OpenApiResource extends BaseOpenApiResource {\n    @Context\n    ServletConfig config;\n\n    @Context\n    Application app;\n\n    @GET\n    @Produces({MediaType.APPLICATION_JSON, \"application/yaml\"})\n    @Operation(hidden = true)\n    public Response getOpenApi(@Context HttpHeaders headers,\n                               @Context UriInfo uriInfo,\n                               @PathParam(\"type\") String type) throws Exception {\n\n        return super.getOpenApi(headers, config, app, uriInfo, type);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/util/ReaderUtils.java",
    "content": "package io.swagger.v3.jaxrs2.util;\n\nimport com.fasterxml.jackson.annotation.JsonView;\nimport io.swagger.v3.core.util.ParameterProcessor;\nimport io.swagger.v3.core.util.ReflectionUtils;\nimport io.swagger.v3.jaxrs2.ext.OpenAPIExtension;\nimport io.swagger.v3.jaxrs2.ext.OpenAPIExtensions;\nimport io.swagger.v3.oas.integration.api.OpenAPIConfiguration;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport org.apache.commons.lang3.StringUtils;\n\nimport javax.ws.rs.HttpMethod;\nimport javax.ws.rs.core.Context;\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Constructor;\nimport java.lang.reflect.Field;\nimport java.lang.reflect.Method;\nimport java.lang.reflect.Modifier;\nimport java.lang.reflect.Type;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.HashSet;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Optional;\n\npublic class ReaderUtils {\n    private static final String GET_METHOD = \"get\";\n    private static final String POST_METHOD = \"post\";\n    private static final String PUT_METHOD = \"put\";\n    private static final String DELETE_METHOD = \"delete\";\n    private static final String HEAD_METHOD = \"head\";\n    private static final String OPTIONS_METHOD = \"options\";\n    private static final String PATH_DELIMITER = \"/\";\n\n    public static List<Parameter> collectConstructorParameters(Class<?> cls, Components components, javax.ws.rs.Consumes classConsumes, JsonView jsonViewAnnotation) {\n        return collectConstructorParameters(cls, components, classConsumes, jsonViewAnnotation, null);\n    }\n\n    public static List<Parameter> collectConstructorParameters(Class<?> cls, Components components, javax.ws.rs.Consumes classConsumes, JsonView jsonViewAnnotation, Schema.SchemaResolution schemaResolution) {\n        return collectConstructorParameters(cls, components, classConsumes, jsonViewAnnotation, schemaResolution, false);\n    }\n    /**\n     * Collects constructor-level parameters from class.\n     *\n     * @param cls        is a class for collecting\n     * @param components\n     * @return the collection of supported parameters\n     */\n    public static List<Parameter> collectConstructorParameters(Class<?> cls, Components components, javax.ws.rs.Consumes classConsumes, JsonView jsonViewAnnotation, Schema.SchemaResolution schemaResolution, boolean openapi31) {\n        if (cls.isLocalClass() || (cls.isMemberClass() && !Modifier.isStatic(cls.getModifiers()))) {\n            return Collections.emptyList();\n        }\n\n        List<Parameter> selected = Collections.emptyList();\n        int maxParamsCount = 0;\n\n        for (Constructor<?> constructor : cls.getDeclaredConstructors()) {\n            if (!ReflectionUtils.isConstructorCompatible(constructor)\n                    && !ReflectionUtils.isInject(Arrays.asList(constructor.getDeclaredAnnotations()))) {\n                continue;\n            }\n\n            final Type[] genericParameterTypes = constructor.getGenericParameterTypes();\n            final Annotation[][] annotations = constructor.getParameterAnnotations();\n\n            int paramsCount = 0;\n            final List<Parameter> parameters = new ArrayList<>();\n            for (int i = 0; i < genericParameterTypes.length; i++) {\n                final List<Annotation> tmpAnnotations = Arrays.asList(annotations[i]);\n                if (isContext(tmpAnnotations)) {\n                    paramsCount++;\n                } else {\n                    final Type genericParameterType = genericParameterTypes[i];\n                    final List<Parameter> tmpParameters = collectParameters(genericParameterType, tmpAnnotations, components, classConsumes, jsonViewAnnotation);\n                    if (! tmpParameters.isEmpty()) {\n                        for (Parameter tmpParameter : tmpParameters) {\n                            Parameter processedParameter = ParameterProcessor.applyAnnotations(\n                                    tmpParameter,\n                                    genericParameterType,\n                                    tmpAnnotations,\n                                    components,\n                                    classConsumes == null ? new String[0] : classConsumes.value(),\n                                    null,\n                                    jsonViewAnnotation,\n                                    openapi31,\n                                    schemaResolution);\n                            if (processedParameter != null) {\n                                parameters.add(processedParameter);\n                            }\n                        }\n                        paramsCount++;\n                    }\n                }\n            }\n\n            if (paramsCount >= maxParamsCount) {\n                maxParamsCount = paramsCount;\n                selected = parameters;\n            }\n        }\n\n        return selected;\n    }\n\n    /**\n     * Collects field-level parameters from class.\n     *\n     * @param cls        is a class for collecting\n     * @param components\n     * @return the collection of supported parameters\n     */\n    public static List<Parameter> collectFieldParameters(Class<?> cls, Components components, javax.ws.rs.Consumes classConsumes, JsonView jsonViewAnnotation) {\n        final List<Parameter> parameters = new ArrayList<>();\n        for (Field field : ReflectionUtils.getDeclaredFields(cls)) {\n            final List<Annotation> annotations = Arrays.asList(field.getAnnotations());\n            final Type genericType = field.getGenericType();\n            parameters.addAll(collectParameters(genericType, annotations, components, classConsumes, jsonViewAnnotation));\n        }\n        return parameters;\n    }\n\n    private static List<Parameter> collectParameters(Type type, List<Annotation> annotations, Components components, javax.ws.rs.Consumes classConsumes, JsonView jsonViewAnnotation) {\n        final Iterator<OpenAPIExtension> chain = OpenAPIExtensions.chain();\n        return chain.hasNext() ? chain.next().extractParameters(annotations, type, new HashSet<>(), components, classConsumes, null, false, jsonViewAnnotation, chain).parameters :\n                Collections.emptyList();\n    }\n\n    private static boolean isContext(List<Annotation> annotations) {\n        for (Annotation annotation : annotations) {\n            if (annotation instanceof Context) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    public static Optional<List<String>> getStringListFromStringArray(String[] array) {\n        if (array == null) {\n            return Optional.empty();\n        }\n        List<String> list = new ArrayList<>();\n        boolean isEmpty = true;\n        for (String value : array) {\n            if (StringUtils.isNotBlank(value)) {\n                isEmpty = false;\n            }\n            list.add(value);\n        }\n        if (isEmpty) {\n            return Optional.empty();\n        }\n        return Optional.of(list);\n    }\n\n    public static boolean isIgnored(String path, OpenAPIConfiguration config) {\n        if (config.getIgnoredRoutes() == null) {\n            return false;\n        }\n        for (String item : config.getIgnoredRoutes()) {\n            final int length = item.length();\n            if (path.startsWith(item) && (path.length() == length || path.startsWith(PATH_DELIMITER, length))) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    public static String getPath(javax.ws.rs.Path classLevelPath, javax.ws.rs.Path methodLevelPath, String parentPath, boolean isSubresource) {\n        if (classLevelPath == null && methodLevelPath == null && StringUtils.isEmpty(parentPath)) {\n            return null;\n        }\n        StringBuilder b = new StringBuilder();\n        appendPathComponent(parentPath, b);\n        if (classLevelPath != null && !isSubresource) {\n            appendPathComponent(classLevelPath.value(), b);\n        }\n        if (methodLevelPath != null) {\n            appendPathComponent(methodLevelPath.value(), b);\n        }\n        return b.length() == 0 ? \"/\" : b.toString();\n    }\n\n    /**\n     * appends a path component string to a StringBuilder\n     * guarantees:\n     * <ul>\n     *     <li>nulls, empty strings and \"/\" are nops</li>\n     *     <li>output will always start with \"/\" and never end with \"/\"</li>\n     * </ul>\n     * @param component component to be added\n     * @param to output\n     */\n    private static void appendPathComponent(String component, StringBuilder to) {\n        if (component == null || component.isEmpty() || \"/\".equals(component)) {\n            return;\n        }\n        if (!component.startsWith(\"/\") && (to.length() == 0 || '/' != to.charAt(to.length() - 1))) {\n            to.append(\"/\");\n        }\n        if (component.endsWith(\"/\")) {\n            to.append(component, 0, component.length() - 1);\n        } else {\n            to.append(component);\n        }\n    }\n\n    public static String extractOperationMethod(Method method, Iterator<OpenAPIExtension> chain) {\n        if (method.getAnnotation(javax.ws.rs.GET.class) != null) {\n            return GET_METHOD;\n        } else if (method.getAnnotation(javax.ws.rs.PUT.class) != null) {\n            return PUT_METHOD;\n        } else if (method.getAnnotation(javax.ws.rs.POST.class) != null) {\n            return POST_METHOD;\n        } else if (method.getAnnotation(javax.ws.rs.DELETE.class) != null) {\n            return DELETE_METHOD;\n        } else if (method.getAnnotation(javax.ws.rs.OPTIONS.class) != null) {\n            return OPTIONS_METHOD;\n        } else if (method.getAnnotation(javax.ws.rs.HEAD.class) != null) {\n            return HEAD_METHOD;\n        } else if (method.getAnnotation(HttpMethod.class) != null) {\n            HttpMethod httpMethod = method.getAnnotation(HttpMethod.class);\n            return httpMethod.value().toLowerCase();\n        } else if (!StringUtils.isEmpty(getHttpMethodFromCustomAnnotations(method))) {\n            return getHttpMethodFromCustomAnnotations(method);\n        } else if ((ReflectionUtils.getOverriddenMethod(method)) != null) {\n            return extractOperationMethod(ReflectionUtils.getOverriddenMethod(method), chain);\n        } else if (chain != null && chain.hasNext()) {\n            return chain.next().extractOperationMethod(method, chain);\n        } else {\n            return null;\n        }\n    }\n\n    public static String getHttpMethodFromCustomAnnotations(Method method) {\n        for (Annotation methodAnnotation : method.getAnnotations()) {\n            HttpMethod httpMethod = methodAnnotation.annotationType().getAnnotation(HttpMethod.class);\n            if (httpMethod != null) {\n                return httpMethod.value().toLowerCase();\n            }\n        }\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/util/ServletUtils.java",
    "content": "package io.swagger.v3.jaxrs2.util;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport javax.servlet.http.Cookie;\nimport javax.servlet.http.HttpServletRequest;\nimport javax.ws.rs.core.MultivaluedHashMap;\nimport java.io.UnsupportedEncodingException;\nimport java.net.URLDecoder;\nimport java.nio.charset.StandardCharsets;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.function.Function;\nimport java.util.stream.Collectors;\n\npublic class ServletUtils {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(ServletUtils.class);\n\n    public static MultivaluedHashMap<String, String> getQueryParams(Map<String, String[]> parameterMap) {\n        MultivaluedHashMap<String, String> queryParameters = new MultivaluedHashMap<>();\n\n        if (parameterMap.size() == 0) {\n            return queryParameters;\n        }\n\n        for (Map.Entry<String, String[]> parameter : parameterMap.entrySet()) {\n            for (String value : parameter.getValue()) {\n                try {\n                    queryParameters.add(URLDecoder.decode(parameter.getKey(), StandardCharsets.UTF_8.name()),\n                            URLDecoder.decode(value, StandardCharsets.UTF_8.name()));\n                } catch (UnsupportedEncodingException e) {\n                    LOGGER.error(\"Unable to decode query parameter\", e);\n                }\n            }\n        }\n        return queryParameters;\n    }\n\n    public static Map<String, String> getCookies(Cookie[] cookies) {\n        Map<String, String> mapOfCookies = new HashMap<>();\n        if (cookies != null) {\n            for (Cookie cookie : cookies) {\n                mapOfCookies.put(cookie.getName(), cookie.getValue());\n            }\n        }\n        return mapOfCookies;\n    }\n\n    public static Map<String, List<String>> getHeaders(HttpServletRequest req) {\n        if (req.getHeaderNames() == null) {\n            return Collections.emptyMap();\n        } else {\n            return Collections\n                    .list(req.getHeaderNames())\n                    .stream()\n                    .collect(Collectors.toMap(\n                            Function.identity(),\n                            header -> Collections.list(req.getHeaders(header))));\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/main/resources/META-INF/beans.xml",
    "content": "<beans version=\"2.0\" bean-discovery-mode=\"all\"></beans>\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/com/my/project/resources/ResourceInPackageA.java",
    "content": "package com.my.project.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport java.util.ArrayList;\n\n@Path(\"/packageA\")\npublic class ResourceInPackageA {\n    @Operation(operationId = \"test.\")\n    @GET\n    public void getTest(@Parameter(name = \"test\") ArrayList<String> tenantId) {\n        return;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/com/my/sorted/resources/SortedThing.java",
    "content": "package com.my.sorted.resources;\n\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@Path(\"/sorted\")\npublic class SortedThing {\n\n    @Operation(operationId = \"foo\")\n    @GET\n    @Path(\"/pet\")\n    public Pet foo() {\n        return null;\n    }\n\n    @Operation(operationId = \"bar\")\n    @GET\n    @Path(\"/pet\")\n    public Pet bar() {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/BeanParamTest.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport java.util.List;\n\nimport javax.ws.rs.BeanParam;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\nimport io.swagger.v3.jaxrs2.resources.model.NestedBeanParam;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport org.testng.Assert;\nimport org.testng.annotations.Test;\n\nimport io.swagger.v3.jaxrs2.resources.model.ListOfStringsBeanParam;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class BeanParamTest {\n\n    @Path(\"/\")\n    private static class MyBeanParamResource {\n        @GET\n        public String getWithBeanParam(@BeanParam ListOfStringsBeanParam listOfStringsBean) {\n            return \"result\";\n        }\n\n        @GET\n        @Path(\"/nested-param\")\n        public String getWithNestedBeanParam(@BeanParam NestedBeanParam listOfStringsBean) {\n            return \"result\";\n        }\n\n    }\n\n    @Test(description = \"check array type of serialized BeanParam containing QueryParams\") // tests issue #2466\n    public void shouldSerializeTypeParameter() {\n        OpenAPI openApi = new Reader(new OpenAPI()).read(MyBeanParamResource.class);\n        List<Parameter> getOperationParams = openApi.getPaths().get(\"/\").getGet().getParameters();\n        assertEquals(getOperationParams.size(), 1);\n        Parameter param = getOperationParams.get(0);\n        assertEquals(param.getName(), \"listOfStrings\");\n        Schema<?> schema = param.getSchema();\n        // These are the important checks:\n        assertEquals(schema.getClass(), ArraySchema.class);\n        assertEquals(schema.getItems().getType(), \"string\");\n    }\n\n    @Test(description = \"check integer type of nested BeanParam containing a QueryParam\") // tests issue #2466\n    public void shouldSerializeNestedTypeParameter() {\n        OpenAPI openApi = new Reader(new OpenAPI()).read(MyBeanParamResource.class);\n        List<Parameter> getOperationParams = openApi.getPaths().get(\"/nested-param\").getGet().getParameters();\n        Assert.assertEquals(getOperationParams.size(), 1);\n\n        Parameter queryParam = getOperationParams.get(0);\n        Assert.assertEquals(queryParam.getName(), \"queryParam\");\n        Schema<?> schema = queryParam.getSchema();\n        Assert.assertEquals(schema.getClass(), IntegerSchema.class);\n        Assert.assertEquals(schema.getType(), \"integer\");\n        Assert.assertEquals(((IntegerSchema) schema).getDefault(), 10);\n    }\n\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/BinaryParameterResourceTest.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport java.io.IOException;\n\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.AfterTest;\nimport org.testng.annotations.BeforeTest;\nimport org.testng.annotations.Test;\n\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport io.swagger.v3.jaxrs2.resources.BinaryParameterResource;\n\npublic class BinaryParameterResourceTest extends AbstractAnnotationTest {\n\n    @Test(description = \"check binary model serialization with base64\", singleThreaded = true) // tests issue #2466\n    public void shouldSerializeBinaryParameterBase64() throws IOException {\n        try {\n            System.setProperty(Schema.BINARY_STRING_CONVERSION_PROPERTY, Schema.BynaryStringConversion.BINARY_STRING_CONVERSION_BASE64.toString());\n            compareAsYaml(BinaryParameterResource.class, getOpenAPIAsString(\"BinaryParameterResource.yaml\"));\n        } finally {\n            System.clearProperty(Schema.BINARY_STRING_CONVERSION_PROPERTY);\n        }\n    }\n\n    @BeforeTest\n    public void before() {\n        System.clearProperty(Schema.BINARY_STRING_CONVERSION_PROPERTY);\n    }\n\n    @AfterTest\n    public void after() {\n        System.clearProperty(Schema.BINARY_STRING_CONVERSION_PROPERTY);\n    }\n\n\n    @Test(description = \"check binary model serialization with StringSchema\", singleThreaded = true) // tests issue #2466\n    public void shouldSerializeBinaryParameterStringSchema() throws IOException {\n        try {\n            System.setProperty(Schema.BINARY_STRING_CONVERSION_PROPERTY, Schema.BynaryStringConversion.BINARY_STRING_CONVERSION_STRING_SCHEMA.toString());\n            compareAsYaml(BinaryParameterResource.class, getOpenAPIAsString(\"BinaryParameterResource.yaml\"));\n        } finally {\n            System.clearProperty(Schema.BINARY_STRING_CONVERSION_PROPERTY);\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/BootstrapServlet.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport com.fasterxml.jackson.core.util.DefaultPrettyPrinter;\nimport io.swagger.v3.jaxrs2.integration.JaxrsOpenApiContextBuilder;\nimport io.swagger.v3.oas.integration.OpenApiConfigurationException;\nimport io.swagger.v3.oas.integration.OpenApiContextLocator;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.info.Contact;\nimport io.swagger.v3.oas.models.info.Info;\nimport io.swagger.v3.oas.models.info.License;\n\nimport javax.servlet.ServletConfig;\nimport javax.servlet.ServletException;\nimport javax.servlet.http.HttpServlet;\nimport javax.servlet.http.HttpServletRequest;\nimport javax.servlet.http.HttpServletResponse;\nimport java.io.IOException;\nimport java.io.PrintWriter;\nimport java.util.stream.Collectors;\nimport java.util.stream.Stream;\n\nimport static io.swagger.v3.jaxrs2.integration.ServletConfigContextUtils.getContextIdFromServletConfig;\n\npublic class BootstrapServlet extends HttpServlet {\n\n    @Override\n    public void init(ServletConfig config) throws ServletException {\n        OpenAPI oas = new OpenAPI().openapi(\"3.0.1\");\n        Info info = new Info()\n                .title(\"Swagger Sample App - independent config exposed by dedicated servlet\")\n                .description(\"This is a sample server Petstore server.  You can find out more about Swagger \" +\n                        \"at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).  For this sample, \" +\n                        \"you can use the api key `special-key` to test the authorization filters.\")\n                .termsOfService(\"http://swagger.io/terms/\")\n                .contact(new Contact()\n                        .email(\"apiteam@swagger.io\"))\n                .license(new License()\n                        .name(\"Apache 2.0\")\n                        .url(\"http://www.apache.org/licenses/LICENSE-2.0.html\"));\n\n        oas.info(info);\n        SwaggerConfiguration oasConfig = new SwaggerConfiguration()\n                .openAPI(oas)\n                .prettyPrint(true)\n                .openAPI31(true)\n                .convertToOpenAPI31(true)\n                .resourcePackages(Stream.of(\"io.swagger.v3.jaxrs2.it.resources\").collect(Collectors.toSet()));\n\n        try {\n            new JaxrsOpenApiContextBuilder()\n                    .servletConfig(config)\n                    .openApiConfiguration(oasConfig)\n                    .buildContext(true);\n        } catch (OpenApiConfigurationException e) {\n            throw new ServletException(e.getMessage(), e);\n        }\n    }\n\n    @Override\n    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n        String ctxId = getContextIdFromServletConfig(getServletConfig());\n        OpenApiContext ctx = OpenApiContextLocator.getInstance().getOpenApiContext(ctxId);\n        OpenAPI oas = ctx.read();\n\n        resp.setStatus(200);\n\n        resp.setContentType(\"application/yaml\");\n        try (PrintWriter pw = resp.getWriter()) {\n            pw.write(ctx.getOutputYamlMapper().writer(new DefaultPrettyPrinter()).writeValueAsString(oas));\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/ContainerTypeSchemaTicket2636Test.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport org.testng.annotations.Test;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport java.util.HashMap;\n\npublic class ContainerTypeSchemaTicket2636Test extends AbstractAnnotationTest {\n\n    @Test\n    public void testContainerTypeSchemaTicket2636() throws Exception {\n        String expectedYaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /path:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Op\\n\" +\n                \"      description: 'RequestBody contains a Schema class that extends a Map '\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/MyModel\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    MyModel:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        empty:\\n\" +\n                \"          type: boolean\\n\" +\n                \"      additionalProperties:\\n\" +\n                \"        type: string\";\n        compareAsYaml(RequestBodyInheritanceModelIssue.class, expectedYaml);\n    }\n\n    static class RequestBodyInheritanceModelIssue {\n        @Operation(\n                summary = \"Op\",\n                description = \"RequestBody contains a Schema class that extends a Map \",\n                operationId = \"getWithNoParameters\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet(@RequestBody(required=true,\n                content = @Content(mediaType = \"application/json\", schema = @Schema(implementation = MyModel.class)))\n                                      String data) {\n        }\n    }\n\n    class MyModel extends HashMap<String, String> {\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/DecoratorExtensionTest.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.jaxrs2.ext.AbstractOpenAPIExtension;\nimport io.swagger.v3.jaxrs2.ext.OpenAPIExtension;\nimport io.swagger.v3.jaxrs2.ext.OpenAPIExtensions;\nimport io.swagger.v3.jaxrs2.resources.SimpleResourceWithVendorAnnotation;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport org.testng.annotations.AfterMethod;\nimport org.testng.annotations.BeforeMethod;\nimport org.testng.annotations.Test;\n\nimport java.lang.reflect.Method;\nimport java.util.Iterator;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\n\npublic class DecoratorExtensionTest {\n\n    private static final String RESPONSE_DESCRIPTION = \"Some vendor error description\";\n\n    private static final String RESPONSE_STATUS_401 = \"401\";\n\n    private static final OpenAPIExtension customExtension = new AbstractOpenAPIExtension() {\n\n        @Override\n        public void decorateOperation(final Operation operation, final Method method, final Iterator<OpenAPIExtension> chain) {\n            method.getDeclaredAnnotations();\n            final SimpleResourceWithVendorAnnotation.VendorFunnyAnnotation myFunyError = method.getAnnotation(SimpleResourceWithVendorAnnotation.VendorFunnyAnnotation.class);\n            if (myFunyError != null) {\n                /*\n                 * Extend swagger model by new error response description, with additional data received from vendor\n                 * based annotation. This example overwrite existing response from swagger annotation, but it is only\n                 * for demo.\n                 */\n                final ApiResponse value = new ApiResponse();\n                value.setDescription(RESPONSE_DESCRIPTION);\n                operation.getResponses().put(RESPONSE_STATUS_401, value);\n            }\n        }\n    };\n\n    private OpenAPI getOpenAPI(final Class<?> cls) {\n        return new Reader(new OpenAPI()).read(cls);\n    }\n\n    private Operation getGet(final OpenAPI swagger, final String path) {\n        return swagger.getPaths().get(path).getGet();\n    }\n\n    @BeforeMethod()\n    public void addCustomExtension() {\n        OpenAPIExtensions.getExtensions().add(customExtension);\n    }\n\n    @AfterMethod()\n    public void removeCustomExtension() {\n        OpenAPIExtensions.getExtensions().remove(customExtension);\n    }\n\n    /**\n     * Test for method annotated with vendor annotation which could be used for swagger documentation.\n     */\n    @Test(description = \"scan a simple resource with custom decorator\")\n    public void scanSimpleResourceWithDecorator() {\n        final OpenAPI openAPI = getOpenAPI(SimpleResourceWithVendorAnnotation.class);\n\n        assertEquals(openAPI.getPaths().size(), 2);\n\n        final Operation get = getGet(openAPI, \"/{id}\");\n        assertNotNull(get);\n        assertEquals(get.getParameters().size(), 2);\n\n        final ApiResponse response = get.getResponses().get(RESPONSE_STATUS_401);\n        assertNotNull(response);\n        assertEquals(response.getDescription(), RESPONSE_DESCRIPTION);\n    }\n\n    /**\n     * Test for method annotated without vendor annotation.\n     */\n    @Test(description = \"scan a simple resource without custom decorator\")\n    public void scanSimpleResourceWithoutDecorator() {\n        final OpenAPI openAPI = getOpenAPI(SimpleResourceWithVendorAnnotation.class);\n\n        assertEquals(openAPI.getPaths().size(), 2);\n\n        final Operation get = getGet(openAPI, \"/{id}/value\");\n        assertNotNull(get);\n\n        final ApiResponse response = get.getResponses().get(RESPONSE_STATUS_401);\n        assertNull(response);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/EnumTest.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.jaxrs2.matchers.SerializationMatchers;\nimport io.swagger.v3.jaxrs2.resources.EnumParameterResource;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\n\npublic class EnumTest {\n\n    @Test(description = \"Test enum\")\n    public void testEnum() throws IOException {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(EnumParameterResource.class);\n        SerializationMatchers.assertEqualsToYaml(openAPI, EXPECTED_YAML);\n    }\n\n\n    static final String EXPECTED_YAML = \"openapi: 3.0.1\\n\" +\n            \"paths:\\n\" +\n            \"  /task:\\n\" +\n            \"    get:\\n\" +\n            \"      operationId: getTasks\\n\" +\n            \"      parameters:\\n\" +\n            \"      - name: guid\\n\" +\n            \"        in: query\\n\" +\n            \"        required: true\\n\" +\n            \"        schema:\\n\" +\n            \"          type: string\\n\" +\n            \"      - name: tasktype\\n\" +\n            \"        in: query\\n\" +\n            \"        schema:\\n\" +\n            \"          type: string\\n\" +\n            \"          enum:\\n\" +\n            \"          - A\\n\" +\n            \"          - B\\n\" +\n            \"      responses:\\n\" +\n            \"        \\\"200\\\":\\n\" +\n            \"          content:\\n\" +\n            \"            application/json:\\n\" +\n            \"              schema:\\n\" +\n            \"                type: array\\n\" +\n            \"                items:\\n\" +\n            \"                  $ref: \\\"#/components/schemas/TaskDTO\\\"\\n\" +\n            \"        \\\"404\\\":\\n\" +\n            \"          description: User not found\\n\" +\n            \"components:\\n\" +\n            \"  schemas:\\n\" +\n            \"    TaskDTO:\\n\" +\n            \"      type: object\\n\";\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/FormParamBeanTest.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.jaxrs2.resources.model.FormParamBean;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport org.testng.Assert;\nimport org.testng.annotations.Test;\n\nimport javax.ws.rs.*;\n\nimport static org.testng.Assert.assertNotNull;\n\npublic class FormParamBeanTest {\n\n    @Path(\"/\")\n    private static class MyFormBeanParamResource {\n        @GET\n        @Consumes(\"application/x-www-form-urlencoded\")\n        public String getWithFormBeanParam(@BeanParam FormParamBean formParamBean) {\n            return \"result\";\n        }\n    }\n\n    @Test(description = \"check schema of serialized BeanParam containing FormParams\")\n    public void shouldSerializeTypeParameter() {\n        OpenAPI openApi = new Reader(new OpenAPI()).read(MyFormBeanParamResource.class);\n        RequestBody requestBody = openApi.getPaths().get(\"/\").getGet().getRequestBody();\n        assertNotNull(requestBody);\n        MediaType mediaType = requestBody.getContent().get(\"application/x-www-form-urlencoded\");\n        assertNotNull(mediaType);\n        Schema schema = mediaType.getSchema();\n        Assert.assertEquals(schema.getProperties().size(), 3);\n        Assert.assertEquals(schema.getProperties().get(\"param1\"), new StringSchema());\n        Assert.assertEquals(schema.getProperties().get(\"param2\"), new StringSchema());\n        Assert.assertEquals(schema.getProperties().get(\"param3\"), new StringSchema());\n    }\n\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/JaxbObjectMapperFactory.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule;\nimport io.swagger.v3.core.util.ObjectMapperFactory;\n\npublic class JaxbObjectMapperFactory extends ObjectMapperFactory {\n\n    public static ObjectMapper getMapper() {\n        ObjectMapper mapper = ObjectMapperFactory.createJson();\n        mapper.registerModule(new JaxbAnnotationModule());\n        return mapper;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/JsonIdentityTest.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.jaxrs2.matchers.SerializationMatchers;\nimport io.swagger.v3.jaxrs2.resources.JsonIdentityCyclicResource;\nimport io.swagger.v3.jaxrs2.resources.JsonIdentityResource;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\n\npublic class JsonIdentityTest {\n\n    @Test(description = \"Test JsonIdentity\")\n    public void testJsonIdentity() throws IOException {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(JsonIdentityResource.class);\n        SerializationMatchers.assertEqualsToYaml(openAPI, EXPECTED_YAML);\n    }\n\n    @Test(description = \"Test JsonIdentity Cyclic\")\n    public void testJsonIdentityCyclic() throws IOException {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(JsonIdentityCyclicResource.class);\n        SerializationMatchers.assertEqualsToYaml(openAPI, EXPECTED_YAML_CYCLIC);\n    }\n\n    static final String EXPECTED_YAML_CYCLIC = \"openapi: 3.0.1\\n\" +\n            \"paths:\\n\" +\n            \"  /pet:\\n\" +\n            \"    post:\\n\" +\n            \"      description: Add a single object\\n\" +\n            \"      operationId: test\\n\" +\n            \"      requestBody:\\n\" +\n            \"        content:\\n\" +\n            \"          '*/*':\\n\" +\n            \"            schema:\\n\" +\n            \"              $ref: \\\"#/components/schemas/ModelWithJsonIdentityCyclic\\\"\\n\" +\n            \"        required: true\\n\" +\n            \"      responses:\\n\" +\n            \"        default:\\n\" +\n            \"          description: default response\\n\" +\n            \"          content:\\n\" +\n            \"            application/json: {}\\n\" +\n            \"            application/xml: {}\\n\" +\n            \"components:\\n\" +\n            \"  schemas:\\n\" +\n            \"    SourceDefinition:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        driver:\\n\" +\n            \"          type: string\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"        model:\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int64\\n\" +\n            \"    ModelWithJsonIdentityCyclic:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        id:\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int64\\n\" +\n            \"        sourceDefinitions:\\n\" +\n            \"          type: array\\n\" +\n            \"          items:\\n\" +\n            \"            $ref: \\\"#/components/schemas/SourceDefinition\\\"\\n\";\n\n    static final String EXPECTED_YAML = \"openapi: 3.0.1\\n\" +\n            \"paths:\\n\" +\n            \"  /pet:\\n\" +\n            \"    post:\\n\" +\n            \"      description: Add a single object\\n\" +\n            \"      operationId: test\\n\" +\n            \"      requestBody:\\n\" +\n            \"        content:\\n\" +\n            \"          '*/*':\\n\" +\n            \"            schema:\\n\" +\n            \"              $ref: \\\"#/components/schemas/ModelWithJsonIdentity\\\"\\n\" +\n            \"        required: true\\n\" +\n            \"      responses:\\n\" +\n            \"        default:\\n\" +\n            \"          description: default response\\n\" +\n            \"          content:\\n\" +\n            \"            application/json: {}\\n\" +\n            \"            application/xml: {}\\n\" +\n            \"components:\\n\" +\n            \"  schemas:\\n\" +\n            \"    ModelWithJsonIdentity:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        PropertyGeneratorAsId:\\n\" +\n            \"          type: string\\n\" +\n            \"        PropertyGeneratorAsProperty:\\n\" +\n            \"          $ref: \\\"#/components/schemas/SourceDefinition1\\\"\\n\" +\n            \"        ChangedPropertyName:\\n\" +\n            \"          type: string\\n\" +\n            \"        ChangedPropertyName2:\\n\" +\n            \"          type: string\\n\" +\n            \"        SourceWithoutPropertyAsId:\\n\" +\n            \"          type: string\\n\" +\n            \"        SourceWithoutPropertyAsProperty:\\n\" +\n            \"          $ref: \\\"#/components/schemas/SourceDefinition3\\\"\\n\" +\n            \"        IntSequenceGeneratorAsId:\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int32\\n\" +\n            \"        IntSequenceGeneratorAsProperty:\\n\" +\n            \"          $ref: \\\"#/components/schemas/SourceDefinition4\\\"\\n\" +\n            \"        IntSequenceWithoutPropertyAsId:\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int32\\n\" +\n            \"        IntSequenceWithoutPropertyAsProperty:\\n\" +\n            \"          $ref: \\\"#/components/schemas/SourceDefinition5\\\"\\n\" +\n            \"        UUIDGeneratorAsId:\\n\" +\n            \"          type: string\\n\" +\n            \"          format: uuid\\n\" +\n            \"        UUIDGeneratorAsProperty:\\n\" +\n            \"          $ref: \\\"#/components/schemas/SourceDefinition6\\\"\\n\" +\n            \"        UUIDGeneratorWithoutPropertyAsId:\\n\" +\n            \"          type: string\\n\" +\n            \"          format: uuid\\n\" +\n            \"        UUIDGeneratorWithoutPropertyAsProperty:\\n\" +\n            \"          $ref: \\\"#/components/schemas/SourceDefinition7\\\"\\n\" +\n            \"        GeneratorsNone:\\n\" +\n            \"          $ref: \\\"#/components/schemas/SourceDefinition8\\\"\\n\" +\n            \"        CustomGenerator:\\n\" +\n            \"          type: string\\n\" +\n            \"        WithoutJsonIdentityReference:\\n\" +\n            \"          $ref: \\\"#/components/schemas/SourceDefinition10\\\"\\n\" +\n            \"        IntSequenceGeneratorAtClassLevel:\\n\" +\n            \"          $ref: \\\"#/components/schemas/SourceDefinition11\\\"\\n\" +\n            \"    SourceDefinition1:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        driver:\\n\" +\n            \"          type: string\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"    SourceDefinition10:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        driver:\\n\" +\n            \"          type: string\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"    SourceDefinition11:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        'name':\\n\" +\n            \"          type: string\\n\" +\n            \"        '@id':\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int32\\n\"+\n            \"    SourceDefinition3:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"        driverId:\\n\" +\n            \"          type: string\\n\" +\n            \"        '@id':\\n\" +\n            \"          type: string\\n\" +\n            \"    SourceDefinition4:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"        testName2:\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int32\\n\" +\n            \"    SourceDefinition5:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"        '@id':\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int32\\n\" +\n            \"    SourceDefinition6:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"        UUID2:\\n\" +\n            \"          type: string\\n\" +\n            \"          format: uuid\\n\" +\n            \"    SourceDefinition7:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"        '@id':\\n\" +\n            \"          type: string\\n\" +\n            \"          format: uuid\\n\" +\n            \"    SourceDefinition8:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"        driverId:\\n\" +\n            \"          type: string\\n\";\n\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/JsonViewTest.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.media.MediaType;\n\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonView;\nimport com.fasterxml.jackson.core.JsonProcessingException;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Set;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\nimport org.testng.annotations.Test;\n\nimport static org.testng.Assert.assertFalse;\nimport static org.testng.Assert.assertTrue;\n\npublic class JsonViewTest {\n\n    private static class View {\n\n        interface Summary {\n\n        }\n\n        interface Detail extends Summary {\n\n        }\n\n        interface Sale {\n\n        }\n    }\n\n    private static class Car {\n\n        @JsonView(View.Summary.class)\n        @JsonProperty(\"manufacture\")\n        private String made = \"Honda\";\n\n        @JsonView({View.Summary.class, View.Detail.class})\n        private String model = \"Accord Hybrid\";\n\n        @JsonView({View.Detail.class})\n        @JsonProperty\n        private List<Tire> tires = Arrays.asList(new Tire());\n\n        @JsonView({View.Sale.class})\n        @JsonProperty\n        private int price = 40000;\n\n        // always in\n        private String color = \"White\";\n\n        public String getColor() {\n            return color;\n        }\n    }\n\n    private static class Tire {\n\n        @JsonView(View.Summary.class)\n        @JsonProperty(\"brand\")\n        private String made = \"Michelin\";\n\n        @JsonView(View.Detail.class)\n        @JsonProperty\n        private String condition = \"new\";\n    }\n\n    @Path(\"/\")\n    private static class CarSummaryApi {\n\n        @GET\n        @Path(\"/cars/summary\")\n        @JsonView({View.Summary.class})\n        public List<Car> getSummaries() {\n            return Arrays.asList(new Car());\n        }\n    }\n\n    @Path(\"/\")\n    private static class CarSummaryUpdateApi {\n\n        @PUT\n        @Path(\"/cars/summary\")\n        @Operation(description = \"Updates a car summary.\")\n        public Response updateCarSummary(\n            @RequestBody(content = @Content(schema = @Schema(implementation = Car.class)))\n            @JsonView(View.Summary.class)\n            Car car) {\n\n            return Response.noContent()\n                .build();\n        }\n    }\n\n    @Path(\"/\")\n    private static class CarDetailApi {\n\n        @GET\n        @Path(\"/cars/detail\")\n        @JsonView({View.Detail.class})\n        @Operation(description = \"Return car detail\",\n                responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema (implementation = Car.class)))))\n        public Response getDetails() {\n            return Response.ok(Arrays.asList(new Car())).build();\n        }\n    }\n\n    @Path(\"/\")\n    private static class CarSaleSummaryApi {\n\n        @GET\n        @Path(\"/cars/sale\")\n        @JsonView({View.Summary.class, View.Sale.class})\n        public List<Car> getSaleSummaries() {\n            return Arrays.asList(new Car());\n        }\n    }\n\n    @Path(\"/\")\n    private static class CarApi {\n\n        @GET\n        @Path(\"/cars\")\n        public List<Car> getCars() {\n            return Arrays.asList(new Car());\n        }\n    }\n\n    @Path(\"/ignore\")\n    private static class CarIgnoreApi {\n\n        @GET\n        @Path(\"/cars\")\n        @JsonView({View.Summary.class, View.Sale.class})\n        @Operation(ignoreJsonView = true)\n        public List<Car> getCars() {\n            return Arrays.asList(new Car());\n        }\n    }\n\n    @Test(description = \"check awareness of JsonView\")\n    public void shouldSerializeTypeParameter() throws JsonProcessingException {\n\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(CarSummaryApi.class);\n        String openApiJson = Json.mapper().writeValueAsString(openAPI);\n        assertTrue(openApiJson.contains(\"manufacture\"));\n        assertTrue(openApiJson.contains(\"model\"));\n        assertTrue(openApiJson.contains(\"color\"));\n        assertFalse(openApiJson.contains(\"tires\"));\n        assertFalse(openApiJson.contains(\"made\"));\n        assertFalse(openApiJson.contains(\"condition\"));\n\n        reader = new Reader(new OpenAPI());\n        openAPI = reader.read(CarSummaryUpdateApi.class);\n        Set carSummarySchemaProperties = openAPI.getComponents()\n            .getSchemas()\n            .get(\"Car_Summary\")\n            .getProperties()\n            .keySet();\n        String carSummaryUpdateApiRequestBodySchemaRef = openAPI.getPaths()\n            .values()\n            .stream()\n            .findAny()\n            .orElse(new PathItem())\n            .getPut()\n            .getRequestBody()\n            .getContent()\n            .values()\n            .stream()\n            .findAny()\n            .orElse(new MediaType())\n            .getSchema()\n            .get$ref();\n        assertTrue(carSummarySchemaProperties.contains(\"manufacture\"));\n        assertTrue(carSummarySchemaProperties.contains(\"model\"));\n        assertTrue(carSummarySchemaProperties.contains(\"color\"));\n        assertFalse(carSummarySchemaProperties.contains(\"price\"));\n        assertFalse(carSummarySchemaProperties.contains(\"tires\"));\n        assertFalse(carSummarySchemaProperties.contains(\"made\"));\n        assertFalse(carSummarySchemaProperties.contains(\"condition\"));\n        assertTrue(carSummaryUpdateApiRequestBodySchemaRef.contains(\"Car_Summary\"));\n\n        reader = new Reader(new OpenAPI());\n        openAPI = reader.read(CarDetailApi.class);\n        openApiJson = Json.mapper().writeValueAsString(openAPI);\n        assertTrue(openApiJson.contains(\"manufacture\"));\n        assertTrue(openApiJson.contains(\"model\"));\n        assertTrue(openApiJson.contains(\"color\"));\n        assertTrue(openApiJson.contains(\"tires\"));\n        assertTrue(openApiJson.contains(\"brand\"));\n        assertTrue(openApiJson.contains(\"condition\"));\n        assertTrue(openApiJson.contains(\"Car_Detail\"));\n\n        reader = new Reader(new OpenAPI());\n        openAPI = reader.read(CarSaleSummaryApi.class);\n        openApiJson = Json.mapper().writeValueAsString(openAPI);\n        Yaml.prettyPrint(openAPI);\n        assertTrue(openApiJson.contains(\"manufacture\"));\n        assertTrue(openApiJson.contains(\"model\"));\n        assertTrue(openApiJson.contains(\"color\"));\n        assertTrue(openApiJson.contains(\"price\"));\n        assertFalse(openApiJson.contains(\"tires\"));\n        assertFalse(openApiJson.contains(\"made\"));\n        assertFalse(openApiJson.contains(\"condition\"));\n\n        reader = new Reader(new OpenAPI());\n        openAPI = reader.read(CarApi.class);\n        openApiJson = Json.mapper().writeValueAsString(openAPI);\n        assertTrue(openApiJson.contains(\"manufacture\"));\n        assertTrue(openApiJson.contains(\"model\"));\n        assertTrue(openApiJson.contains(\"color\"));\n        assertTrue(openApiJson.contains(\"price\"));\n        assertTrue(openApiJson.contains(\"tires\"));\n        assertFalse(openApiJson.contains(\"made\"));\n        assertTrue(openApiJson.contains(\"condition\"));\n\n        reader = new Reader(new OpenAPI());\n        openAPI = reader.read(CarIgnoreApi.class);\n        openApiJson = Json.mapper().writeValueAsString(openAPI);\n        assertTrue(openApiJson.contains(\"manufacture\"));\n        assertTrue(openApiJson.contains(\"model\"));\n        assertTrue(openApiJson.contains(\"color\"));\n        assertTrue(openApiJson.contains(\"price\"));\n        assertTrue(openApiJson.contains(\"tires\"));\n        assertFalse(openApiJson.contains(\"made\"));\n        assertTrue(openApiJson.contains(\"condition\"));\n    }\n\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/PetResourceTest.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport io.swagger.v3.jaxrs2.matchers.SerializationMatchers;\nimport io.swagger.v3.jaxrs2.petstore.EmptyPetResource;\nimport io.swagger.v3.jaxrs2.petstore.WebHookResource;\nimport io.swagger.v3.jaxrs2.petstore.callback.ComplexCallback31Resource;\nimport io.swagger.v3.jaxrs2.petstore.callback.ComplexCallbackResource;\nimport io.swagger.v3.jaxrs2.petstore.callback.MultipleCallbacksTestWithOperationResource;\nimport io.swagger.v3.jaxrs2.petstore.callback.RepeatableCallbackResource;\nimport io.swagger.v3.jaxrs2.petstore.callback.SimpleCallbackWithOperationResource;\nimport io.swagger.v3.jaxrs2.petstore.example.ExamplesResource;\nimport io.swagger.v3.jaxrs2.petstore.link.LinksAndContent31Resource;\nimport io.swagger.v3.jaxrs2.petstore.link.LinksResource;\nimport io.swagger.v3.jaxrs2.petstore.openapidefintion.OpenAPI31DefinitionResource;\nimport io.swagger.v3.jaxrs2.petstore.openapidefintion.OpenAPIDefinitionResource;\nimport io.swagger.v3.jaxrs2.petstore.operation.AnnotatedSameNameOperationResource;\nimport io.swagger.v3.jaxrs2.petstore.operation.ExternalDocumentationResource;\nimport io.swagger.v3.jaxrs2.petstore.operation.FullyAnnotatedOperationResource;\nimport io.swagger.v3.jaxrs2.petstore.operation.HiddenOperationResource;\nimport io.swagger.v3.jaxrs2.petstore.operation.NotAnnotatedSameNameOperationResource;\nimport io.swagger.v3.jaxrs2.petstore.operation.OperationResource;\nimport io.swagger.v3.jaxrs2.petstore.operation.OperationWithoutAnnotationResource;\nimport io.swagger.v3.jaxrs2.petstore.operation.ServerOperationResource;\nimport io.swagger.v3.jaxrs2.petstore.operation.SubResource;\nimport io.swagger.v3.jaxrs2.petstore.parameter.ArraySchemaResource;\nimport io.swagger.v3.jaxrs2.petstore.parameter.ComplexParameterResource;\nimport io.swagger.v3.jaxrs2.petstore.parameter.ComplexParameterWithOperationResource;\nimport io.swagger.v3.jaxrs2.petstore.parameter.MultipleNotAnnotatedParameter;\nimport io.swagger.v3.jaxrs2.petstore.parameter.OpenAPIJaxRSAnnotatedParameter;\nimport io.swagger.v3.jaxrs2.petstore.parameter.OpenAPIWithContentJaxRSAnnotatedParameter;\nimport io.swagger.v3.jaxrs2.petstore.parameter.OpenAPIWithImplementationJaxRSAnnotatedParameter;\nimport io.swagger.v3.jaxrs2.petstore.parameter.Parameters31Resource;\nimport io.swagger.v3.jaxrs2.petstore.parameter.ParametersResource;\nimport io.swagger.v3.jaxrs2.petstore.parameter.RepeatableParametersResource;\nimport io.swagger.v3.jaxrs2.petstore.parameter.SingleJaxRSAnnotatedParameter;\nimport io.swagger.v3.jaxrs2.petstore.parameter.SingleNotAnnotatedParameter;\nimport io.swagger.v3.jaxrs2.petstore.requestbody.RequestBody31Resource;\nimport io.swagger.v3.jaxrs2.petstore.requestbody.RequestBodyMethodPriorityResource;\nimport io.swagger.v3.jaxrs2.petstore.requestbody.RequestBodyParameterPriorityResource;\nimport io.swagger.v3.jaxrs2.petstore.requestbody.RequestBodyResource;\nimport io.swagger.v3.jaxrs2.petstore.responses.*;\nimport io.swagger.v3.jaxrs2.petstore.security.SecurityResource;\nimport io.swagger.v3.jaxrs2.petstore.tags.CompleteTagResource;\nimport io.swagger.v3.jaxrs2.petstore.tags.TagClassResource;\nimport io.swagger.v3.jaxrs2.petstore.tags.TagMethodResource;\nimport io.swagger.v3.jaxrs2.petstore.tags.TagOpenAPIDefinitionResource;\nimport io.swagger.v3.jaxrs2.petstore.tags.TagOperationResource;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.testng.annotations.Test;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.net.URL;\nimport java.util.ArrayList;\nimport java.util.Enumeration;\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Set;\n\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.fail;\n\n/**\n * Pet Resource Test Class\n * Adding a lot of tests of different pet resource examples\n */\npublic class PetResourceTest extends AbstractAnnotationTest {\n    private static final Logger LOGGER = LoggerFactory.getLogger(PetResourceTest.class);\n    private static final String PETSTORE_SOURCE = \"petstore/\";\n    private static final String TAGS_SOURCE = \"petstore/tags/\";\n    private static final String OPERATIONS_SOURCE = \"petstore/operation/\";\n    private static final String CALLBACKS_SOURCE = \"petstore/callbacks/\";\n    private static final String RESPONSES_SOURCE = \"petstore/responses/\";\n    private static final String PARAMETERS_SOURCE = \"petstore/parameters/\";\n    private static final String LINKS_SOURCE = \"petstore/links/\";\n    private static final String EXAMPLES_SOURCE = \"petstore/example/\";\n    private static final String REQUEST_BODIES_SOURCE = \"petstore/requestbody/\";\n    private static final String YAML_EXTENSION = \".yaml\";\n    private static final String PETSTORE_PACKAGE = \"io.swagger.v3.jaxrs2.petstore\";\n    private static final char DOT = '.';\n    private static final char SLASH = '/';\n\n    @Test(description = \"Test an empty resource class (Without operations or annotations)\")\n    public void testEmptyPetResource() {\n        compare(EmptyPetResource.class, PETSTORE_SOURCE);\n    }\n\n    @Test(description = \"Test a resource with examples)\")\n    public void testExamplesResource() {\n        compare(ExamplesResource.class, EXAMPLES_SOURCE);\n    }\n\n    @Test(description = \"Test a resource with Links)\")\n    public void testLinksResource() {\n        compare(LinksResource.class, LINKS_SOURCE);\n    }\n\n    @Test(description = \"Test some resources with Callbacks)\")\n    public void testCallBacksResources() {\n        compare(SimpleCallbackWithOperationResource.class, CALLBACKS_SOURCE);\n        compare(MultipleCallbacksTestWithOperationResource.class, CALLBACKS_SOURCE);\n        compare(RepeatableCallbackResource.class, CALLBACKS_SOURCE);\n        compare(ComplexCallbackResource.class, CALLBACKS_SOURCE);\n    }\n\n    @Test(description = \"Test some resources with different Operations scenarios)\")\n    public void testOperationsResources() {\n        compare(HiddenOperationResource.class, OPERATIONS_SOURCE);\n        compare(OperationWithoutAnnotationResource.class, OPERATIONS_SOURCE);\n        compare(FullyAnnotatedOperationResource.class, OPERATIONS_SOURCE);\n        compare(AnnotatedSameNameOperationResource.class, OPERATIONS_SOURCE);\n        compare(NotAnnotatedSameNameOperationResource.class, OPERATIONS_SOURCE);\n        compare(ExternalDocumentationResource.class, OPERATIONS_SOURCE);\n        compare(ServerOperationResource.class, OPERATIONS_SOURCE);\n        compare(SubResource.class, OPERATIONS_SOURCE);\n        compare(OperationResource.class, OPERATIONS_SOURCE);\n    }\n\n    @Test(description = \"Test OpenAPIDefinition resource)\")\n    public void testOpenAPIDefinitionResource() {\n        compare(OpenAPIDefinitionResource.class, PETSTORE_SOURCE);\n    }\n\n    @Test(description = \"Test RequestBody resource)\")\n    public void tetRequestBodyResource() {\n        compare(RequestBodyResource.class, REQUEST_BODIES_SOURCE);\n        compare(RequestBodyParameterPriorityResource.class, REQUEST_BODIES_SOURCE);\n        compare(RequestBodyMethodPriorityResource.class, REQUEST_BODIES_SOURCE);\n    }\n\n    @Test(description = \"Test Parameters resources)\")\n    public void testParametersResource() {\n        compare(ParametersResource.class, PARAMETERS_SOURCE);\n        compare(RepeatableParametersResource.class, PARAMETERS_SOURCE);\n        compare(ArraySchemaResource.class, PARAMETERS_SOURCE);\n        compare(SingleNotAnnotatedParameter.class, PARAMETERS_SOURCE);\n        compare(MultipleNotAnnotatedParameter.class, PARAMETERS_SOURCE);\n        compare(SingleJaxRSAnnotatedParameter.class, PARAMETERS_SOURCE);\n        compare(OpenAPIJaxRSAnnotatedParameter.class, PARAMETERS_SOURCE);\n        compare(OpenAPIWithContentJaxRSAnnotatedParameter.class, PARAMETERS_SOURCE);\n        compare(OpenAPIWithImplementationJaxRSAnnotatedParameter.class, PARAMETERS_SOURCE);\n        compare(ComplexParameterResource.class, PARAMETERS_SOURCE);\n        compare(ComplexParameterWithOperationResource.class, PARAMETERS_SOURCE);\n    }\n\n    @Test(description = \"Test ApiResponses resource)\")\n    public void testResponsesResource() {\n        compare(MethodResponseResource.class, RESPONSES_SOURCE);\n        compare(OperationResponseResource.class, RESPONSES_SOURCE);\n        compare(NoResponseResource.class, RESPONSES_SOURCE);\n        compare(ImplementationResponseResource.class, RESPONSES_SOURCE);\n        compare(NoImplementationResponseResource.class, RESPONSES_SOURCE);\n        compare(PriorityResponseResource.class, RESPONSES_SOURCE);\n        compare(ComplexResponseResource.class, RESPONSES_SOURCE);\n    }\n\n    @Test(description = \"Test Security resource)\")\n    public void testSecurityResource() {\n        compare(SecurityResource.class, PETSTORE_SOURCE);\n    }\n\n    @Test(description = \"Test Tags resource)\")\n    public void testTagsResource() {\n        compare(CompleteTagResource.class, TAGS_SOURCE);\n        compare(TagOpenAPIDefinitionResource.class, TAGS_SOURCE);\n        compare(TagClassResource.class, TAGS_SOURCE);\n        compare(TagMethodResource.class, TAGS_SOURCE);\n        compare(TagOperationResource.class, TAGS_SOURCE);\n    }\n\n    @Test(description = \"Test a full set of classes\")\n    public void testSetOfClasses() {\n        final Reader reader = new Reader(new OpenAPI());\n        final OpenAPI openAPI = reader.read(getSetOfClassesFromPackage(PETSTORE_PACKAGE));\n        assertNotNull(openAPI);\n        try {\n            SerializationMatchers.assertEqualsToYaml(openAPI, getOpenAPIAsString(PETSTORE_SOURCE + \"FullPetResource.yaml\"));\n        } catch (IOException e) {\n            fail();\n        }\n    }\n\n    /**\n     * Extract a set of classes from a package name\n     *\n     * @param packageName target to scan the classes\n     * @return Set<Class>\n     */\n    private Set<Class<?>> getSetOfClassesFromPackage(final String packageName) {\n        final Set<Class<?>> classSet = new HashSet<>();\n        try {\n            final Class[] classes = getClasses(packageName);\n            for (final Class aClass : classes) {\n                classSet.add(aClass);\n            }\n        } catch (final ClassNotFoundException | IOException e) {\n            fail();\n        }\n        return classSet;\n    }\n\n    /**\n     * Scans all classes accessible from the context class loader which belong to the given package and subpackages.\n     *\n     * @param packageName The base package\n     * @return The classes\n     */\n    private static Class[] getClasses(final String packageName)\n            throws ClassNotFoundException, IOException {\n        final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n        assert classLoader != null;\n        final String path = packageName.replace(DOT, SLASH);\n        final Enumeration<URL> resources = classLoader.getResources(path);\n        final List<File> dirs = new ArrayList<>();\n        while (resources.hasMoreElements()) {\n            final URL resource = resources.nextElement();\n            dirs.add(new File(resource.getFile()));\n        }\n        final ArrayList<Class> classes = new ArrayList<>();\n        for (final File directory : dirs) {\n            classes.addAll(findClasses(directory, packageName));\n        }\n        return classes.toArray(new Class[classes.size()]);\n    }\n\n    /**\n     * Recursive method used to find all classes in a given directory and subdirectories.\n     *\n     * @param directory   The base directory\n     * @param packageName The package name for classes found inside the base directory\n     * @return The classes\n     */\n    private static List<Class> findClasses(final File directory, final String packageName) throws ClassNotFoundException {\n        final List<Class> classes = new ArrayList<>();\n        if (!directory.exists()) {\n            return classes;\n        }\n        final File[] files = directory.listFiles();\n        if (files != null) {\n            for (final File file : files) {\n                if (file.isDirectory()) {\n                    assert !file.getName().contains(\".\");\n                    classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n                } else if (file.getName().endsWith(\".class\")) {\n                    classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n                }\n            }\n        }\n        return classes;\n    }\n\n    @Test(description = \"Test an empty resource class (Without operations or annotations)\")\n    public void testEmptyPet31Resource() {\n        Reader reader = new Reader(new SwaggerConfiguration()\n                .openAPI(new OpenAPI())\n                .openAPI31(true));\n        OpenAPI openAPI = reader.read(Object.class);\n        SerializationMatchers.assertEqualsToYaml31(openAPI, \"openapi: 3.1.0\");\n    }\n\n    @Test(description = \"Test a resource with Links and Content)\")\n    public void testLinksAndContent31Resource() {\n        compare(LinksAndContent31Resource.class, LINKS_SOURCE, true);\n    }\n\n    @Test(description = \"Test OpenAPIDefinition resource)\")\n    public void testOpenAPI31DefinitionResource() {\n        compare(OpenAPI31DefinitionResource.class, PETSTORE_SOURCE, true);\n    }\n\n    @Test(description = \"Test Parameters resources)\")\n    public void testParameters31Resource() {\n        compare(Parameters31Resource.class, PARAMETERS_SOURCE, true);\n    }\n\n    @Test(description = \"Test some resources with Callbacks)\")\n    public void testCallBacks31Resources() {\n        compare(ComplexCallback31Resource.class, CALLBACKS_SOURCE, true);\n    }\n\n    @Test(description = \"Test some resources with Request Body)\")\n    public void testRequestBody31Resources() {\n        compare(RequestBody31Resource.class, REQUEST_BODIES_SOURCE, true);\n    }\n\n    @Test(description = \"Test webhook resources\")\n    public void testWebhooksResource() {\n        compare(WebHookResource.class, PETSTORE_SOURCE, true);\n    }\n\n    @Test(description = \"Test method resources with array annotations\")\n    public void testMethodArrayResponseResource() {\n        compare(MethodArrayResponseResource.class, RESPONSES_SOURCE, true);\n    }\n\n    /**\n     * Compare a class that were read and parsed to a yaml against a yaml file.\n     *\n     * @param clazz  to read.\n     * @param source where is the yaml.\n     */\n    private void compare(final Class clazz, final String source) {\n        compare(clazz, source, false);\n    }\n\n    private void compare(final Class clazz, final String source, boolean openapi31) {\n        final String file = source + clazz.getSimpleName() + YAML_EXTENSION;\n        try {\n            if (openapi31) {\n                compareAsYamlOAS31(clazz, getOpenAPIAsString(file));\n            } else {\n                compareAsYaml(clazz, getOpenAPIAsString(file));\n            }\n        } catch (IOException e) {\n            LOGGER.error(\"Failed to compare class {} with YAML resource {}\", clazz.getName(), file, e);\n            fail();\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/ReaderTest.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\n\nimport io.swagger.v3.core.converter.AnnotatedType;\nimport io.swagger.v3.core.converter.ModelConverter;\nimport io.swagger.v3.core.converter.ModelConverterContextImpl;\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.core.converter.ResolvedSchema;\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.core.filter.OpenAPISpecFilter;\nimport io.swagger.v3.core.filter.SpecFilter;\nimport io.swagger.v3.core.jackson.ModelResolver;\nimport io.swagger.v3.core.model.ApiDescription;\nimport io.swagger.v3.core.util.Configuration;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.PrimitiveType;\nimport io.swagger.v3.jaxrs2.matchers.SerializationMatchers;\nimport io.swagger.v3.jaxrs2.petstore31.PetResource;\nimport io.swagger.v3.jaxrs2.petstore31.TagResource;\nimport io.swagger.v3.jaxrs2.resources.ArraySchemaImplementationResource;\nimport io.swagger.v3.jaxrs2.resources.DefaultResponseResource;\nimport io.swagger.v3.jaxrs2.resources.Misc31Resource;\nimport io.swagger.v3.jaxrs2.resources.ParameterMaximumValueResource;\nimport io.swagger.v3.jaxrs2.resources.ResponseReturnTypeResource;\nimport io.swagger.v3.jaxrs2.resources.SchemaAdditionalPropertiesBooleanResource;\nimport io.swagger.v3.jaxrs2.resources.SchemaAdditionalPropertiesResource;\nimport io.swagger.v3.jaxrs2.resources.SchemaPropertiesResource;\nimport io.swagger.v3.jaxrs2.resources.SiblingPropResource;\nimport io.swagger.v3.jaxrs2.resources.SiblingsResource;\nimport io.swagger.v3.jaxrs2.resources.SiblingsResourceRequestBody;\nimport io.swagger.v3.jaxrs2.resources.SiblingsResourceRequestBodyMultiple;\nimport io.swagger.v3.jaxrs2.resources.SiblingsResourceResponse;\nimport io.swagger.v3.jaxrs2.resources.SiblingsResourceSimple;\nimport io.swagger.v3.jaxrs2.resources.SingleExampleResource;\nimport io.swagger.v3.jaxrs2.resources.BasicFieldsResource;\nimport io.swagger.v3.jaxrs2.resources.BookStoreTicket2646;\nimport io.swagger.v3.jaxrs2.resources.ClassPathParentResource;\nimport io.swagger.v3.jaxrs2.resources.ClassPathSubResource;\nimport io.swagger.v3.jaxrs2.resources.CompleteFieldsResource;\nimport io.swagger.v3.jaxrs2.resources.DeprecatedFieldsResource;\nimport io.swagger.v3.jaxrs2.resources.DuplicatedOperationIdResource;\nimport io.swagger.v3.jaxrs2.resources.DuplicatedOperationMethodNameResource;\nimport io.swagger.v3.jaxrs2.resources.DuplicatedSecurityResource;\nimport io.swagger.v3.jaxrs2.resources.EnhancedResponsesResource;\nimport io.swagger.v3.jaxrs2.resources.ExternalDocsReference;\nimport io.swagger.v3.jaxrs2.resources.MyClass;\nimport io.swagger.v3.jaxrs2.resources.MyOtherClass;\nimport io.swagger.v3.jaxrs2.resources.RefCallbackResource;\nimport io.swagger.v3.jaxrs2.resources.RefExamplesResource;\nimport io.swagger.v3.jaxrs2.resources.RefHeaderResource;\nimport io.swagger.v3.jaxrs2.resources.RefLinksResource;\nimport io.swagger.v3.jaxrs2.resources.RefParameter3029Resource;\nimport io.swagger.v3.jaxrs2.resources.RefParameter3074Resource;\nimport io.swagger.v3.jaxrs2.resources.RefParameterResource;\nimport io.swagger.v3.jaxrs2.resources.RefRequestBodyResource;\nimport io.swagger.v3.jaxrs2.resources.RefResponsesResource;\nimport io.swagger.v3.jaxrs2.resources.RefSecurityResource;\nimport io.swagger.v3.jaxrs2.resources.ResourceWithSubResource;\nimport io.swagger.v3.jaxrs2.resources.ResponseContentWithArrayResource;\nimport io.swagger.v3.jaxrs2.resources.ResponsesResource;\nimport io.swagger.v3.jaxrs2.resources.SecurityResource;\nimport io.swagger.v3.jaxrs2.resources.ServersResource;\nimport io.swagger.v3.jaxrs2.resources.SimpleCallbackResource;\nimport io.swagger.v3.jaxrs2.resources.SimpleExamplesResource;\nimport io.swagger.v3.jaxrs2.resources.SimpleMethods;\nimport io.swagger.v3.jaxrs2.resources.SimpleParameterResource;\nimport io.swagger.v3.jaxrs2.resources.SimpleRequestBodyResource;\nimport io.swagger.v3.jaxrs2.resources.SimpleResponsesResource;\nimport io.swagger.v3.jaxrs2.resources.SubResourceHead;\nimport io.swagger.v3.jaxrs2.resources.TagsResource;\nimport io.swagger.v3.jaxrs2.resources.Test2607;\nimport io.swagger.v3.jaxrs2.resources.TestResource;\nimport io.swagger.v3.jaxrs2.resources.Ticket2340Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket2644ConcreteImplementation;\nimport io.swagger.v3.jaxrs2.resources.Ticket2763Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket2793Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket2794Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket2806Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket2818Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket2848Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket3015Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket3587Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket3731BisResource;\nimport io.swagger.v3.jaxrs2.resources.Ticket3731Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket4065Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket4341Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket4412Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket4446Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket4483Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket4804CustomClass;\nimport io.swagger.v3.jaxrs2.resources.Ticket4804NotBlankResource;\nimport io.swagger.v3.jaxrs2.resources.Ticket4804ProcessorResource;\nimport io.swagger.v3.jaxrs2.resources.Ticket4804Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket4850Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket4859Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket4878Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket4879Resource;\nimport io.swagger.v3.jaxrs2.resources.Ticket5017Resource;\nimport io.swagger.v3.jaxrs2.resources.UploadResource;\nimport io.swagger.v3.jaxrs2.resources.UrlEncodedResourceWithEncodings;\nimport io.swagger.v3.jaxrs2.resources.UserAnnotationResource;\nimport io.swagger.v3.jaxrs2.resources.WebHookResource;\nimport io.swagger.v3.jaxrs2.resources.extensions.ExtensionsResource;\nimport io.swagger.v3.jaxrs2.resources.extensions.OperationExtensionsResource;\nimport io.swagger.v3.jaxrs2.resources.extensions.ParameterExtensionsResource;\nimport io.swagger.v3.jaxrs2.resources.extensions.RequestBodyExtensionsResource;\nimport io.swagger.v3.jaxrs2.resources.generics.ticket2144.ItemResource;\nimport io.swagger.v3.jaxrs2.resources.generics.ticket3149.MainResource;\nimport io.swagger.v3.jaxrs2.resources.generics.ticket3426.Ticket3426Resource;\nimport io.swagger.v3.jaxrs2.resources.generics.ticket3694.Ticket3694Resource;\nimport io.swagger.v3.jaxrs2.resources.generics.ticket3694.Ticket3694ResourceExtendedType;\nimport io.swagger.v3.jaxrs2.resources.generics.ticket3694.Ticket3694ResourceSimple;\nimport io.swagger.v3.jaxrs2.resources.generics.ticket3694.Ticket3694ResourceSimpleSameReturn;\nimport io.swagger.v3.jaxrs2.resources.rs.ProcessTokenRestService;\nimport io.swagger.v3.jaxrs2.resources.ticket3624.Service;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.ExternalDocumentation;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.Paths;\nimport io.swagger.v3.oas.models.callbacks.Callback;\nimport io.swagger.v3.oas.models.examples.Example;\nimport io.swagger.v3.oas.models.headers.Header;\nimport io.swagger.v3.oas.models.info.Info;\nimport io.swagger.v3.oas.models.links.Link;\nimport io.swagger.v3.oas.models.media.ArraySchema;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.security.SecurityRequirement;\nimport io.swagger.v3.oas.models.security.SecurityScheme;\nimport org.testng.annotations.Test;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.DELETE;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.HEAD;\nimport javax.ws.rs.OPTIONS;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Method;\nimport java.lang.reflect.Type;\nimport java.net.URI;\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.Set;\nimport java.util.concurrent.CompletableFuture;\nimport java.util.concurrent.CopyOnWriteArrayList;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertFalse;\nimport static org.testng.Assert.assertNotEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\nimport static org.testng.Assert.assertTrue;\n\n/**\n * Test for the Reader Class\n */\npublic class ReaderTest {\n    private static final String EXAMPLE_TAG = \"Example Tag\";\n    private static final String SECOND_TAG = \"Second Tag\";\n    private static final String OPERATION_SUMMARY = \"Operation Summary\";\n    private static final String OPERATION_DESCRIPTION = \"Operation Description\";\n    private static final String CALLBACK_POST_OPERATION_DESCRIPTION = \"payload data will be sent\";\n    private static final String CALLBACK_GET_OPERATION_DESCRIPTION = \"payload data will be received\";\n    private static final String RESPONSE_CODE_200 = \"200\";\n    private static final String RESPONSE_DESCRIPTION = \"voila!\";\n    private static final String EXTERNAL_DOCS_DESCRIPTION = \"External documentation description\";\n    private static final String EXTERNAL_DOCS_URL = \"http://url.com\";\n    private static final String PARAMETER_IN = \"path\";\n    private static final String PARAMETER_NAME = \"subscriptionId\";\n    private static final String PARAMETER_DESCRIPTION = \"parameter description\";\n    private static final String CALLBACK_SUBSCRIPTION_ID = \"subscription\";\n    private static final String CALLBACK_URL = \"http://$request.query.url\";\n    private static final String SECURITY_KEY = \"security_key\";\n    private static final String SCOPE_VALUE1 = \"write:pets\";\n    private static final String SCOPE_VALUE2 = \"read:pets\";\n    private static final String PATH_REF = \"/\";\n    private static final String PATH_1_REF = \"/1\";\n    private static final String PATH_2_REF = \"/path\";\n    private static final String SCHEMA_TYPE = \"string\";\n    private static final String SCHEMA_FORMAT = \"uuid\";\n    private static final String SCHEMA_DESCRIPTION = \"the generated UUID\";\n\n    private static final int RESPONSES_NUMBER = 2;\n    private static final int TAG_NUMBER = 2;\n    private static final int SECURITY_SCHEMAS = 2;\n    private static final int PARAMETER_NUMBER = 1;\n    private static final int SECURITY_REQUIREMENT_NUMBER = 1;\n    private static final int SCOPE_NUMBER = 2;\n    private static final int PATHS_NUMBER = 1;\n\n    @Test(description = \"test a simple resource class\")\n    public void testSimpleReadClass() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(BasicFieldsResource.class);\n        Paths paths = openAPI.getPaths();\n        assertEquals(paths.size(), 6);\n        PathItem pathItem = paths.get(PATH_1_REF);\n        assertNotNull(pathItem);\n        assertNull(pathItem.getPost());\n        Operation operation = pathItem.getGet();\n        assertNotNull(operation);\n        assertEquals(OPERATION_SUMMARY, operation.getSummary());\n        assertEquals(OPERATION_DESCRIPTION, operation.getDescription());\n    }\n\n    @Test(description = \"scan methods\")\n    public void testCompleteReadClass() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(CompleteFieldsResource.class);\n        Paths paths = openAPI.getPaths();\n        assertEquals(PATHS_NUMBER, paths.size());\n        PathItem pathItem = paths.get(PATH_REF);\n        assertNotNull(pathItem);\n        assertNull(pathItem.getPost());\n        Operation operation = pathItem.getGet();\n        assertNotNull(operation);\n        assertEquals(OPERATION_SUMMARY, operation.getSummary());\n        assertEquals(OPERATION_DESCRIPTION, operation.getDescription());\n\n        assertEquals(TAG_NUMBER, operation.getTags().size());\n        assertEquals(EXAMPLE_TAG, operation.getTags().get(0));\n        assertEquals(SECOND_TAG, operation.getTags().get(1));\n\n        ExternalDocumentation externalDocs = operation.getExternalDocs();\n        assertEquals(EXTERNAL_DOCS_DESCRIPTION, externalDocs.getDescription());\n        assertEquals(EXTERNAL_DOCS_URL, externalDocs.getUrl());\n    }\n\n    @Test(description = \"scan methods\")\n    public void testScanMethods() {\n        Reader reader = new Reader(new OpenAPI());\n        Method[] methods = SimpleMethods.class.getMethods();\n        for (final Method method : methods) {\n            if (isValidRestPath(method)) {\n                Operation operation = reader.parseMethod(method, null, null);\n                assertNotNull(operation);\n            }\n        }\n    }\n\n    @Test(description = \"Get a Summary and Description\")\n    public void testGetSummaryAndDescription() {\n        Reader reader = new Reader(new OpenAPI());\n        Method[] methods = BasicFieldsResource.class.getMethods();\n        Operation operation = reader.parseMethod(methods[0], null, null);\n        assertNotNull(operation);\n        assertEquals(OPERATION_SUMMARY, operation.getSummary());\n        assertEquals(OPERATION_DESCRIPTION, operation.getDescription());\n    }\n\n    @Test(description = \"Get a Duplicated Operation Id\")\n    public void testResolveDuplicatedOperationId() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(DuplicatedOperationIdResource.class);\n\n        Paths paths = openAPI.getPaths();\n        assertNotNull(paths);\n        Operation firstOperation = paths.get(PATH_REF).getGet();\n        Operation secondOperation = paths.get(PATH_2_REF).getGet();\n        Operation thirdOperation = paths.get(PATH_REF).getPost();\n        assertNotNull(firstOperation);\n        assertNotNull(secondOperation);\n        assertNotNull(thirdOperation);\n        assertNotEquals(firstOperation.getOperationId(), secondOperation.getOperationId());\n        assertNotEquals(firstOperation.getOperationId(), thirdOperation.getOperationId());\n        assertNotEquals(secondOperation.getOperationId(), thirdOperation.getOperationId());\n    }\n\n    @Test(description = \"Get a Duplicated Operation Id with same id as method name\")\n    public void testResolveDuplicatedOperationIdMethodName() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(DuplicatedOperationMethodNameResource.class);\n\n        Paths paths = openAPI.getPaths();\n        assertNotNull(paths);\n        Operation firstOperation = paths.get(\"/1\").getGet();\n        Operation secondOperation = paths.get(\"/2\").getGet();\n        Operation secondPostOperation = paths.get(\"/2\").getPost();\n        Operation thirdPostOperation = paths.get(\"/3\").getPost();\n        assertNotNull(firstOperation);\n        assertNotNull(secondOperation);\n        assertNotNull(secondPostOperation);\n        assertNotNull(thirdPostOperation);\n        assertNotEquals(firstOperation.getOperationId(), secondOperation.getOperationId());\n        assertNotEquals(secondOperation.getOperationId(), secondPostOperation.getOperationId());\n        assertNotEquals(secondPostOperation.getOperationId(), thirdPostOperation.getOperationId());\n        Operation thirdOperation = paths.get(\"/3\").getGet();\n        Operation fourthOperation = paths.get(\"/4\").getGet();\n        assertNotNull(thirdOperation);\n        assertNotNull(fourthOperation);\n        assertNotEquals(thirdOperation.getOperationId(), fourthOperation.getOperationId());\n\n    }\n\n    @Test(description = \"Test a Set of classes\")\n    public void testSetOfClasses() {\n        Set<Class<?>> classes = new HashSet<>();\n        classes.add(SecurityResource.class);\n        classes.add(DuplicatedSecurityResource.class);\n\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(classes);\n        assertNotNull(openAPI);\n        assertEquals(openAPI.getPaths().get(\"/\").getGet().getSecurity().size(), 2);\n        assertEquals(openAPI.getPaths().get(\"/2\").getGet().getSecurity().size(), 3);\n        Components components = openAPI.getComponents();\n        assertNotNull(components);\n        Map<String, SecurityScheme> securitySchemes = components.getSecuritySchemes();\n        assertNotNull(securitySchemes);\n        assertEquals(SECURITY_SCHEMAS, securitySchemes.size());\n    }\n\n    @Test(description = \"Deprecated Method\")\n    public void testDeprecatedMethod() {\n        Reader reader = new Reader(new OpenAPI());\n        Method[] methods = DeprecatedFieldsResource.class.getMethods();\n        Operation deprecatedOperation = reader.parseMethod(methods[0], null, null);\n        assertNotNull(deprecatedOperation);\n        assertTrue(deprecatedOperation.getDeprecated());\n    }\n\n    @Test(description = \"Get tags\")\n    public void testGetTags() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(TagsResource.class);\n        Operation operation = openAPI.getPaths().get(\"/\").getGet();\n        assertNotNull(operation);\n        assertEquals(6, operation.getTags().size());\n        assertEquals(operation.getTags().get(3), EXAMPLE_TAG);\n        assertEquals(operation.getTags().get(1), SECOND_TAG);\n        assertEquals(openAPI.getTags().get(1).getDescription(), \"desc definition\");\n        assertEquals(openAPI.getTags().get(2).getExternalDocs().getDescription(), \"docs desc\");\n    }\n\n    @Test(description = \"Get servers\")\n    public void testGetServers() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(ServersResource.class);\n        Operation operation = openAPI.getPaths().get(\"/\").getGet();\n        assertNotNull(operation);\n        assertEquals(5, operation.getServers().size());\n        assertEquals(operation.getServers().get(0).getUrl(), \"http://class1\");\n        assertEquals(operation.getServers().get(1).getUrl(), \"http://class2\");\n        assertEquals(operation.getServers().get(2).getUrl(), \"http://method1\");\n        assertEquals(operation.getServers().get(3).getUrl(), \"http://method2\");\n        assertEquals(operation.getServers().get(4).getUrl(), \"http://op1\");\n\n        assertEquals(operation.getServers().get(0).getVariables().size(), 2);\n        assertEquals(operation.getServers().get(0).getVariables().get(\"var1\").getDescription(), \"var 1\");\n        assertEquals(operation.getServers().get(0).getVariables().get(\"var1\").getEnum().size(), 2);\n\n        assertEquals(openAPI.getServers().get(0).getDescription(), \"definition server 1\");\n    }\n\n    @Test(description = \"Responses\")\n    public void testGetResponses() {\n        Reader reader = new Reader(new OpenAPI());\n\n        Method[] methods = ResponsesResource.class.getMethods();\n\n        Operation responseOperation = reader.parseMethod(Arrays.stream(methods).filter(\n                (method -> method.getName().equals(\"getResponses\"))).findFirst().get(), null, null);\n        assertNotNull(responseOperation);\n\n        ApiResponses responses = responseOperation.getResponses();\n        assertEquals(RESPONSES_NUMBER, responses.size());\n\n        ApiResponse apiResponse = responses.get(RESPONSE_CODE_200);\n        assertNotNull(apiResponse);\n        assertEquals(RESPONSE_DESCRIPTION, apiResponse.getDescription());\n    }\n\n    @Test(description = \"More Responses\")\n    public void testMoreResponses() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(EnhancedResponsesResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex output\\n\" +\n                \"        object\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SampleResponseSchema\\\"\\n\" +\n                \"        \\\"404\\\":\\n\" +\n                \"          description: not found!\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: boo\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/GenericError\\\"\\n\" +\n                \"      deprecated: true\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    GenericError:\\n\" +\n                \"      type: object\\n\" +\n                \"    SampleResponseSchema:\\n\" +\n                \"      type: object\\n\";\n\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Responses with composition\")\n    public void testGetResponsesWithComposition() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(ResponsesResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex output\\n\" +\n                \"        object\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SampleResponseSchema\\\"\\n\" +\n                \"        default:\\n\" +\n                \"          description: boo\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/GenericError\\\"\\n\" +\n                \"      deprecated: true\\n\" +\n                \"  /allOf:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Test inheritance / polymorphism\\n\" +\n                \"      operationId: getAllOf\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: number\\n\" +\n                \"        in: query\\n\" +\n                \"        description: Test inheritance / polymorphism\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        example: 1\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: bean answer\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                allOf:\\n\" +\n                \"                - $ref: \\\"#/components/schemas/MultipleSub1Bean\\\"\\n\" +\n                \"                - $ref: \\\"#/components/schemas/MultipleSub2Bean\\\"\\n\" +\n                \"  /anyOf:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Test inheritance / polymorphism\\n\" +\n                \"      operationId: getAnyOf\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: number\\n\" +\n                \"        in: query\\n\" +\n                \"        description: Test inheritance / polymorphism\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        example: 1\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: bean answer\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                anyOf:\\n\" +\n                \"                - $ref: \\\"#/components/schemas/MultipleSub1Bean\\\"\\n\" +\n                \"                - $ref: \\\"#/components/schemas/MultipleSub2Bean\\\"\\n\" +\n                \"  /oneOf:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Test inheritance / polymorphism\\n\" +\n                \"      operationId: getOneOf\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: number\\n\" +\n                \"        in: query\\n\" +\n                \"        description: Test inheritance / polymorphism\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        example: 1\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: bean answer\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                oneOf:\\n\" +\n                \"                - $ref: \\\"#/components/schemas/MultipleSub1Bean\\\"\\n\" +\n                \"                - $ref: \\\"#/components/schemas/MultipleSub2Bean\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    SampleResponseSchema:\\n\" +\n                \"      type: object\\n\" +\n                \"    GenericError:\\n\" +\n                \"      type: object\\n\" +\n                \"    MultipleSub1Bean:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: MultipleSub1Bean\\n\" +\n                \"      allOf:\\n\" +\n                \"      - $ref: \\\"#/components/schemas/MultipleBaseBean\\\"\\n\" +\n                \"      - type: object\\n\" +\n                \"        properties:\\n\" +\n                \"          c:\\n\" +\n                \"            type: integer\\n\" +\n                \"            format: int32\\n\" +\n                \"    MultipleSub2Bean:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: MultipleSub2Bean\\n\" +\n                \"      allOf:\\n\" +\n                \"      - $ref: \\\"#/components/schemas/MultipleBaseBean\\\"\\n\" +\n                \"      - type: object\\n\" +\n                \"        properties:\\n\" +\n                \"          d:\\n\" +\n                \"            type: integer\\n\" +\n                \"            format: int32\\n\" +\n                \"    MultipleBaseBean:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        beanType:\\n\" +\n                \"          type: string\\n\" +\n                \"        a:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        b:\\n\" +\n                \"          type: string\\n\" +\n                \"      description: MultipleBaseBean\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"External Docs\")\n    public void testGetExternalDocs() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(ExternalDocsReference.class);\n        Operation externalDocsOperation = openAPI.getPaths().get(\"/\").getGet();\n\n        ExternalDocumentation externalDocs = externalDocsOperation.getExternalDocs();\n        assertEquals(externalDocs.getDescription(), \"External documentation description in method\");\n        assertEquals(externalDocs.getUrl(), EXTERNAL_DOCS_URL);\n        externalDocs = openAPI.getComponents().getSchemas().get(\"ExternalDocsSchema\").getExternalDocs();\n        assertEquals(\"External documentation description in schema\", externalDocs.getDescription());\n        assertEquals(externalDocs.getUrl(), EXTERNAL_DOCS_URL);\n    }\n\n    @Test(description = \"OperationExtensions Tests\")\n    public void testOperationExtensions() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(OperationExtensionsResource.class);\n        assertNotNull(openAPI);\n        Map<String, Object> extensions = openAPI.getPaths().get(\"/\").getGet().getExtensions();\n        assertEquals(extensions.size(), 2);\n        assertNotNull(extensions.get(\"x-operation\"));\n        assertNotNull(extensions.get(\"x-operation-extensions\"));\n    }\n\n    @Test(description = \"ParameterExtensions Tests\")\n    public void testParameterExtensions() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(ParameterExtensionsResource.class);\n        assertNotNull(openAPI);\n        Map<String, Object> extensions = openAPI.getPaths().get(\"/\").getGet().getParameters().get(0).getExtensions();\n        assertNotNull(extensions);\n        assertEquals(1, extensions.size());\n        assertNotNull(extensions.get(\"x-parameter\"));\n\n    }\n\n    @Test(description = \"RequestBody Tests\")\n    public void testRequestBodyExtensions() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(RequestBodyExtensionsResource.class);\n        assertNotNull(openAPI);\n        Map<String, Object> extensions = openAPI.getPaths().get(\"/user\").getGet().\n                getRequestBody().getExtensions();\n        assertNotNull(extensions);\n        assertEquals(extensions.size(), 2);\n        assertNotNull(extensions.get(\"x-extension\"));\n        assertNotNull(extensions.get(\"x-extension2\"));\n    }\n\n    @Test(description = \"Extensions Tests\")\n    public void testExtensions() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(ExtensionsResource.class);\n        assertNotNull(openAPI);\n        SerializationMatchers.assertEqualsToYaml(openAPI, ExtensionsResource.YAML);\n    }\n\n    @Test(description = \"Security Requirement\")\n    public void testSecurityRequirement() {\n        Reader reader = new Reader(new OpenAPI());\n        Method[] methods = SecurityResource.class.getDeclaredMethods();\n        Operation securityOperation = reader.parseMethod(Arrays.stream(methods).filter(\n                (method -> method.getName().equals(\"getSecurity\"))).findFirst().get(), null, null);\n        assertNotNull(securityOperation);\n        List<SecurityRequirement> securityRequirements = securityOperation.getSecurity();\n        assertNotNull(securityRequirements);\n        assertEquals(SECURITY_REQUIREMENT_NUMBER, securityRequirements.size());\n        List<String> scopes = securityRequirements.get(0).get(SECURITY_KEY);\n        assertNotNull(scopes);\n        assertEquals(SCOPE_NUMBER, scopes.size());\n        assertEquals(SCOPE_VALUE1, scopes.get(0));\n        assertEquals(SCOPE_VALUE2, scopes.get(1));\n    }\n\n    @Test(description = \"Callbacks\")\n    public void testGetCallbacks() {\n        Reader reader = new Reader(new OpenAPI());\n        Method[] methods = SimpleCallbackResource.class.getMethods();\n        Operation callbackOperation = reader.parseMethod(methods[0], null, null);\n        assertNotNull(callbackOperation);\n        Map<String, Callback> callbacks = callbackOperation.getCallbacks();\n        assertNotNull(callbacks);\n        Callback callback = callbacks.get(CALLBACK_SUBSCRIPTION_ID);\n        assertNotNull(callback);\n        PathItem pathItem = callback.get(CALLBACK_URL);\n        assertNotNull(pathItem);\n        Operation postOperation = pathItem.getPost();\n        assertNotNull(postOperation);\n        assertEquals(CALLBACK_POST_OPERATION_DESCRIPTION, postOperation.getDescription());\n\n        Operation getOperation = pathItem.getGet();\n        assertNotNull(getOperation);\n        assertEquals(CALLBACK_GET_OPERATION_DESCRIPTION, getOperation.getDescription());\n\n        Operation putOperation = pathItem.getPut();\n        assertNotNull(putOperation);\n        assertEquals(CALLBACK_POST_OPERATION_DESCRIPTION, putOperation.getDescription());\n    }\n\n    @Test(description = \"Get the Param of an operation\")\n    public void testSubscriptionIdParam() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(BasicFieldsResource.class);\n        assertNotNull(openAPI);\n        Paths openAPIPaths = openAPI.getPaths();\n        assertNotNull(openAPIPaths);\n        PathItem pathItem = openAPIPaths.get(PATH_1_REF);\n        assertNotNull(pathItem);\n        Operation operation = pathItem.getGet();\n        assertNotNull(operation);\n        List<Parameter> parameters = operation.getParameters();\n        assertNotNull(parameters);\n        assertEquals(PARAMETER_NUMBER, parameters.size());\n        Parameter parameter = parameters.get(0);\n        assertNotNull(parameter);\n        assertEquals(PARAMETER_IN, parameter.getIn());\n        assertEquals(PARAMETER_NAME, parameter.getName());\n        assertEquals(PARAMETER_DESCRIPTION, parameter.getDescription());\n        assertEquals(Boolean.TRUE, parameter.getRequired());\n        assertEquals(Boolean.TRUE, parameter.getAllowEmptyValue());\n        assertEquals(Boolean.TRUE, parameter.getAllowReserved());\n        Schema schema = parameter.getSchema();\n        assertNotNull(schema);\n        assertEquals(SCHEMA_TYPE, schema.getType());\n        assertEquals(SCHEMA_FORMAT, schema.getFormat());\n        assertEquals(SCHEMA_DESCRIPTION, schema.getDescription());\n        assertEquals(Boolean.TRUE, schema.getReadOnly());\n\n    }\n\n    private Boolean isValidRestPath(Method method) {\n        for (Class<? extends Annotation> item : Arrays.asList(GET.class, PUT.class, POST.class, DELETE.class,\n                OPTIONS.class, HEAD.class)) {\n            if (method.getAnnotation(item) != null) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    @Test\n    public void testClassWithGenericType() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(ClassWithGenericType.class);\n        assertNotNull(openAPI);\n\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"IssueTemplateRet\"));\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"B\"));\n        assertNotNull(openAPI.getComponents().getSchemas().get(\"B\").getProperties().get(\"test\"));\n        assertEquals(((Schema) openAPI.getComponents().getSchemas().get(\"B\").getProperties().get(\"test\")).get$ref(), \"#/components/schemas/IssueTemplateRet\");\n\n        //Yaml.prettyPrint(openAPI);\n    }\n\n    public static class A {\n        public B b;\n    }\n\n    public static class IssueTemplate<T> {\n\n        public T getTemplateTest() {\n            return null;\n        }\n\n        public String getTemplateTestString() {\n            return null;\n        }\n    }\n\n    public static class B {\n        public IssueTemplate<Ret> getTest() {\n            return null;\n        }\n    }\n\n    public static class Ret {\n        public String c;\n\n    }\n\n    static class ClassWithGenericType {\n        @Path(\"/test\")\n        @Produces(\"application/json\")\n        @Consumes(\"application/json\")\n        @GET\n        @io.swagger.v3.oas.annotations.Operation(tags = \"/receiver/rest\")\n        //public void test1(@QueryParam(\"aa\") String a) {\n        public void test1(A a) {\n        }\n    }\n\n    @Test\n    public void testClassWithCompletableFuture() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(ClassWithCompletableFuture.class);\n        assertNotNull(openAPI);\n\n        assertEquals(\n            openAPI.getPaths()\n                    .get(\"/myApi\")\n                    .getGet()\n                    .getResponses()\n                    .get(\"default\")\n                    .getContent()\n                    .get(\"application/json\")\n                    .getSchema()\n                    .get$ref(),\n                \"#/components/schemas/Ret\"\n        );\n    }\n\n    static class ClassWithCompletableFuture {\n        @Path(\"/myApi\")\n        @Produces(\"application/json\")\n        @Consumes(\"application/json\")\n        @GET\n        public CompletableFuture<Ret> myApi(A a) {\n            return CompletableFuture.completedFuture(new Ret());\n        }\n    }\n\n    @Test(description = \"test resource with array in response content\")\n    public void test2497() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(ResponseContentWithArrayResource.class);\n        Paths paths = openAPI.getPaths();\n        assertEquals(paths.size(), 1);\n        PathItem pathItem = paths.get(\"/user\");\n        assertNotNull(pathItem);\n        Operation operation = pathItem.getGet();\n        assertNotNull(operation);\n        ArraySchema schema = (ArraySchema) operation.getResponses().get(\"200\").getContent().values().iterator().next().getSchema();\n        assertNotNull(schema);\n        assertEquals(schema.getItems().get$ref(), \"#/components/schemas/User\");\n\n        assertEquals(openAPI.getComponents().getSchemas().get(\"User\").getRequired().get(0), \"issue3438\");\n    }\n\n    @Test(description = \"array required property resolved from ArraySchema.arraySchema.requiredMode\")\n    public void test4341() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(Ticket4341Resource.class);\n        Schema userSchema = openAPI.getComponents().getSchemas().get(\"User\");\n        List<String> required = userSchema.getRequired();\n\n        assertTrue(required.contains(\"requiredArray\"));\n        assertFalse(required.contains(\"notRequiredArray\"));\n        assertFalse(required.contains(\"notRequiredArrayWithNotNull\"));\n        assertTrue(required.contains(\"autoRequiredWithNotNull\"));\n        assertFalse(required.contains(\"autoNotRequired\"));\n\n        assertTrue(\n                required.contains(\"requiredArrayArraySchemaOnly\"),\n                \"arraySchema.requiredMode=REQUIRED should make the array property required \" +\n                        \"even when items schema is not explicitly provided\"\n        );\n\n        assertFalse(\n                required.contains(\"requiredItemsOnlyArray\"),\n                \"schema(requiredMode=REQUIRED) on items must not make the array property required; \" +\n                        \"requiredness is controlled by arraySchema.requiredMode\"\n        );\n    }\n\n    @Test(description = \"test resource with subresources\")\n    public void testResourceWithSubresources() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(ResourceWithSubResource.class);\n\n        Paths paths = openAPI.getPaths();\n        assertEquals(paths.size(), 3);\n        PathItem pathItem = paths.get(\"/employees/{id}\");\n        assertNotNull(pathItem);\n        Operation operation = pathItem.getGet();\n        assertNotNull(operation);\n        ArraySchema arraySchema = (ArraySchema) operation.getResponses().get(\"200\").getContent().values().iterator().next().getSchema();\n        assertNotNull(arraySchema);\n        assertEquals(arraySchema.getItems().get$ref(), \"#/components/schemas/Pet\");\n\n        pathItem = paths.get(\"/employees/{id}/{id}\");\n        assertNotNull(pathItem);\n        operation = pathItem.getGet();\n        assertNotNull(operation);\n        Schema schema = operation.getResponses().get(\"200\").getContent().values().iterator().next().getSchema();\n        assertNotNull(schema);\n        assertEquals(schema.get$ref(), \"#/components/schemas/Pet\");\n\n        pathItem = paths.get(\"/employees/noPath\");\n        assertNotNull(pathItem);\n        operation = pathItem.getGet();\n        assertNotNull(operation);\n        schema = operation.getResponses().getDefault().getContent().values().iterator().next().getSchema();\n        assertNotNull(schema);\n        assertEquals(schema.getType(), \"string\");\n    }\n\n    @Test(description = \"test another resource with subresources\")\n    public void testAnotherResourceWithSubresources() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(TestResource.class);\n\n        Paths paths = openAPI.getPaths();\n        assertEquals(paths.size(), 3);\n        PathItem pathItem = paths.get(\"/test/status\");\n        assertNotNull(pathItem);\n        Operation operation = pathItem.getGet();\n        assertNotNull(operation);\n        assertTrue(operation.getResponses().getDefault().getContent().keySet().contains(\"application/json\"));\n        Schema schema = operation.getResponses().getDefault().getContent().values().iterator().next().getSchema();\n        assertNotNull(schema);\n        assertEquals(schema.getType(), \"string\");\n\n        pathItem = paths.get(\"/test/more/otherStatus\");\n        assertNotNull(pathItem);\n        operation = pathItem.getGet();\n        assertNotNull(operation);\n        assertTrue(operation.getResponses().getDefault().getContent().keySet().contains(\"application/json\"));\n        assertFalse(operation.getResponses().getDefault().getContent().keySet().contains(\"application/xml\"));\n        schema = operation.getResponses().getDefault().getContent().values().iterator().next().getSchema();\n        assertNotNull(schema);\n        assertEquals(schema.getType(), \"string\");\n\n        pathItem = paths.get(\"/test/evenmore/otherStatus\");\n        assertNotNull(pathItem);\n        operation = pathItem.getGet();\n        assertNotNull(operation);\n        assertTrue(operation.getResponses().getDefault().getContent().keySet().contains(\"application/json\"));\n        assertFalse(operation.getResponses().getDefault().getContent().keySet().contains(\"application/xml\"));\n        schema = operation.getResponses().getDefault().getContent().values().iterator().next().getSchema();\n        assertNotNull(schema);\n        assertEquals(schema.getType(), \"string\");\n        assertEquals(operation.getRequestBody().getContent().get(\"application/json\").getSchema().get$ref(), \"#/components/schemas/Pet\");\n    }\n\n    @Test(description = \"test user annotation\")\n    public void testUserAnnotation() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(UserAnnotationResource.class);\n        Paths paths = openAPI.getPaths();\n        assertEquals(paths.size(), 1);\n        PathItem pathItem = paths.get(\"/test/status\");\n        assertNotNull(pathItem);\n        Operation operation = pathItem.getGet();\n        assertNotNull(operation);\n        assertTrue(operation.getTags().contains(\"test\"));\n        assertTrue(operation.getResponses().getDefault().getContent().keySet().contains(\"application/json\"));\n        Schema schema = operation.getResponses().getDefault().getContent().values().iterator().next().getSchema();\n        assertNotNull(schema);\n        assertEquals(schema.getType(), \"string\");\n\n    }\n\n    @Test(description = \"scan resource with class-based sub-resources\")\n    public void testResourceWithClassBasedSubresources() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(SubResourceHead.class);\n\n        Paths paths = openAPI.getPaths();\n        assertEquals(paths.size(), 3);\n        PathItem pathItem = paths.get(\"/head/tail/hello\");\n        assertNotNull(pathItem);\n        Operation operation = pathItem.getGet();\n        assertNotNull(operation);\n        assertTrue(operation.getResponses().getDefault().getContent().keySet().contains(\"*/*\"));\n        Schema schema = operation.getResponses().getDefault().getContent().values().iterator().next().getSchema();\n        assertNotNull(schema);\n        assertEquals(schema.getType(), \"string\");\n\n        pathItem = paths.get(\"/head/tail/{string}\");\n        assertNotNull(pathItem);\n        operation = pathItem.getGet();\n        assertNotNull(operation);\n        assertTrue(operation.getResponses().getDefault().getContent().keySet().contains(\"*/*\"));\n        schema = operation.getResponses().getDefault().getContent().values().iterator().next().getSchema();\n        assertNotNull(schema);\n        assertEquals(schema.getType(), \"string\");\n\n        pathItem = paths.get(\"/head/noPath\");\n        assertNotNull(pathItem);\n        operation = pathItem.getGet();\n        assertNotNull(operation);\n        assertTrue(operation.getResponses().getDefault().getContent().keySet().contains(\"*/*\"));\n        schema = operation.getResponses().getDefault().getContent().values().iterator().next().getSchema();\n        assertNotNull(schema);\n        assertEquals(schema.getType(), \"string\");\n    }\n\n    @Test(description = \"test ticket #2607 resource with subresources\")\n    public void test2607() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(Test2607.class);\n\n        Paths paths = openAPI.getPaths();\n        assertEquals(paths.size(), 2);\n        PathItem pathItem = paths.get(\"/swaggertest/name\");\n        assertNotNull(pathItem);\n        Operation operation = pathItem.getGet();\n        assertNotNull(operation);\n        assertTrue(operation.getResponses().getDefault().getContent().keySet().contains(\"text/plain\"));\n        Schema schema = operation.getResponses().getDefault().getContent().values().iterator().next().getSchema();\n        assertNotNull(schema);\n        assertEquals(schema.getType(), \"string\");\n\n        pathItem = paths.get(\"/swaggertest/subresource/version\");\n        assertNotNull(pathItem);\n        operation = pathItem.getGet();\n        assertNotNull(operation);\n        assertTrue(operation.getResponses().getDefault().getContent().keySet().contains(\"text/plain\"));\n        schema = operation.getResponses().getDefault().getContent().values().iterator().next().getSchema();\n        assertNotNull(schema);\n        assertEquals(schema.getType(), \"string\");\n    }\n\n    @Test(description = \"test ticket #2646 method annotated with @Produce\")\n    public void test2646() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(BookStoreTicket2646.class);\n        Paths paths = openAPI.getPaths();\n        assertEquals(paths.size(), 2);\n        PathItem pathItem = paths.get(\"/bookstore\");\n        assertNotNull(pathItem);\n        Operation operation = pathItem.getGet();\n        assertNotNull(operation);\n        assertTrue(operation.getResponses().getDefault().getContent().keySet().contains(\"application/json\"));\n\n        pathItem = paths.get(\"/bookstore/{id}\");\n        assertNotNull(pathItem);\n        operation = pathItem.getDelete();\n        assertNotNull(operation);\n        assertTrue(operation.getResponses().getDefault().getContent().keySet().contains(\"*/*\"));\n\n    }\n\n    @Test(description = \"test ticket #2644 annotated interface\")\n    public void test2644() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(Ticket2644ConcreteImplementation.class);\n        Paths paths = openAPI.getPaths();\n        assertEquals(paths.size(), 1);\n        PathItem pathItem = paths.get(\"/resources\");\n        assertNotNull(pathItem);\n        Operation operation = pathItem.getGet();\n        assertNotNull(operation);\n        assertTrue(operation.getResponses().getDefault().getContent().keySet().contains(\"*/*\"));\n\n    }\n\n    @Test(description = \"Scan subresource per #2632\")\n    public void testSubResourceHasTheRightApiPath() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(ClassPathParentResource.class);\n        assertNotNull(openAPI);\n        assertNotNull(openAPI.getPaths().get(\"/v1/parent\"));\n        assertNotNull(openAPI.getPaths().get(\"/v1/parent/{id}\"));\n        assertEquals(openAPI.getPaths().size(), 2);\n\n        OpenAPI subResourceApi = new Reader(new OpenAPI()).read(ClassPathSubResource.class);\n        assertNotNull(subResourceApi);\n        assertNotNull(subResourceApi.getPaths().get(\"/subresource\"));\n        assertNotNull(subResourceApi.getPaths().get(\"/subresource/{id}\"));\n        assertEquals(subResourceApi.getPaths().size(), 2);\n    }\n\n    @Test(description = \"Resolve Model with XML Properties starting with is prefix per #2635\")\n    public void testModelResolverXMLPropertiesName() {\n        final MyClass myClass = new MyClass();\n        myClass.populate(\"isotonicDrink value\", \"softDrink value\",\n                \"isoDrink value\", \"isotonicDrinkOnlyXmlElement value\");\n\n        Map<String, Schema> schemas = resolveJaxb(MyClass.class);\n        assertNull(schemas.get(\"MyClass\").getProperties().get(\"isotonicDrink\"));\n        assertNotNull(schemas.get(\"MyClass\").getProperties().get(\"beerDrink\"));\n        assertNotNull(schemas.get(\"MyClass\").getProperties().get(\"saltDrink\"));\n\n        // No JsonProperty or ApiModelProperty, keep original name\n        assertNull(schemas.get(\"MyClass\").getProperties().get(\"beerDrinkXmlElement\"));\n        assertNotNull(schemas.get(\"MyClass\").getProperties().get(\"isotonicDrinkOnlyXmlElement\"));\n\n    }\n\n    @Test(description = \"Maintain Property names per #2635\")\n    public void testMaintainPropertyNames() {\n        final MyOtherClass myOtherClass = new MyOtherClass();\n        myOtherClass.populate(\"myPropertyName value\");\n\n        Map<String, Schema> schemas = resolveJaxb(MyOtherClass.class);\n        assertNotNull(schemas.get(\"MyOtherClass\").getProperties().get(\"MyPrOperTyName\"));\n\n    }\n\n    private Map<String, Schema> resolveJaxb(Type type) {\n\n        List<ModelConverter> converters = new CopyOnWriteArrayList<ModelConverter> ();\n\n        ObjectMapper mapper = JaxbObjectMapperFactory.getMapper();\n        converters.add(new ModelResolver(mapper));\n\n        ModelConverterContextImpl context = new ModelConverterContextImpl(\n                converters);\n\n        Schema resolve = context.resolve(new AnnotatedType().type(type));\n        Map<String, Schema> schemas = new HashMap<String, Schema>();\n        for (Map.Entry<String, Schema> entry : context.getDefinedModels()\n                .entrySet()) {\n            if (entry.getValue().equals(resolve)) {\n                schemas.put(entry.getKey(), entry.getValue());\n            }\n        }\n        return schemas;\n    }\n\n    @Test(description = \"Responses with array schema\")\n    public void testTicket2763() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Ticket2763Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /array:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getArrayResponses\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: array\\n\" +\n                \"                items:\\n\" +\n                \"                  $ref: https://openebench.bsc.es/monitor/tool/tool.json\\n\" +\n                \"  /schema:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getSchemaResponses\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: https://openebench.bsc.es/monitor/tool/tool.json\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Responses with array schema\")\n    public void testTicket2340() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Ticket2340Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/test:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: getAnimal\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Animal\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Animal:\\n\" +\n                \"      required:\\n\" +\n                \"      - type\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        type:\\n\" +\n                \"          type: string\\n\" +\n                \"      discriminator:\\n\" +\n                \"        propertyName: type\\n\" +\n                \"    Cat:\\n\" +\n                \"      type: object\\n\" +\n                \"      allOf:\\n\" +\n                \"      - $ref: \\\"#/components/schemas/Animal\\\"\\n\" +\n                \"      - type: object\\n\" +\n                \"        properties:\\n\" +\n                \"          lives:\\n\" +\n                \"            type: integer\\n\" +\n                \"            format: int32\\n\" +\n                \"    Dog:\\n\" +\n                \"      type: object\\n\" +\n                \"      allOf:\\n\" +\n                \"      - $ref: \\\"#/components/schemas/Animal\\\"\\n\" +\n                \"      - type: object\\n\" +\n                \"        properties:\\n\" +\n                \"          barkVolume:\\n\" +\n                \"            type: number\\n\" +\n                \"            format: double\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"array schema example\")\n    public void testTicket2806() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Ticket2806Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getTest\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Test\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Test:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        stringArray:\\n\" +\n                \"          maxItems: 4\\n\" +\n                \"          minItems: 2\\n\" +\n                \"          uniqueItems: true\\n\" +\n                \"          type: array\\n\" +\n                \"          description: Array desc\\n\" +\n                \"          example:\\n\" +\n                \"          - aaa\\n\" +\n                \"          - bbb\\n\" +\n                \"          items:\\n\" +\n                \"            type: string\\n\" +\n                \"            description: Hello, World!\\n\" +\n                \"            example: Lorem ipsum dolor set\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"NotNull parameters\")\n    public void testTicket2794() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Ticket2794Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /notnullparameter:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getBooks\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: page\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json: {}\\n\" +\n                \"  /notnullparameter/newnotnull:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: insertnotnull\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Book\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /notnullparameter/new_reqBody_required:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: insert\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Book\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Book:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        foo:\\n\" +\n                \"          type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    /*\n    TODO: in a scenario like the one in ticket 2793, currently no NPE is thrown\n    but map is still not supported. When solved, update expected yaml in test case accordingly\n     */\n    @Test(description = \"no NPE resolving map\")\n    public void testTicket2793() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Ticket2793Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /distances:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getDistances\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/DistancesResponse\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    DistancesResponse:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        empty:\\n\" +\n                \"          type: boolean\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"test ticket #2818 @Parameter annotation\")\n    public void test2818() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(Ticket2818Resource.class);\n        Paths paths = openAPI.getPaths();\n        assertEquals(paths.size(), 1);\n        PathItem pathItem = paths.get(\"/bookstore/{id}\");\n        assertNotNull(pathItem);\n        Operation operation = pathItem.getGet();\n        assertNotNull(operation);\n        assertEquals(operation.getParameters().get(0).getSchema().getType(), \"integer\");\n        assertEquals(operation.getParameters().get(0).getSchema().getFormat(), \"int32\");\n\n    }\n\n    @Test(description = \"Responses with ref\")\n    public void testResponseWithRef() {\n        Components components = new Components();\n        components.addResponses(\"invalidJWT\", new ApiResponse().description(\"when JWT token invalid/expired\"));\n        OpenAPI oas = new OpenAPI()\n                .info(new Info().description(\"info\"))\n                .components(components);\n\n        Reader reader = new Reader(oas);\n\n        OpenAPI openAPI = reader.read(RefResponsesResource.class);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  description: info\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex output\\n\" +\n                \"        object\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SampleResponseSchema\\\"\\n\" +\n                \"        default:\\n\" +\n                \"          description: boo\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/GenericError\\\"\\n\" +\n                \"        \\\"401\\\":\\n\" +\n                \"          $ref: \\\"#/components/responses/invalidJWT\\\"\\n\" +\n                \"      deprecated: true\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    GenericError:\\n\" +\n                \"      type: object\\n\" +\n                \"    SampleResponseSchema:\\n\" +\n                \"      type: object\\n\" +\n                \"  responses:\\n\" +\n                \"    invalidJWT:\\n\" +\n                \"      description: when JWT token invalid/expired\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Responses with filter\")\n    public void testResponseWithFilter() {\n        Components components = new Components();\n        components.addResponses(\"invalidJWT\", new ApiResponse().description(\"when JWT token invalid/expired\"));\n        OpenAPI oas = new OpenAPI()\n                .info(new Info().description(\"info\"))\n                .components(components);\n        Reader reader = new Reader(oas);\n\n        OpenAPI openAPI = reader.read(SimpleResponsesResource.class);\n\n\n        OpenAPISpecFilter filterImpl = new RefResponseFilter();\n        SpecFilter f = new SpecFilter();\n        openAPI = f.filter(openAPI, filterImpl, null, null, null);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  description: info\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex output\\n\" +\n                \"        object\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SampleResponseSchema\\\"\\n\" +\n                \"        default:\\n\" +\n                \"          description: boo\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/GenericError\\\"\\n\" +\n                \"        \\\"401\\\":\\n\" +\n                \"          $ref: \\\"#/components/responses/invalidJWT\\\"\\n\" +\n                \"      deprecated: true\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    GenericError:\\n\" +\n                \"      type: object\\n\" +\n                \"    SampleResponseSchema:\\n\" +\n                \"      type: object\\n\" +\n                \"  responses:\\n\" +\n                \"    invalidJWT:\\n\" +\n                \"      description: when JWT token invalid/expired\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    class RefResponseFilter extends AbstractSpecFilter {\n\n        @Override\n        public Optional<Operation> filterOperation(Operation operation, ApiDescription api, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) {\n            if (\"getWithPayloadResponse\".equals(operation.getOperationId())) {\n                final ApiResponses apiResponses = (operation.getResponses() == null) ? new ApiResponses() : operation.getResponses();\n                apiResponses.addApiResponse(\"401\", new ApiResponse().$ref(\"#/components/responses/invalidJWT\"));\n                operation.setResponses(apiResponses);\n                return Optional.of(operation);\n            }\n            return super.filterOperation(operation, api, params, cookies, headers);\n        }\n    }\n\n    @Test(description = \"array schema required property\")\n    public void testTicket2848() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Ticket2848Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getter\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Town\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Town:\\n\" +\n                \"      required:\\n\" +\n                \"      - streets\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        streets:\\n\" +\n                \"          minItems: 1\\n\" +\n                \"          uniqueItems: true\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"RequestBody with ref\")\n    public void testRequestBodyWithRef() {\n        Components components = new Components();\n        components.addRequestBodies(\"User\", new RequestBody().description(\"Test RequestBody\"));\n        OpenAPI oas = new OpenAPI()\n                .info(new Info().description(\"info\"))\n                .components(components);\n\n        Reader reader = new Reader(oas);\n        OpenAPI openAPI = reader.read(RefRequestBodyResource.class);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  description: info\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with a payload complex input object\\n\" +\n                \"      operationId: sendPayload\\n\" +\n                \"      requestBody:\\n\" +\n                \"        $ref: \\\"#/components/requestBodies/User\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"      deprecated: true\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    User:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        username:\\n\" +\n                \"          type: string\\n\" +\n                \"        firstName:\\n\" +\n                \"          type: string\\n\" +\n                \"        lastName:\\n\" +\n                \"          type: string\\n\" +\n                \"        email:\\n\" +\n                \"          type: string\\n\" +\n                \"        password:\\n\" +\n                \"          type: string\\n\" +\n                \"        phone:\\n\" +\n                \"          type: string\\n\" +\n                \"        userStatus:\\n\" +\n                \"          type: integer\\n\" +\n                \"          description: User Status\\n\" +\n                \"          format: int32\\n\" +\n                \"      xml:\\n\" +\n                \"        name: User\\n\" +\n                \"  requestBodies:\\n\" +\n                \"    User:\\n\" +\n                \"      description: Test RequestBody\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"RequestBody with filter\")\n    public void testRequestBodyWithFilter() {\n        Components components = new Components();\n        components.addRequestBodies(\"User\", new RequestBody());\n        OpenAPI oas = new OpenAPI()\n                .info(new Info().description(\"info\"))\n                .components(components);\n\n        Reader reader = new Reader(oas);\n        OpenAPI openAPI = reader.read(SimpleRequestBodyResource.class);\n\n        OpenAPISpecFilter filterImpl = new RefRequestBodyFilter();\n        SpecFilter f = new SpecFilter();\n        openAPI = f.filter(openAPI, filterImpl, null, null, null);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  description: info\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with a payload complex input object\\n\" +\n                \"      operationId: sendPayload\\n\" +\n                \"      requestBody:\\n\" +\n                \"        $ref: \\\"#/components/requestBodies/User\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"      deprecated: true\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    User:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        username:\\n\" +\n                \"          type: string\\n\" +\n                \"        firstName:\\n\" +\n                \"          type: string\\n\" +\n                \"        lastName:\\n\" +\n                \"          type: string\\n\" +\n                \"        email:\\n\" +\n                \"          type: string\\n\" +\n                \"        password:\\n\" +\n                \"          type: string\\n\" +\n                \"        phone:\\n\" +\n                \"          type: string\\n\" +\n                \"        userStatus:\\n\" +\n                \"          type: integer\\n\" +\n                \"          description: User Status\\n\" +\n                \"          format: int32\\n\" +\n                \"      xml:\\n\" +\n                \"        name: User\\n\" +\n                \"  requestBodies:\\n\" +\n                \"    User: {}\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    class RefRequestBodyFilter extends AbstractSpecFilter {\n        @Override\n        public Optional<Operation> filterOperation(Operation operation, ApiDescription api, Map<String, List<String>> params,\n                                                   Map<String, String> cookies, Map<String, List<String>> headers) {\n            if (\"sendPayload\".equals(operation.getOperationId())) {\n                final RequestBody requestBody = new RequestBody();\n                requestBody.set$ref(\"#/components/requestBodies/User\");\n                operation.setRequestBody(requestBody);\n                return Optional.of(operation);\n            }\n            return super.filterOperation(operation, api, params, cookies, headers);\n        }\n    }\n\n    @Test(description = \"Parameter with ref\")\n    public void testParameterWithRef() {\n        Components components = new Components();\n        components.addParameters(\"id\", new Parameter()\n                .description(\"Id Description\")\n                .schema(new IntegerSchema())\n                .in(ParameterIn.QUERY.toString())\n                .example(1)\n                .required(true));\n        OpenAPI oas = new OpenAPI()\n                .info(new Info().description(\"info\"))\n                .components(components);\n\n        Reader reader = new Reader(oas);\n        OpenAPI openAPI = reader.read(RefParameterResource.class);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  description: info\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with a payload complex input object\\n\" +\n                \"      operationId: sendPayload\\n\" +\n                \"      parameters:\\n\" +\n                \"      - $ref: \\\"#/components/parameters/id\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"      deprecated: true\\n\" +\n                \"components:\\n\" +\n                \"  parameters: \\n\" +\n                \"    id:\\n\" +\n                \"      in: query\\n\" +\n                \"      description: Id Description\\n\" +\n                \"      required: true\\n\" +\n                \"      schema:\\n\" +\n                \"        type: integer\\n\" +\n                \"        format: int32\\n\" +\n                \"      example: 1\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Responses with filter\")\n    public void testParameterWithFilter() {\n        Components components = new Components();\n        components.addParameters(\"id\", new Parameter()\n                .description(\"Id Description\")\n                .schema(new IntegerSchema())\n                .in(ParameterIn.QUERY.toString())\n                .example(1)\n                .required(true));\n\n        OpenAPI oas = new OpenAPI()\n                .info(new Info().description(\"info\"))\n                .components(components);\n\n        Reader reader = new Reader(oas);\n        OpenAPI openAPI = reader.read(SimpleParameterResource.class);\n\n        OpenAPISpecFilter filterImpl = new RefParameterFilter();\n        SpecFilter f = new SpecFilter();\n        openAPI = f.filter(openAPI, filterImpl, null, null, null);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  description: info\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with a payload complex input object\\n\" +\n                \"      operationId: sendPayload\\n\" +\n                \"      parameters:\\n\" +\n                \"      - $ref: \\\"#/components/parameters/id\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"      deprecated: true\\n\" +\n                \"components:\\n\" +\n                \"  parameters: \\n\" +\n                \"    id:\\n\" +\n                \"      in: query\\n\" +\n                \"      description: Id Description\\n\" +\n                \"      required: true\\n\" +\n                \"      schema:\\n\" +\n                \"        type: integer\\n\" +\n                \"        format: int32\\n\" +\n                \"      example: 1\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    class RefParameterFilter extends AbstractSpecFilter {\n        @Override\n        public Optional<Operation> filterOperation(Operation operation, ApiDescription api, Map<String, List<String>> params,\n                                                   Map<String, String> cookies, Map<String, List<String>> headers) {\n            if (\"sendPayload\".equals(operation.getOperationId())) {\n                final Parameter parameter = new Parameter();\n                parameter.set$ref(\"#/components/parameters/id\");\n                operation.getParameters().clear();\n                operation.addParametersItem(parameter);\n                return Optional.of(operation);\n            }\n            return super.filterOperation(operation, api, params, cookies, headers);\n        }\n    }\n\n    @Test(description = \"Example with ref\")\n    public void testExampleWithRef() {\n        Components components = new Components();\n        components.addExamples(\"Id\", new Example().description(\"Id Example\").summary(\"Id Example\").value(\"1\"));\n\n        OpenAPI oas = new OpenAPI()\n                .info(new Info().description(\"info\"))\n                .components(components);\n\n        Reader reader = new Reader(oas);\n        OpenAPI openAPI = reader.read(RefExamplesResource.class);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  description: info\\n\" +\n                \"paths:\\n\" +\n                \"  /example:\\n\" +\n                \"    post:\\n\" +\n                \"      description: subscribes a client to updates relevant to the requestor's account\\n\" +\n                \"      operationId: subscribe\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: subscriptionId\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        style: simple\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"          description: Schema\\n\" +\n                \"          example: Subscription example\\n\" +\n                \"        examples:\\n\" +\n                \"          subscriptionId_1:\\n\" +\n                \"            summary: Subscription number 12345\\n\" +\n                \"            description: subscriptionId_1\\n\" +\n                \"            value: 12345\\n\" +\n                \"            externalValue: Subscription external value 1\\n\" +\n                \"            $ref: \\\"#/components/examples/Id\\\"\\n\" +\n                \"        example: example\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: integer\\n\" +\n                \"              format: int32\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    SubscriptionResponse:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        subscriptionId:\\n\" +\n                \"          type: string\\n\" +\n                \"  examples:\\n\" +\n                \"    Id:\\n\" +\n                \"      summary: Id Example\\n\" +\n                \"      description: Id Example\\n\" +\n                \"      value: \\\"1\\\"\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Example with Ref Filter\")\n    public void testExampleWithFilter() {\n        Components components = new Components();\n        components.addExamples(\"Id\", new Example().description(\"Id Example\").summary(\"Id Example\").value(\"1\"));\n\n        OpenAPI oas = new OpenAPI()\n                .info(new Info().description(\"info\"))\n                .components(components);\n\n        Reader reader = new Reader(oas);\n        OpenAPI openAPI = reader.read(SimpleExamplesResource.class);\n\n        OpenAPISpecFilter filterImpl = new RefExampleFilter();\n        SpecFilter f = new SpecFilter();\n        openAPI = f.filter(openAPI, filterImpl, null, null, null);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  description: info\\n\" +\n                \"paths:\\n\" +\n                \"  /example:\\n\" +\n                \"    post:\\n\" +\n                \"      description: subscribes a client to updates relevant to the requestor's account\\n\" +\n                \"      operationId: subscribe\\n\" +\n                \"      parameters:\\n\" +\n                \"      - example:\\n\" +\n                \"          $ref: \\\"#/components/examples/Id\\\"\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: integer\\n\" +\n                \"              format: int32\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    SubscriptionResponse:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        subscriptionId:\\n\" +\n                \"          type: string\\n\" +\n                \"  examples:\\n\" +\n                \"    Id:\\n\" +\n                \"      summary: Id Example\\n\" +\n                \"      description: Id Example\\n\" +\n                \"      value: \\\"1\\\"\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    class RefExampleFilter extends AbstractSpecFilter {\n        @Override\n        public Optional<Operation> filterOperation(Operation operation, ApiDescription api, Map<String, List<String>> params,\n                                                   Map<String, String> cookies, Map<String, List<String>> headers) {\n            if (\"subscribe\".equals(operation.getOperationId())) {\n                final Parameter parameter = new Parameter();\n                parameter.setExample(new Example().$ref(\"#/components/examples/Id\"));\n                operation.getParameters().clear();\n                operation.addParametersItem(parameter);\n                return Optional.of(operation);\n            }\n            return super.filterOperation(operation, api, params, cookies, headers);\n        }\n    }\n\n    @Test(description = \"Header with Ref\")\n    public void testHeaderWithRef() {\n        Components components = new Components();\n        components.addHeaders(\"Header\", new Header().description(\"Header Description\"));\n\n        OpenAPI oas = new OpenAPI()\n                .info(new Info().description(\"info\"))\n                .components(components);\n\n        Reader reader = new Reader(oas);\n        OpenAPI openAPI = reader.read(RefHeaderResource.class);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  description: info\\n\" +\n                \"paths:\\n\" +\n                \"  /path:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex output\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          headers:\\n\" +\n                \"            Rate-Limit-Limit:\\n\" +\n                \"              description: The number of allowed requests in the current period\\n\" +\n                \"              $ref: \\\"#/components/headers/Header\\\"\\n\" +\n                \"              style: simple\\n\" +\n                \"              schema:\\n\" +\n                \"                type: integer\\n\" +\n                \"      deprecated: true\\n\" +\n                \"components:\\n\" +\n                \"  headers:\\n\" +\n                \"    Header:\\n\" +\n                \"      description: Header Description\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"SecurityScheme with REf\")\n    public void testSecuritySchemeWithRef() {\n        Components components = new Components();\n        components.addSecuritySchemes(\"Security\", new SecurityScheme().description(\"Security Example\").\n                name(\"Security\").type(SecurityScheme.Type.OAUTH2).$ref(\"myOauth2Security\").in(SecurityScheme.In.HEADER));\n\n        OpenAPI oas = new OpenAPI()\n                .info(new Info().description(\"info\"))\n                .components(components);\n\n        Reader reader = new Reader(oas);\n        OpenAPI openAPI = reader.read(RefSecurityResource.class);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  description: info\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      description: description\\n\" +\n                \"      operationId: Operation Id\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"      security:\\n\" +\n                \"      - security_key:\\n\" +\n                \"        - write:pets\\n\" +\n                \"        - read:pets\\n\" +\n                \"components:\\n\" +\n                \"  securitySchemes:\\n\" +\n                \"    Security:\\n\" +\n                \"      type: oauth2\\n\" +\n                \"      description: Security Example\\n\" +\n                \"    myOauth2Security:\\n\" +\n                \"      type: oauth2\\n\" +\n                \"      description: myOauthSecurity Description\\n\" +\n                \"      $ref: \\\"#/components/securitySchemes/Security\\\"\\n\" +\n                \"      in: header\\n\" +\n                \"      flows:\\n\" +\n                \"        implicit:\\n\" +\n                \"          authorizationUrl: http://x.com\\n\" +\n                \"          scopes:\\n\" +\n                \"            write:pets: modify pets in your account\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Link with Ref\")\n    public void testLinkWithRef() {\n        Components components = new Components();\n        components.addLinks(\"Link\", new Link().description(\"Link Description\").operationId(\"id\"));\n        OpenAPI oas = new OpenAPI()\n                .info(new Info().description(\"info\"))\n                .components(components);\n\n        Reader reader = new Reader(oas);\n        OpenAPI openAPI = reader.read(RefLinksResource.class);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  description: info\\n\" +\n                \"paths:\\n\" +\n                \"  /links:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getUserWithAddress\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: userId\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: test description\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"          links:\\n\" +\n                \"            address:\\n\" +\n                \"              operationId: getAddress\\n\" +\n                \"              parameters:\\n\" +\n                \"                userId: $request.query.userId\\n\" +\n                \"              $ref: \\\"#/components/links/Link\\\"\\n\" +\n                \"components:\\n\" +\n                \"  links:\\n\" +\n                \"    Link:\\n\" +\n                \"      operationId: id\\n\" +\n                \"      description: Link Description\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Callback with Ref\")\n    public void testCallbackWithRef() {\n        Components components = new Components();\n        components.addCallbacks(\"Callback\", new Callback().addPathItem(\"/post\", new PathItem().description(\"Post Path Item\")));\n        OpenAPI oas = new OpenAPI()\n                .info(new Info().description(\"info\"))\n                .components(components);\n\n        Reader reader = new Reader(oas);\n        OpenAPI openAPI = reader.read(RefCallbackResource.class);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  description: info\\n\" +\n                \"paths:\\n\" +\n                \"  /simplecallback:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"      callbacks:\\n\" +\n                \"        testCallback1:\\n\" +\n                \"          $ref: \\\"#/components/callbacks/Callback\\\"\\n\" +\n                \"components:\\n\" +\n                \"  callbacks:\\n\" +\n                \"    Callback:\\n\" +\n                \"      /post:\\n\" +\n                \"        description: Post Path Item\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test\n    public void testTicket3015() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Ticket3015Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/test:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: schemaImpl\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: OK\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\\n\" +\n                \"                format: uri\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Bad Request\\n\" +\n                \"        \\\"500\\\":\\n\" +\n                \"          description: Internal Server Error\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        PrimitiveType.customExcludedClasses().add(URI.class.getName());\n        openAPI = reader.read(Ticket3015Resource.class);\n        yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/test:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: schemaImpl_1\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: OK\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: object\\n\" +\n                \"                properties:\\n\" +\n                \"                  scheme:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  fragment:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  authority:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  userInfo:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  host:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  port:\\n\" +\n                \"                    type: integer\\n\" +\n                \"                    format: int32\\n\" +\n                \"                  path:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  query:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  schemeSpecificPart:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  rawSchemeSpecificPart:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  rawAuthority:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  rawUserInfo:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  rawPath:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  rawQuery:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  rawFragment:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  absolute:\\n\" +\n                \"                    type: boolean\\n\" +\n                \"                  opaque:\\n\" +\n                \"                    type: boolean\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Bad Request\\n\" +\n                \"        \\\"500\\\":\\n\" +\n                \"          description: Internal Server Error\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        PrimitiveType.customExcludedClasses().remove(URI.class.getName());\n    }\n\n\n    @Test(description = \"Parameter with ref\")\n    public void testTicket3029() {\n        Components components = new Components();\n        components.addParameters(\"id\", new Parameter()\n                .description(\"Id Description\")\n                .schema(new IntegerSchema())\n                .in(ParameterIn.QUERY.toString())\n                .example(1)\n                .required(true));\n        OpenAPI oas = new OpenAPI()\n                .info(new Info().description(\"info\"))\n                .components(components);\n\n        Reader reader = new Reader(oas);\n        OpenAPI openAPI = reader.read(RefParameter3029Resource.class);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  description: info\\n\" +\n                \"paths:\\n\" +\n                \"  /2:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      operationId: sendPayload2\\n\" +\n                \"      parameters:\\n\" +\n                \"      - $ref: \\\"#/components/parameters/id\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /1:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      operationId: sendPayload1\\n\" +\n                \"      parameters:\\n\" +\n                \"      - $ref: \\\"#/components/parameters/id\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  parameters:\\n\" +\n                \"    id:\\n\" +\n                \"      in: query\\n\" +\n                \"      description: Id Description\\n\" +\n                \"      required: true\\n\" +\n                \"      schema:\\n\" +\n                \"        type: integer\\n\" +\n                \"        format: int32\\n\" +\n                \"      example: 1\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"response generic subclass\")\n    public void testTicket3082() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(ProcessTokenRestService.class);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /token:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: create\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/ProcessTokenDTO\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/ProcessTokenDTO\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    ProcessTokenDTO:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        guid:\\n\" +\n                \"          type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Filter class return type\")\n    public void testTicket3074() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI oasResult = reader.read(RefParameter3074Resource.class);\n        SerializationMatchers.assertEqualsToYaml(oasResult, RefParameter3074Resource.EXPECTED_YAML_WITH_WRAPPER);\n\n        ModelConverters.getInstance().addClassToSkip(\"io.swagger.v3.jaxrs2.resources.RefParameter3074Resource$Wrapper\");\n\n        reader = new Reader(new OpenAPI());\n        oasResult = reader.read(RefParameter3074Resource.class);\n        SerializationMatchers.assertEqualsToYaml(oasResult, RefParameter3074Resource.EXPECTED_YAML_WITHOUT_WRAPPER);\n    }\n\n    @Test(description = \"Single Example\")\n    public void testSingleExample() {\n\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(SingleExampleResource.class);\n\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test1:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: test1\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"            example:\\n\" +\n                \"              foo: foo\\n\" +\n                \"              bar: bar\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test2:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: test2\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"            example:\\n\" +\n                \"              foo: foo\\n\" +\n                \"              bar: bar\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    User:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        username:\\n\" +\n                \"          type: string\\n\" +\n                \"        firstName:\\n\" +\n                \"          type: string\\n\" +\n                \"        lastName:\\n\" +\n                \"          type: string\\n\" +\n                \"        email:\\n\" +\n                \"          type: string\\n\" +\n                \"        password:\\n\" +\n                \"          type: string\\n\" +\n                \"        phone:\\n\" +\n                \"          type: string\\n\" +\n                \"        userStatus:\\n\" +\n                \"          type: integer\\n\" +\n                \"          description: User Status\\n\" +\n                \"          format: int32\\n\" +\n                \"      xml:\\n\" +\n                \"        name: User\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test\n    public void testTicket3092() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(UploadResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /upload:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: uploadWithBean\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          multipart/form-data:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                name:\\n\" +\n                \"                  type: string\\n\" +\n                \"                picture:\\n\" +\n                \"                  $ref: \\\"#/components/schemas/picture\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json: {}\\n\" +\n                \"  /upload/requestbody:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: uploadWithBeanAndRequestBody\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          multipart/form-data:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/UploadRequest\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json: {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    picture:\\n\" +\n                \"      type: object\\n\" +\n                \"      format: binary\\n\" +\n                \"    UploadRequest:\\n\" +\n                \"      title: Schema for Upload\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        picture:\\n\" +\n                \"          type: string\\n\" +\n                \"          format: binary\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Parameter examples ordering\")\n    public void testTicket3587() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Ticket3587Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\"\n                + \"paths:\\n\"\n                + \"  /test/test:\\n\"\n                + \"    get:\\n\"\n                + \"      operationId: parameterExamplesOrderingTest\\n\"\n                + \"      parameters:\\n\"\n                + \"      - in: query\\n\"\n                + \"        schema:\\n\"\n                + \"          type: string\\n\"\n                + \"        examples:\\n\"\n                + \"          Example One:\\n\"\n                + \"            description: Example One\\n\"\n                + \"          Example Two:\\n\"\n                + \"            description: Example Two\\n\"\n                + \"          Example Three:\\n\"\n                + \"            description: Example Three\\n\"\n                + \"      - in: query\\n\"\n                + \"        schema:\\n\"\n                + \"          type: string\\n\"\n                + \"        examples:\\n\"\n                + \"          Example Three:\\n\"\n                + \"            description: Example Three\\n\"\n                + \"          Example Two:\\n\"\n                + \"            description: Example Two\\n\"\n                + \"          Example One:\\n\"\n                + \"            description: Example One\\n\"\n                + \"      responses:\\n\"\n                + \"        default:\\n\"\n                + \"          description: default response\\n\"\n                + \"          content:\\n\"\n                + \"            '*/*': {}\";\n        SerializationMatchers.assertEqualsToYamlExact(openAPI, yaml);\n    }\n\n    @Test(description = \"Optional handling\")\n    public void testTicket3624() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Service.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /example/model:\\n\" +\n                \"    get:\\n\" +\n                \"      tags:\\n\" +\n                \"      - ExampleService\\n\" +\n                \"      summary: ' Retrieve models for display to the user'\\n\" +\n                \"      operationId: getModels\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Response\\\"\\n\" +\n                \"  /example/model/by/ids:\\n\" +\n                \"    get:\\n\" +\n                \"      tags:\\n\" +\n                \"      - ExampleService\\n\" +\n                \"      summary: ' Retrieve models by their ids'\\n\" +\n                \"      operationId: getModelsById\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/ByIdResponse\\\"\\n\" +\n                \"  /example/containerized/model:\\n\" +\n                \"    get:\\n\" +\n                \"      tags:\\n\" +\n                \"      - ExampleService\\n\" +\n                \"      summary: ' Retrieve review insights for a specific product'\\n\" +\n                \"      operationId: getContainerizedModels\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/ContainerizedResponse\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Model:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        text:\\n\" +\n                \"          type: string\\n\" +\n                \"        title:\\n\" +\n                \"          type: string\\n\" +\n                \"        active:\\n\" +\n                \"          type: boolean\\n\" +\n                \"        schemaParent:\\n\" +\n                \"          $ref: \\\"#/components/schemas/Model\\\"\\n\" +\n                \"        optionalString:\\n\" +\n                \"          type: string\\n\" +\n                \"        parent:\\n\" +\n                \"          $ref: \\\"#/components/schemas/Model\\\"\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"    Response:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        count:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        models:\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            $ref: \\\"#/components/schemas/Model\\\"\\n\" +\n                \"    ByIdResponse:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        modelsById:\\n\" +\n                \"          type: object\\n\" +\n                \"          additionalProperties:\\n\" +\n                \"            $ref: \\\"#/components/schemas/Model\\\"\\n\" +\n                \"    ContainerizedResponse:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        totalCount:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        containerizedModels:\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            $ref: \\\"#/components/schemas/ModelContainer\\\"\\n\" +\n                \"    ModelContainer:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        text:\\n\" +\n                \"          type: string\\n\" +\n                \"        model:\\n\" +\n                \"          $ref: \\\"#/components/schemas/Model\\\"\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test\n    public void testRequestBodyEncoding() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(UrlEncodedResourceWithEncodings.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /things/search:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: searchForThings\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/x-www-form-urlencoded:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                id:\\n\" +\n                \"                  type: array\\n\" +\n                \"                  description: id param\\n\" +\n                \"                  items:\\n\" +\n                \"                    type: string\\n\" +\n                \"                name:\\n\" +\n                \"                  type: array\\n\" +\n                \"                  items:\\n\" +\n                \"                    type: string\\n\" +\n                \"            encoding:\\n\" +\n                \"              id:\\n\" +\n                \"                style: form\\n\" +\n                \"                explode: true\\n\" +\n                \"              name:\\n\" +\n                \"                style: form\\n\" +\n                \"                explode: false\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json: {}\\n\" +\n                \"  /things/sriracha:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: srirachaThing\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/x-www-form-urlencoded:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                id:\\n\" +\n                \"                  type: array\\n\" +\n                \"                  description: id param\\n\" +\n                \"                  items:\\n\" +\n                \"                    type: string\\n\" +\n                \"                name:\\n\" +\n                \"                  type: array\\n\" +\n                \"                  items:\\n\" +\n                \"                    type: string\\n\" +\n                \"            encoding:\\n\" +\n                \"              id:\\n\" +\n                \"                style: form\\n\" +\n                \"                explode: true\\n\" +\n                \"              name:\\n\" +\n                \"                style: form\\n\" +\n                \"                explode: false\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json: {}\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"overridden generic resource methods\")\n    public void testTicket3694() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Ticket3694ResourceExtendedType.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /foo:\\n\" +\n                \"    post:\\n\" +\n                \"      tags:\\n\" +\n                \"      - Foo\\n\" +\n                \"      summary: Foo List in Interface\\n\" +\n                \"      operationId: foo\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: array\\n\" +\n                \"              items:\\n\" +\n                \"                type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /bar:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: bar\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: array\\n\" +\n                \"              items:\\n\" +\n                \"                type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\\n\" +\n                \"  /another:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: another\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n\n        reader = new Reader(new OpenAPI());\n        openAPI = reader.read(Ticket3694Resource.class);\n        yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /foo:\\n\" +\n                \"    post:\\n\" +\n                \"      tags:\\n\" +\n                \"      - Foo\\n\" +\n                \"      summary: Foo List in Interface\\n\" +\n                \"      operationId: foo\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: array\\n\" +\n                \"              items:\\n\" +\n                \"                type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /bar:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: bar\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: array\\n\" +\n                \"              items:\\n\" +\n                \"                type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\\n\" +\n                \"  /another:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: another\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n\n        reader = new Reader(new OpenAPI());\n        openAPI = reader.read(Ticket3694ResourceSimple.class);\n        yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /bar:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: bar\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: array\\n\" +\n                \"              items:\\n\" +\n                \"                type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n\n        reader = new Reader(new OpenAPI());\n        openAPI = reader.read(Ticket3694ResourceSimpleSameReturn.class);\n        yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /bar:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: bar\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: array\\n\" +\n                \"              items:\\n\" +\n                \"                type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"non consistent overridden generic resource methods\")\n    public void testTicket2144() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(ItemResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /item/{id}:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getById\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: id\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/ItemWithChildren\\\"\\n\" +\n                \"  /item/nogeneric/{id}:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getByIdNoGeneric\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: id\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/ItemWithChildren\\\"\\n\" +\n                \"  /item/nogenericsamereturn/{id}:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getByIdNoGenericSameReturn\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: id\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/BaseDTO\\\"\\n\" +\n                \"  /item/genericparam:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: genericParam\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/ItemWithChildren\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/BaseDTO\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    ItemWithChildren:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        names:\\n\" +\n                \"          type: string\\n\" +\n                \"    BaseDTO:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"overridden generic resource interface default methods\")\n    public void testTicket3149() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(MainResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    post:\\n\" +\n                \"      tags:\\n\" +\n                \"      - Test inheritance on default implementation in interfaces\\n\" +\n                \"      operationId: firstEndpoint\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/SampleDTO\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"201\\\":\\n\" +\n                \"          description: Created\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Bad Request\\n\" +\n                \"        \\\"403\\\":\\n\" +\n                \"          description: Forbidden\\n\" +\n                \"        \\\"404\\\":\\n\" +\n                \"          description: Not Found\\n\" +\n                \"  /test/{id}:\\n\" +\n                \"    get:\\n\" +\n                \"      tags:\\n\" +\n                \"      - Test inheritance on default implementation in interfaces\\n\" +\n                \"      operationId: secondEnpoint\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/SampleOtherDTO\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: OK\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Bad Request\\n\" +\n                \"        \\\"403\\\":\\n\" +\n                \"          description: Forbidden\\n\" +\n                \"        \\\"404\\\":\\n\" +\n                \"          description: Not Found\\n\" +\n                \"  /test/original/{id}:\\n\" +\n                \"    get:\\n\" +\n                \"      tags:\\n\" +\n                \"      - Test inheritance on default implementation in interfaces\\n\" +\n                \"      operationId: originalEndpoint\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/SampleOtherDTO\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: OK\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Bad Request\\n\" +\n                \"        \\\"403\\\":\\n\" +\n                \"          description: Forbidden\\n\" +\n                \"        \\\"404\\\":\\n\" +\n                \"          description: Not Found\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    SampleDTO:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"    SampleOtherDTO:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        label:\\n\" +\n                \"          type: string\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"overridden generic resource methods operationId\")\n    public void testTicket3426() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Ticket3426Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /inheritExample/{input}:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: get\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: input\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Constraints annotations in models\")\n    public void testTicket3731() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Ticket3731Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/cart:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Get cart items\\n\" +\n                \"      description: Paging follows RFC 5005.\\n\" +\n                \"      operationId: getCart\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: pageSize\\n\" +\n                \"        in: query\\n\" +\n                \"        description: \\\"Number of items per page. Range[1, 200]\\\"\\n\" +\n                \"        schema:\\n\" +\n                \"          maximum: 200\\n\" +\n                \"          minimum: 1\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"          default: 50\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: array\\n\" +\n                \"                items:\\n\" +\n                \"                  type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n\n        reader = new Reader(new OpenAPI());\n        openAPI = reader.read(Ticket3731BisResource.class);\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Test SchemaProperties and additionalProperties annotations\")\n    public void testSchemaProperties() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(SchemaPropertiesResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex output\\n\" +\n                \"        object\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: object\\n\" +\n                \"                properties:\\n\" +\n                \"                  foo:\\n\" +\n                \"                    maximum: 1\\n\" +\n                \"                    type: integer\\n\" +\n                \"        default:\\n\" +\n                \"          description: boo\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                maxProperties: 3\\n\" +\n                \"                type: object\\n\" +\n                \"                properties:\\n\" +\n                \"                  foo:\\n\" +\n                \"                    maximum: 1\\n\" +\n                \"                    type: integer\\n\" +\n                \"                description: various properties\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: additionalProperties schema\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                maxProperties: 2\\n\" +\n                \"                type: object\\n\" +\n                \"                additionalProperties:\\n\" +\n                \"                  type: string\\n\" +\n                \"        \\\"401\\\":\\n\" +\n                \"          description: additionalProperties boolean\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                maxProperties: 2\\n\" +\n                \"                type: object\\n\" +\n                \"                additionalProperties: false\\n\" +\n                \"      deprecated: true\\n\" +\n                \"  /one:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: requestBodySchemaPropertyNoSchema\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/yaml:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                foo:\\n\" +\n                \"                  type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/MultipleBaseBean\\\"\\n\" +\n                \"  /two:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: requestBodySchemaPropertySchema\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/yaml:\\n\" +\n                \"            schema:\\n\" +\n                \"              required:\\n\" +\n                \"              - foo\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                foo:\\n\" +\n                \"                  type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/MultipleBaseBean\\\"\\n\" +\n                \"  /three:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: requestBodySchemaPropertySchemaArray\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/yaml:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: array\\n\" +\n                \"              items:\\n\" +\n                \"                required:\\n\" +\n                \"                - foo\\n\" +\n                \"                type: object\\n\" +\n                \"                properties:\\n\" +\n                \"                  foo:\\n\" +\n                \"                    type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/MultipleBaseBean\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    MultipleBaseBean:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        beanType:\\n\" +\n                \"          type: string\\n\" +\n                \"        a:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        b:\\n\" +\n                \"          type: string\\n\" +\n                \"      description: MultipleBaseBean\\n\" +\n                \"    MultipleSub1Bean:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: MultipleSub1Bean\\n\" +\n                \"      allOf:\\n\" +\n                \"      - $ref: \\\"#/components/schemas/MultipleBaseBean\\\"\\n\" +\n                \"      - type: object\\n\" +\n                \"        properties:\\n\" +\n                \"          c:\\n\" +\n                \"            type: integer\\n\" +\n                \"            format: int32\\n\" +\n                \"    MultipleSub2Bean:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: MultipleSub2Bean\\n\" +\n                \"      allOf:\\n\" +\n                \"      - $ref: \\\"#/components/schemas/MultipleBaseBean\\\"\\n\" +\n                \"      - type: object\\n\" +\n                \"        properties:\\n\" +\n                \"          d:\\n\" +\n                \"            type: integer\\n\" +\n                \"            format: int32\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Test Schema AdditionalProperties annotations\")\n    public void testSchemaAdditionalProperties() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(SchemaAdditionalPropertiesResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /arraySchemaImpl:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: arraySchemaImpl\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: object\\n\" +\n                \"                additionalProperties:\\n\" +\n                \"                  type: array\\n\" +\n                \"                  items:\\n\" +\n                \"                    $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"  /fromtResponseType:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: fromtResponseType\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: object\\n\" +\n                \"                additionalProperties:\\n\" +\n                \"                  type: array\\n\" +\n                \"                  items:\\n\" +\n                \"                    $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"  /schemaImpl:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: schemaImpl\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: object\\n\" +\n                \"                additionalProperties:\\n\" +\n                \"                  $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"  /schemaNotImpl:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: schemaNotImpl\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: object\\n\" +\n                \"                additionalProperties:\\n\" +\n                \"                  $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Pet:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        foo:\\n\" +\n                \"          type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Test Schema AdditionalProperties annotations\")\n    public void testSchemaAdditionalPropertiesBoolean() {\n        ModelConverters.reset();\n        SwaggerConfiguration config = new SwaggerConfiguration().openAPI(new OpenAPI()).schemaResolution(Schema.SchemaResolution.ALL_OF);\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(SchemaAdditionalPropertiesBooleanResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: test\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Bar:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        foo:\\n\" +\n                \"          type: string\\n\" +\n                \"    Pet:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          allOf:\\n\" +\n                \"          - additionalProperties:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Bar\\\"\\n\" +\n                \"          - $ref: \\\"#/components/schemas/Bar\\\"\\n\" +\n                \"        vbar:\\n\" +\n                \"          allOf:\\n\" +\n                \"          - additionalProperties: false\\n\" +\n                \"          - $ref: \\\"#/components/schemas/Bar\\\"\\n\" +\n                \"      additionalProperties: false\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test(description = \"Test ArraySchema implementation annotations\")\n    public void testArraySchemaImplementation() {\n        SwaggerConfiguration config = new SwaggerConfiguration().openAPI31(true).openAPI(new OpenAPI());\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(ArraySchemaImplementationResource.class);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: test\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Pet:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        cars:\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: integer\\n\" +\n                \"            format: int32\\n\" +\n                \"            description: A house in a street\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n\n    @Test(description = \"Responses schema resolved from return type\")\n    public void testResponseReturnType() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(ResponseReturnTypeResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /sample/{id}:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Find by id\\n\" +\n                \"      description: Find by id operation\\n\" +\n                \"      operationId: find\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: id\\n\" +\n                \"        in: path\\n\" +\n                \"        description: ID\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: Ok\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/TestDTO\\\"\\n\" +\n                \"        \\\"201\\\":\\n\" +\n                \"          description: \\\"201\\\"\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/TestDTO\\\"\\n\" +\n                \"        \\\"204\\\":\\n\" +\n                \"          description: No Content\\n\" +\n                \"          content:\\n\" +\n                \"            application/json: {}\\n\" +\n                \"  /sample/{id}/default:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Find by id (default)\\n\" +\n                \"      description: Find by id operation (default)\\n\" +\n                \"      operationId: findDefault\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: id\\n\" +\n                \"        in: path\\n\" +\n                \"        description: ID\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/TestDTO\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    TestDTO:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        foo:\\n\" +\n                \"          type: string\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Responses Default Status\")\n    public void testResponseDefaultStatus() {\n        SwaggerConfiguration config = new SwaggerConfiguration().defaultResponseCode(\"200\");\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(DefaultResponseResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: test\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test\n    public void test4412PathWildcards() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Ticket4412Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/sws/{var}:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getCart\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: var\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          pattern: .*\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            text/xml:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: array\\n\" +\n                \"                items:\\n\" +\n                \"                  type: string\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test\n    public void testOas31Petstore() {\n        SwaggerConfiguration config = new SwaggerConfiguration().openAPI31(true).openAPI(new OpenAPI());\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(PetResource.class);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /pet:\\n\" +\n                \"    put:\\n\" +\n                \"      summary: Update an existing pet\\n\" +\n                \"      operationId: updatePet\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Pet object that needs to be added to the store\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Invalid ID supplied\\n\" +\n                \"        \\\"404\\\":\\n\" +\n                \"          description: Pet not found\\n\" +\n                \"        \\\"405\\\":\\n\" +\n                \"          description: Validation exception\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Add a new pet to the store\\n\" +\n                \"      operationId: addPet\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Pet object that needs to be added to the store\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"405\\\":\\n\" +\n                \"          description: Invalid input\\n\" +\n                \"  /pet/bodyid:\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Add a new pet to the store passing an integer with generic parameter\\n\" +\n                \"        annotation\\n\" +\n                \"      operationId: addPetByInteger\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Pet object that needs to be added to the store\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: integer\\n\" +\n                \"              format: int32\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: integer\\n\" +\n                \"              format: int32\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"405\\\":\\n\" +\n                \"          description: Invalid input\\n\" +\n                \"  /pet/bodyidnoannotation:\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Add a new pet to the store passing an integer without parameter annotation\\n\" +\n                \"      operationId: addPetByIntegerNoAnnotation\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: integer\\n\" +\n                \"              format: int32\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: integer\\n\" +\n                \"              format: int32\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"405\\\":\\n\" +\n                \"          description: Invalid input\\n\" +\n                \"  /pet/bodynoannotation:\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Add a new pet to the store no annotation\\n\" +\n                \"      operationId: addPetNoAnnotation\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"405\\\":\\n\" +\n                \"          description: Invalid input\\n\" +\n                \"  /pet/findByStatus:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Finds Pets by status\\n\" +\n                \"      description: Multiple status values can be provided with comma separated strings\\n\" +\n                \"      operationId: findPetsByStatus\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: status\\n\" +\n                \"        in: query\\n\" +\n                \"        description: Status values that need to be considered for filter\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      - name: skip\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"      - name: limit\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Invalid status value\\n\" +\n                \"  /pet/findByTags:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Finds Pets by tags\\n\" +\n                \"      description: \\\"Multiple tags can be provided with comma separated strings. Use\\\\\\n\" +\n                \"        \\\\ tag1, tag2, tag3 for testing.\\\"\\n\" +\n                \"      operationId: findPetsByTags\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: tags\\n\" +\n                \"        in: query\\n\" +\n                \"        description: Tags to filter by\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: Pets matching criteria\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Invalid tag value\\n\" +\n                \"      deprecated: true\\n\" +\n                \"  /pet/{petId}:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Find pet by ID\\n\" +\n                \"      description: Returns a pet when 0 < ID <= 10.  ID > 10 or nonintegers will simulate\\n\" +\n                \"        API error conditions\\n\" +\n                \"      operationId: getPetById\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: petId\\n\" +\n                \"        in: path\\n\" +\n                \"        description: ID of pet that needs to be fetched\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: The pet\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"            application/xml:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Invalid ID supplied\\n\" +\n                \"        \\\"404\\\":\\n\" +\n                \"          description: Pet not found\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Bar:\\n\" +\n                \"      type: object\\n\" +\n                \"      deprecated: true\\n\" +\n                \"      description: Bar\\n\" +\n                \"      properties:\\n\" +\n                \"        foo:\\n\" +\n                \"          type: string\\n\" +\n                \"          const: bar\\n\" +\n                \"        bar:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"          exclusiveMaximum: 4\\n\" +\n                \"        foobar:\\n\" +\n                \"          type:\\n\" +\n                \"          - string\\n\" +\n                \"          - integer\\n\" +\n                \"          format: int32\\n\" +\n                \"    Category:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"      xml:\\n\" +\n                \"        name: Category\\n\" +\n                \"    Foo:\\n\" +\n                \"      type: object\\n\" +\n                \"      deprecated: true\\n\" +\n                \"      description: Foo\\n\" +\n                \"      properties:\\n\" +\n                \"        foo:\\n\" +\n                \"          type: string\\n\" +\n                \"          const: foo\\n\" +\n                \"        bar:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"          exclusiveMaximum: 2\\n\" +\n                \"        foobar:\\n\" +\n                \"          type:\\n\" +\n                \"          - string\\n\" +\n                \"          - object\\n\" +\n                \"          format: int32\\n\" +\n                \"    IfSchema:\\n\" +\n                \"      type: object\\n\" +\n                \"      deprecated: true\\n\" +\n                \"      description: if schema\\n\" +\n                \"      properties:\\n\" +\n                \"        foo:\\n\" +\n                \"          type: string\\n\" +\n                \"          const: foo\\n\" +\n                \"        bar:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"          exclusiveMaximum: 2\\n\" +\n                \"        foobar:\\n\" +\n                \"          type:\\n\" +\n                \"          - string\\n\" +\n                \"          - object\\n\" +\n                \"          format: int32\\n\" +\n                \"    Pet:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        category:\\n\" +\n                \"          $ref: \\\"#/components/schemas/Category\\\"\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        photoUrls:\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: string\\n\" +\n                \"            xml:\\n\" +\n                \"              name: photoUrl\\n\" +\n                \"          xml:\\n\" +\n                \"            wrapped: true\\n\" +\n                \"        tags:\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            $ref: \\\"#/components/schemas/Tag\\\"\\n\" +\n                \"          xml:\\n\" +\n                \"            wrapped: true\\n\" +\n                \"        status:\\n\" +\n                \"          type: string\\n\" +\n                \"          if:\\n\" +\n                \"            $ref: \\\"#/components/schemas/IfSchema\\\"\\n\" +\n                \"          $id: idtest\\n\" +\n                \"          description: pet status in the store\\n\" +\n                \"          enum:\\n\" +\n                \"          - \\\"available,pending,sold\\\"\\n\" +\n                \"      xml:\\n\" +\n                \"        name: Pet\\n\" +\n                \"    Tag:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        annotated:\\n\" +\n                \"          type: object\\n\" +\n                \"          $ref: \\\"#/components/schemas/Category\\\"\\n\" +\n                \"          description: child description\\n\" +\n                \"          properties:\\n\" +\n                \"            foo:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Foo\\\"\\n\" +\n                \"            bar:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Bar\\\"\\n\" +\n                \"      xml:\\n\" +\n                \"        name: Tag\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n\n    @Test\n    public void test31RefSiblings() {\n        SwaggerConfiguration config = new SwaggerConfiguration().openAPI31(true).openAPI(new OpenAPI());\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(TagResource.class);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /tag/tag:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getTag\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SimpleTag\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Foo:\\n\" +\n                \"      type: object\\n\" +\n                \"      deprecated: true\\n\" +\n                \"      description: Foo\\n\" +\n                \"      properties:\\n\" +\n                \"        foo:\\n\" +\n                \"          type: string\\n\" +\n                \"          const: foo\\n\" +\n                \"        bar:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"          exclusiveMaximum: 2\\n\" +\n                \"        foobar:\\n\" +\n                \"          type:\\n\" +\n                \"          - string\\n\" +\n                \"          - object\\n\" +\n                \"          format: int32\\n\" +\n                \"    SimpleTag:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        annotated:\\n\" +\n                \"          type: object\\n\" +\n                \"          $ref: \\\"#/components/schemas/SimpleCategory\\\"\\n\" +\n                \"          description: child description\\n\" +\n                \"          properties:\\n\" +\n                \"            foo:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Foo\\\"\\n\" +\n                \"    SimpleCategory: {}\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n\n    @Test\n    public void testSiblings() {\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).openAPI31(true));\n\n        OpenAPI openAPI = reader.read(SiblingsResource.class);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getCart\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Category:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: parent\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"    Pet:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: Pet\\n\" +\n                \"      properties:\\n\" +\n                \"        category:\\n\" +\n                \"          $ref: \\\"#/components/schemas/Category\\\"\\n\" +\n                \"          description: child\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n\n    @Test\n    public void testSiblingsOnResource() {\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).openAPI31(true));\n\n        OpenAPI openAPI = reader.read(SiblingsResourceSimple.class);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getCart\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"300\\\":\\n\" +\n                \"          description: aaa\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/PetSimple\\\"\\n\" +\n                \"                description: resource pet\\n\" +\n                \"                readOnly: true\\n\" +\n                \"  /test/impl:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getCartImpl\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"300\\\":\\n\" +\n                \"          description: aaa\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/PetSimple\\\"\\n\" +\n                \"                description: resource pet\\n\" +\n                \"                readOnly: true\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    PetSimple:\\n\" +\n                \"      description: Pet\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n\n    @Test\n    public void testSiblingsOnResourceResponse() {\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).openAPI31(true));\n\n        OpenAPI openAPI = reader.read(SiblingsResourceResponse.class);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getCart\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"300\\\":\\n\" +\n                \"          description: aaa\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/PetSimple\\\"\\n\" +\n                \"                description: resource pet\\n\" +\n                \"                readOnly: true\\n\" +\n                \"            application/xml:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/PetSimple\\\"\\n\" +\n                \"                description: resource pet xml\\n\" +\n                \"                readOnly: true\\n\" +\n                \"  /test/impl:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getCartImpl\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"300\\\":\\n\" +\n                \"          description: aaa\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/PetSimple\\\"\\n\" +\n                \"                description: resource pet\\n\" +\n                \"                readOnly: true\\n\" +\n                \"            application/xml:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/PetSimple\\\"\\n\" +\n                \"                description: resource pet xml\\n\" +\n                \"                readOnly: true\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    PetSimple:\\n\" +\n                \"      description: Pet\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n\n    @Test\n    public void testSiblingsOnResourceRequestBody() {\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).openAPI31(true));\n\n        OpenAPI openAPI = reader.read(SiblingsResourceRequestBody.class);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test/bodyimpl:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getBodyImpl\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: aaa\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/PetSimple\\\"\\n\" +\n                \"              description: resource pet\\n\" +\n                \"              writeOnly: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/bodyimplparam:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getBodyImplParam\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/PetSimple\\\"\\n\" +\n                \"              description: resource pet\\n\" +\n                \"              writeOnly: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    PetSimple:\\n\" +\n                \"      description: Pet\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n\n    @Test\n    public void testSiblingsOnResourceRequestBodyMultiple() {\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).openAPI31(true));\n\n        OpenAPI openAPI = reader.read(SiblingsResourceRequestBodyMultiple.class);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test/bodyimpl:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getBodyImpl\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: aaa\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/PetSimple\\\"\\n\" +\n                \"              description: resource pet\\n\" +\n                \"              writeOnly: true\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/PetSimple\\\"\\n\" +\n                \"              description: resource pet xml\\n\" +\n                \"              writeOnly: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/bodyimplparam:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getBodyImplParam\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/PetSimple\\\"\\n\" +\n                \"              description: resource pet\\n\" +\n                \"              writeOnly: true\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/PetSimple\\\"\\n\" +\n                \"              description: resource pet xml\\n\" +\n                \"              writeOnly: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/bodyparam:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getBodyParam\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: test\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/PetSimple\\\"\\n\" +\n                \"              description: resource pet\\n\" +\n                \"              writeOnly: true\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/PetSimple\\\"\\n\" +\n                \"              description: resource pet xml\\n\" +\n                \"              writeOnly: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    PetSimple:\\n\" +\n                \"      description: Pet\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n\n    @Test\n    public void testSiblingsOnProperty() {\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).openAPI31(true));\n        Set<Class<?>> classes = new HashSet<>(Arrays.asList(SiblingPropResource.class, WebHookResource.class));\n        OpenAPI openAPI = reader.read(classes);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /pet:\\n\" +\n                \"    put:\\n\" +\n                \"      tags:\\n\" +\n                \"      - pet\\n\" +\n                \"      summary: Update an existing pet\\n\" +\n                \"      operationId: updatePet\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Pet object that needs to be updated in the store\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"              description: A Pet in JSON Format\\n\" +\n                \"              required:\\n\" +\n                \"              - id\\n\" +\n                \"              writeOnly: true\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"              description: A Pet in XML Format\\n\" +\n                \"              required:\\n\" +\n                \"              - id\\n\" +\n                \"              writeOnly: true\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: Successful operation\\n\" +\n                \"          content:\\n\" +\n                \"            application/xml:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"                description: A Pet in XML Format\\n\" +\n                \"                readOnly: true\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"                description: A Pet in JSON Format\\n\" +\n                \"                readOnly: true\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Invalid ID supplied\\n\" +\n                \"        \\\"404\\\":\\n\" +\n                \"          description: Pet not found\\n\" +\n                \"        \\\"405\\\":\\n\" +\n                \"          description: Validation exception\\n\" +\n                \"      security:\\n\" +\n                \"      - petstore_auth:\\n\" +\n                \"        - write:pets\\n\" +\n                \"        - read:pets\\n\" +\n                \"      - mutual_tls: []\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Category:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: parent\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"    Pet:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: Pet\\n\" +\n                \"      properties:\\n\" +\n                \"        category:\\n\" +\n                \"          $ref: \\\"#/components/schemas/Category\\\"\\n\" +\n                \"          description: child\\n\" +\n                \"webhooks:\\n\" +\n                \"  newPet:\\n\" +\n                \"    post:\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Information about a new pet in the system\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"              description: Webhook Pet\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: Return a 200 status to indicate that the data was received\\n\" +\n                \"            successfully\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n\n    @Test\n    public void testMisc31() {\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).openAPI31(true));\n        Set<Class<?>> classes = new HashSet<>(Arrays.asList(Misc31Resource.class));\n        OpenAPI openAPI = reader.read(classes);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /pet:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: updatePet\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/ModelWithOAS31Stuff\\\"\\n\" +\n                \"            application/xml:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/ModelWithOAS31Stuff\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    ModelWithOAS31Stuff:\\n\" +\n                \"      type: object\\n\" +\n                \"      $comment: Random comment at schema level\\n\" +\n                \"      $id: http://yourdomain.com/schemas/myschema.json\\n\" +\n                \"      description: this is model for testing OAS 3.1 resolving\\n\" +\n                \"      properties:\\n\" +\n                \"        randomList:\\n\" +\n                \"          type: array\\n\" +\n                \"          contains:\\n\" +\n                \"            type: string\\n\" +\n                \"          items:\\n\" +\n                \"            type: string\\n\" +\n                \"          maxContains: 10\\n\" +\n                \"          minContains: 1\\n\" +\n                \"          prefixItems:\\n\" +\n                \"          - type: string\\n\" +\n                \"          unevaluatedItems:\\n\" +\n                \"            type: number\\n\" +\n                \"        status:\\n\" +\n                \"          type:\\n\" +\n                \"          - string\\n\" +\n                \"          - number\\n\" +\n                \"        intValue:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"          $anchor: intValue\\n\" +\n                \"          $comment: comment at schema property level\\n\" +\n                \"          exclusiveMaximum: 100\\n\" +\n                \"          exclusiveMinimum: 1\\n\" +\n                \"        text:\\n\" +\n                \"          type: string\\n\" +\n                \"          contentEncoding: plan/text\\n\" +\n                \"          contentMediaType: base64\\n\" +\n                \"        encodedString:\\n\" +\n                \"          type: string\\n\" +\n                \"          contentMediaType: application/jwt\\n\" +\n                \"          contentSchema:\\n\" +\n                \"            $ref: \\\"#/components/schemas/MultipleBaseBean\\\"\\n\" +\n                \"        address:\\n\" +\n                \"          $ref: \\\"#/components/schemas/Address\\\"\\n\" +\n                \"        client:\\n\" +\n                \"          type: string\\n\" +\n                \"          dependentSchemas:\\n\" +\n                \"            creditCard:\\n\" +\n                \"              $ref: \\\"#/components/schemas/CreditCard\\\"\\n\" +\n                \"    MultipleBaseBean:\\n\" +\n                \"      type: object\\n\" +\n                \"      description: MultipleBaseBean\\n\" +\n                \"      properties:\\n\" +\n                \"        beanType:\\n\" +\n                \"          type: string\\n\" +\n                \"        a:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        b:\\n\" +\n                \"          type: string\\n\" +\n                \"    MultipleSub1Bean:\\n\" +\n                \"      allOf:\\n\" +\n                \"      - $ref: \\\"#/components/schemas/MultipleBaseBean\\\"\\n\" +\n                \"      - type: object\\n\" +\n                \"        properties:\\n\" +\n                \"          c:\\n\" +\n                \"            type: integer\\n\" +\n                \"            format: int32\\n\" +\n                \"      description: MultipleSub1Bean\\n\" +\n                \"    MultipleSub2Bean:\\n\" +\n                \"      allOf:\\n\" +\n                \"      - $ref: \\\"#/components/schemas/MultipleBaseBean\\\"\\n\" +\n                \"      - type: object\\n\" +\n                \"        properties:\\n\" +\n                \"          d:\\n\" +\n                \"            type: integer\\n\" +\n                \"            format: int32\\n\" +\n                \"      description: MultipleSub2Bean\\n\" +\n                \"    Address:\\n\" +\n                \"      type: object\\n\" +\n                \"      if:\\n\" +\n                \"        $ref: \\\"#/components/schemas/AnnotatedCountry\\\"\\n\" +\n                \"      then:\\n\" +\n                \"        $ref: \\\"#/components/schemas/PostalCodeNumberPattern\\\"\\n\" +\n                \"      else:\\n\" +\n                \"        $ref: \\\"#/components/schemas/PostalCodePattern\\\"\\n\" +\n                \"      dependentRequired:\\n\" +\n                \"        street:\\n\" +\n                \"        - country\\n\" +\n                \"      properties:\\n\" +\n                \"        street:\\n\" +\n                \"          type: string\\n\" +\n                \"        country:\\n\" +\n                \"          type: string\\n\" +\n                \"          enum:\\n\" +\n                \"          - United States of America\\n\" +\n                \"          - Canada\\n\" +\n                \"      propertyNames:\\n\" +\n                \"        pattern: \\\"^[A-Za-z_][A-Za-z0-9_]*$\\\"\\n\" +\n                \"    AnnotatedCountry:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        country:\\n\" +\n                \"          type: object\\n\" +\n                \"          const: United States\\n\" +\n                \"    CreditCard:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        billingAddress:\\n\" +\n                \"          type: string\\n\" +\n                \"    PostalCodeNumberPattern:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        postalCode:\\n\" +\n                \"          type: object\\n\" +\n                \"          pattern: \\\"[0-9]{5}(-[0-9]{4})?\\\"\\n\" +\n                \"    PostalCodePattern:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        postalCode:\\n\" +\n                \"          type: object\\n\" +\n                \"          pattern: \\\"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]\\\"\\n\" +\n                \"    PropertyNamesPattern:\\n\" +\n                \"      pattern: \\\"^[A-Za-z_][A-Za-z0-9_]*$\\\"\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n\n    @Test\n    public void test4446CyclicProp() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Ticket4446Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/test:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getCart\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/MyPojo\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    MyPojo:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        someStrings:\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: string\\n\" +\n                \"        morePojos:\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            $ref: \\\"#/components/schemas/MyPojo\\\"\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test\n    public void testParameterMaximumValue() {\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).openAPI31(true));\n\n        OpenAPI openAPI = reader.read(ParameterMaximumValueResource.class);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test/{petId}:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getPetById\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: petId\\n\" +\n                \"        in: path\\n\" +\n                \"        description: ID of pet that needs to be fetched\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"          exclusiveMaximum: 10\\n\" +\n                \"          exclusiveMinimum: 1\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n\n    @Test\n    public void test4483Response() {\n        Reader reader = new Reader(new OpenAPI());\n\n        OpenAPI openAPI = reader.read(Ticket4483Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"tags:\\n\" +\n                \"- name: Dummy\\n\" +\n                \"  description: Dummy resource for testing setup\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    get:\\n\" +\n                \"      tags:\\n\" +\n                \"      - Dummy\\n\" +\n                \"      description: Dummy GET\\n\" +\n                \"      operationId: dummy\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"401\\\":\\n\" +\n                \"          description: Authentication is required\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: array\\n\" +\n                \"                items:\\n\" +\n                \"                  $ref: \\\"#/components/schemas/LocalizedError\\\"\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: test\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: object\\n\" +\n                \"                additionalProperties:\\n\" +\n                \"                  type: boolean\\n\" +\n                \"  /test/opresp:\\n\" +\n                \"    get:\\n\" +\n                \"      tags:\\n\" +\n                \"      - Dummy\\n\" +\n                \"      operationId: dummyopresp\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"401\\\":\\n\" +\n                \"          description: Authentication is required\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: array\\n\" +\n                \"                items:\\n\" +\n                \"                  $ref: \\\"#/components/schemas/LocalizedError\\\"\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: Dummy GET opresp\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: object\\n\" +\n                \"                additionalProperties:\\n\" +\n                \"                  type: boolean\\n\" +\n                \"  /test/oprespnodesc:\\n\" +\n                \"    get:\\n\" +\n                \"      tags:\\n\" +\n                \"      - Dummy\\n\" +\n                \"      operationId: oprespnodesc\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"401\\\":\\n\" +\n                \"          description: Authentication is required\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: array\\n\" +\n                \"                items:\\n\" +\n                \"                  $ref: \\\"#/components/schemas/LocalizedError\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    LocalizedError:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        code:\\n\" +\n                \"          type: string\\n\" +\n                \"        message:\\n\" +\n                \"          type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"openAPIVersion\")\n    public void testOpenAPIVersion() {\n        SwaggerConfiguration config = new SwaggerConfiguration().openAPIVersion(\"3.0.4\");\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(DefaultResponseResource.class);\n        String yaml = \"openapi: 3.0.4\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: test\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    @Test(description = \"Constraints annotations with groups - Inline\")\n    public void testTicket4804Inline() {\n        ModelConverters.reset();\n        SwaggerConfiguration config = new SwaggerConfiguration().schemaResolution(Schema.SchemaResolution.INLINE);\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(Ticket4804Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/barcart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: barCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              required:\\n\" +\n                \"              - notNullcartDetails\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                pageSize:\\n\" +\n                \"                  type: integer\\n\" +\n                \"                  format: int32\\n\" +\n                \"                cartDetails:\\n\" +\n                \"                  required:\\n\" +\n                \"                  - description\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"                notNullcartDetails:\\n\" +\n                \"                  required:\\n\" +\n                \"                  - description\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/foocart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: fooCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              required:\\n\" +\n                \"              - cartDetails\\n\" +\n                \"              - notNullcartDetails\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                pageSize:\\n\" +\n                \"                  type: integer\\n\" +\n                \"                  format: int32\\n\" +\n                \"                cartDetails:\\n\" +\n                \"                  required:\\n\" +\n                \"                  - description\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"                notNullcartDetails:\\n\" +\n                \"                  required:\\n\" +\n                \"                  - description\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/createcart:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: postCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              required:\\n\" +\n                \"              - notNullcartDetails\\n\" +\n                \"              - pageSize\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                pageSize:\\n\" +\n                \"                  type: integer\\n\" +\n                \"                  format: int32\\n\" +\n                \"                cartDetails:\\n\" +\n                \"                  required:\\n\" +\n                \"                  - description\\n\" +\n                \"                  - name\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"                notNullcartDetails:\\n\" +\n                \"                  required:\\n\" +\n                \"                  - description\\n\" +\n                \"                  - name\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/updatecart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: putCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              required:\\n\" +\n                \"              - notNullcartDetails\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                pageSize:\\n\" +\n                \"                  type: integer\\n\" +\n                \"                  format: int32\\n\" +\n                \"                cartDetails:\\n\" +\n                \"                  required:\\n\" +\n                \"                  - description\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"                notNullcartDetails:\\n\" +\n                \"                  required:\\n\" +\n                \"                  - description\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Cart:\\n\" +\n                \"      required:\\n\" +\n                \"      - notNullcartDetails\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        pageSize:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        cartDetails:\\n\" +\n                \"          required:\\n\" +\n                \"          - description\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            name:\\n\" +\n                \"              type: string\\n\" +\n                \"            description:\\n\" +\n                \"              type: string\\n\" +\n                \"        notNullcartDetails:\\n\" +\n                \"          required:\\n\" +\n                \"          - description\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            name:\\n\" +\n                \"              type: string\\n\" +\n                \"            description:\\n\" +\n                \"              type: string\\n\" +\n                \"    CartDetails:\\n\" +\n                \"      required:\\n\" +\n                \"      - description\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        description:\\n\" +\n                \"          type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test(description = \"Constraints annotations with groups - Default\")\n    public void testTicket4804Default() {\n        ModelConverters.reset();\n        SwaggerConfiguration config = new SwaggerConfiguration();\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(Ticket4804Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/barcart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: barCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/foocart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: fooCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/createcart:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: postCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/updatecart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: putCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Cart:\\n\" +\n                \"      required:\\n\" +\n                \"      - notNullcartDetails\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        pageSize:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        cartDetails:\\n\" +\n                \"          $ref: \\\"#/components/schemas/CartDetails\\\"\\n\" +\n                \"        notNullcartDetails:\\n\" +\n                \"          $ref: \\\"#/components/schemas/CartDetails\\\"\\n\" +\n                \"    CartDetails:\\n\" +\n                \"      required:\\n\" +\n                \"      - description\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        description:\\n\" +\n                \"          type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test(description = \"Constraints annotations with groups - Default NotBlank\")\n    public void testTicket4804DefaultNotBlank() {\n        ModelConverters.reset();\n        SwaggerConfiguration config = new SwaggerConfiguration();\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(Ticket4804NotBlankResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/barcart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: barCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/createcart:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: postCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/updatecart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: putCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Cart:\\n\" +\n                \"      required:\\n\" +\n                \"      - notNullcartDetails\\n\" +\n                \"      - pageSizes\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        pageSizes:\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: integer\\n\" +\n                \"            format: int32\\n\" +\n                \"        notNullcartDetails:\\n\" +\n                \"          $ref: \\\"#/components/schemas/CartDetails\\\"\\n\" +\n                \"    CartDetails:\\n\" +\n                \"      required:\\n\" +\n                \"      - description\\n\" +\n                \"      - name\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          minLength: 1\\n\" +\n                \"          type: string\\n\" +\n                \"        description:\\n\" +\n                \"          minItems: 1\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test(description = \"Constraints annotations with groups - Always\")\n    public void testTicket4804Always() {\n        ModelConverters.reset();\n        SwaggerConfiguration config = new SwaggerConfiguration().groupsValidationStrategy(Configuration.GroupsValidationStrategy.ALWAYS);\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(Ticket4804Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/barcart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: barCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/foocart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: fooCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/createcart:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: postCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/updatecart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: putCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Cart:\\n\" +\n                \"      required:\\n\" +\n                \"      - cartDetails\\n\" +\n                \"      - notNullcartDetails\\n\" +\n                \"      - pageSize\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        pageSize:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        cartDetails:\\n\" +\n                \"          $ref: \\\"#/components/schemas/CartDetails\\\"\\n\" +\n                \"        notNullcartDetails:\\n\" +\n                \"          $ref: \\\"#/components/schemas/CartDetails\\\"\\n\" +\n                \"    CartDetails:\\n\" +\n                \"      required:\\n\" +\n                \"      - description\\n\" +\n                \"      - name\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        description:\\n\" +\n                \"          type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test(description = \"Constraints annotations with groups - Never\")\n    public void testTicket4804Never() {\n        ModelConverters.reset();\n        SwaggerConfiguration config = new SwaggerConfiguration().groupsValidationStrategy(Configuration.GroupsValidationStrategy.NEVER);\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(Ticket4804Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/barcart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: barCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/foocart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: fooCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/createcart:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: postCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/updatecart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: putCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Cart\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Cart:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        pageSize:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        cartDetails:\\n\" +\n                \"          $ref: \\\"#/components/schemas/CartDetails\\\"\\n\" +\n                \"        notNullcartDetails:\\n\" +\n                \"          $ref: \\\"#/components/schemas/CartDetails\\\"\\n\" +\n                \"    CartDetails:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        description:\\n\" +\n                \"          type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test(description = \"Constraints annotations with groups - NeverNoContext\")\n    public void testTicket4804NeverNoContext() {\n        ModelConverters.reset();\n        SwaggerConfiguration config =\n                new SwaggerConfiguration()\n                        .groupsValidationStrategy(Configuration.GroupsValidationStrategy.NEVER_IF_NO_CONTEXT)\n                        .schemaResolution(Schema.SchemaResolution.INLINE);\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(Ticket4804Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/barcart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: barCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                pageSize:\\n\" +\n                \"                  type: integer\\n\" +\n                \"                  format: int32\\n\" +\n                \"                cartDetails:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"                notNullcartDetails:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/foocart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: fooCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              required:\\n\" +\n                \"              - cartDetails\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                pageSize:\\n\" +\n                \"                  type: integer\\n\" +\n                \"                  format: int32\\n\" +\n                \"                cartDetails:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"                notNullcartDetails:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/createcart:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: postCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              required:\\n\" +\n                \"              - pageSize\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                pageSize:\\n\" +\n                \"                  type: integer\\n\" +\n                \"                  format: int32\\n\" +\n                \"                cartDetails:\\n\" +\n                \"                  required:\\n\" +\n                \"                  - name\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"                notNullcartDetails:\\n\" +\n                \"                  required:\\n\" +\n                \"                  - name\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/updatecart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: putCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                pageSize:\\n\" +\n                \"                  type: integer\\n\" +\n                \"                  format: int32\\n\" +\n                \"                cartDetails:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"                notNullcartDetails:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Cart:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        pageSize:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        cartDetails:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            name:\\n\" +\n                \"              type: string\\n\" +\n                \"            description:\\n\" +\n                \"              type: string\\n\" +\n                \"        notNullcartDetails:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            name:\\n\" +\n                \"              type: string\\n\" +\n                \"            description:\\n\" +\n                \"              type: string\\n\" +\n                \"    CartDetails:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        description:\\n\" +\n                \"          type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test(description = \"Constraints annotations with groups - Processor\")\n    public void testTicket4804Processor() {\n        ModelConverters.reset();\n        SwaggerConfiguration config =\n                new SwaggerConfiguration()\n                        .validatorProcessorClass(Ticket4804ProcessorResource.CustomValidatorProcessor.class.getName())\n                        .schemaResolution(Schema.SchemaResolution.INLINE);\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(Ticket4804ProcessorResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/barcart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: barCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                pageSize:\\n\" +\n                \"                  type: integer\\n\" +\n                \"                  format: int32\\n\" +\n                \"                cartDetails:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"                notNullcartDetails:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/foocart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: fooCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                pageSize:\\n\" +\n                \"                  type: integer\\n\" +\n                \"                  format: int32\\n\" +\n                \"                cartDetails:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"                notNullcartDetails:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/createcart:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: postCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                pageSize:\\n\" +\n                \"                  type: integer\\n\" +\n                \"                  format: int32\\n\" +\n                \"                cartDetails:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"                notNullcartDetails:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/updatecart:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: putCart\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              required:\\n\" +\n                \"              - cartDetails\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                pageSize:\\n\" +\n                \"                  type: integer\\n\" +\n                \"                  format: int32\\n\" +\n                \"                cartDetails:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"                notNullcartDetails:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    name:\\n\" +\n                \"                      type: string\\n\" +\n                \"                    description:\\n\" +\n                \"                      type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Cart:\\n\" +\n                \"      required:\\n\" +\n                \"      - cartDetails\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        pageSize:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"        cartDetails:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            name:\\n\" +\n                \"              type: string\\n\" +\n                \"            description:\\n\" +\n                \"              type: string\\n\" +\n                \"        notNullcartDetails:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            name:\\n\" +\n                \"              type: string\\n\" +\n                \"            description:\\n\" +\n                \"              type: string\\n\" +\n                \"    CartDetails:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        description:\\n\" +\n                \"          type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test\n    public void shouldIncludeOnlyNonGroupedJakartaValidatedFieldsAsMandatoryByDefault() {\n        ModelConverters.reset();\n        ResolvedSchema schema = ModelConverters.getInstance(false).resolveAsResolvedSchema(new AnnotatedType().type(Ticket4804CustomClass.class));\n        String expectedYaml = \"schema:\\n\" +\n                \"  required:\\n\" +\n                \"  - nonGroupValidatedField\\n\" +\n                \"  type: object\\n\" +\n                \"  properties:\\n\" +\n                \"    nonGroupValidatedField:\\n\" +\n                \"      type: string\\n\" +\n                \"    singleGroupValidatedField:\\n\" +\n                \"      type: integer\\n\" +\n                \"      format: int32\\n\" +\n                \"    multipleGroupValidatedField:\\n\" +\n                \"      type: number\\n\" +\n                \"    otherGroupValidatedField:\\n\" +\n                \"      type: string\\n\" +\n                \"    singleGroupValidatedField2:\\n\" +\n                \"      type: string\\n\" +\n                \"referencedSchemas:\\n\" +\n                \"  Ticket4804CustomClass:\\n\" +\n                \"    required:\\n\" +\n                \"    - nonGroupValidatedField\\n\" +\n                \"    type: object\\n\" +\n                \"    properties:\\n\" +\n                \"      nonGroupValidatedField:\\n\" +\n                \"        type: string\\n\" +\n                \"      singleGroupValidatedField:\\n\" +\n                \"        type: integer\\n\" +\n                \"        format: int32\\n\" +\n                \"      multipleGroupValidatedField:\\n\" +\n                \"        type: number\\n\" +\n                \"      otherGroupValidatedField:\\n\" +\n                \"        type: string\\n\" +\n                \"      singleGroupValidatedField2:\\n\" +\n                \"        type: string\\n\";\n        SerializationMatchers.assertEqualsToYaml(schema, expectedYaml);\n        ModelConverters.reset();\n    }\n\n    @Test(description = \"test schema.minLength applied\")\n    public void testTicket4859() {\n        ModelConverters.reset();\n        SwaggerConfiguration config = new SwaggerConfiguration();\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(Ticket4859Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/minlength:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: minlength\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Minlength\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Minlength:\\n\" +\n                \"      required:\\n\" +\n                \"      - name\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          maxLength: 19\\n\" +\n                \"          minLength: 12\\n\" +\n                \"          type: string\\n\" +\n                \"          example: \\\"4242424242424242\\\"\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test(description = \"test default value type\")\n    public void testTicket4879() {\n        ModelConverters.reset();\n        SwaggerConfiguration config = new SwaggerConfiguration().openAPI31(true);\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(Ticket4879Resource.class);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test/test:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: test\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/DefaultClass\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/testDefaultValueAnnotation:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: testDefault\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: myBool\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: boolean\\n\" +\n                \"          default: true\\n\" +\n                \"      - name: myInt\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"          default: 1\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /test/testsize:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: testSize\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: array\\n\" +\n                \"              items:\\n\" +\n                \"                type: string\\n\" +\n                \"              maxItems: 100\\n\" +\n                \"              minItems: 1\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    DefaultClass:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        name:\\n\" +\n                \"          type: boolean\\n\" +\n                \"          default: true\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test(description = \"test explode FALSE\")\n    public void testTicket4065() {\n        ModelConverters.reset();\n        SwaggerConfiguration config = new SwaggerConfiguration();\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(Ticket4065Resource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /bar:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: test\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: blub\\n\" +\n                \"        in: query\\n\" +\n                \"        explode: false\\n\" +\n                \"        schema:\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: integer\\n\" +\n                \"            format: int64\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json: {}\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test(description = \"Extensions Tests OAS 3.1\")\n    public void testExtensionsOAS31() {\n        SwaggerConfiguration config = new SwaggerConfiguration().openAPI31(true);\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(Ticket4850Resource.class);\n        assertNotNull(openAPI);\n\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /bar:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: test\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/ExtensionsResource\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    ExtensionsResource:\\n\" +\n                \"      description: ExtensionsResource\\n\" +\n                \"      x-user:\\n\" +\n                \"        name: Josh\\n\" +\n                \"      user-extensions:\\n\" +\n                \"        lastName: Hart\\n\" +\n                \"        address: House\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n    @Test(description = \"Test model resolution for global path parameters with openAPI 3.1\")\n    public void testTicket4878() {\n        ModelConverters.reset();\n        SwaggerConfiguration config = new SwaggerConfiguration().openAPI31(true);\n        Reader reader = new Reader(config);\n\n        OpenAPI openAPI = reader.read(Ticket4878Resource.class);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /{globalPathParam}/{localPathParam}:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getMethod\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: globalPathParam\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"          $comment: 3.1 property for global path param\\n\" +\n                \"      - name: localPathParam\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"          $comment: 3.1 property for local path param\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test(description = \"Test model resolution for global path parameters with openAPI 3.1\")\n    public void testTicket4907() {\n        ModelConverters.reset();\n\n        // openAPI31 true and no other config\n        SwaggerConfiguration config = new SwaggerConfiguration().openAPI31(true);\n        Reader reader = new Reader(config);\n        OpenAPI openAPI = reader.read(Ticket4878Resource.class);\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /{globalPathParam}/{localPathParam}:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getMethod\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: globalPathParam\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"          $comment: 3.1 property for global path param\\n\" +\n                \"      - name: localPathParam\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"          $comment: 3.1 property for local path param\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n\n        // openAPI31 true and openAPI set\n        config.setOpenAPI(new OpenAPI().openapi(\"3.1.1\"));\n        reader = new Reader(config);\n        openAPI = reader.read(Ticket4878Resource.class);\n        yaml = \"openapi: 3.1.1\\n\" +\n                \"paths:\\n\" +\n                \"  /{globalPathParam}/{localPathParam}:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getMethod\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: globalPathParam\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"          $comment: 3.1 property for global path param\\n\" +\n                \"      - name: localPathParam\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"          $comment: 3.1 property for local path param\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n\n        // openAPI31 true and openAPIVersion set\n        config.setOpenAPI(null);\n        config.setOpenAPIVersion(\"3.1.1\");\n        reader = new Reader(config);\n        openAPI = reader.read(Ticket4878Resource.class);\n        yaml = \"openapi: 3.1.1\\n\" +\n                \"paths:\\n\" +\n                \"  /{globalPathParam}/{localPathParam}:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getMethod\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: globalPathParam\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"          $comment: 3.1 property for global path param\\n\" +\n                \"      - name: localPathParam\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"          $comment: 3.1 property for local path param\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n        ModelConverters.reset();\n    }\n\n    @Test(description = \"array property metadata is resolved from ArraySchema.arraySchema, items metadata from ArraySchema.schema\")\n    public void test4341ArraySchemaOtherAttributes() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(Ticket4341Resource.class);\n        System.out.println(Json.pretty(openAPI));\n\n        Schema userSchema = openAPI.getComponents().getSchemas().get(\"User\");\n        assertNotNull(userSchema, \"User schema should be present\");\n\n        @SuppressWarnings(\"unchecked\")\n        Map<String, Schema> properties = userSchema.getProperties();\n        assertNotNull(properties, \"User properties should not be null\");\n\n        Schema metadataArray = properties.get(\"metadataArray\");\n        assertNotNull(metadataArray, \"metadataArray property should be present\");\n        assertTrue(metadataArray instanceof ArraySchema, \"metadataArray should be an ArraySchema\");\n\n        // Property-level assertions\n        assertEquals(\n                metadataArray.getDescription(),\n                \"array-level description\",\n                \"Array property description should come from arraySchema, not items schema\"\n        );\n\n        assertEquals(\n                metadataArray.getDeprecated(),\n                Boolean.TRUE,\n                \"Array property deprecated should come from arraySchema\"\n        );\n\n        assertEquals(\n                metadataArray.getReadOnly(),\n                Boolean.TRUE,\n                \"Array property readOnly should be true from arraySchema.accessMode=READ_ONLY\"\n        );\n        assertNotEquals(\n                metadataArray.getWriteOnly(),\n                Boolean.TRUE,\n                \"Array property writeOnly should not be true when accessMode=READ_ONLY\"\n        );\n\n        // Item-level assertions\n\n        ArraySchema metadataArraySchema = (ArraySchema) metadataArray;\n        Schema items = metadataArraySchema.getItems();\n        assertNotNull(items, \"Items schema should not be null\");\n\n        assertEquals(\n                items.getDescription(),\n                \"item-level description\",\n                \"Items description should come from schema element of @ArraySchema\"\n        );\n\n        assertNotEquals(\n                items.getDeprecated(),\n                Boolean.TRUE,\n                \"Items deprecated should not be true when schema.deprecated=false\"\n        );\n\n        assertEquals(\n                items.getWriteOnly(),\n                Boolean.TRUE,\n                \"Items writeOnly should be true from schema.accessMode=WRITE_ONLY\"\n        );\n        assertNotEquals(\n                items.getReadOnly(),\n                Boolean.TRUE,\n                \"Items readOnly should not be true when accessMode=WRITE_ONLY\"\n        );\n\n        assertEquals(\n                items.getFormat(),\n                \"email\",\n                \"Items format should come from schema.format\"\n        );\n    }\n\n    @Test\n    void testTicket5017() {\n        ModelResolver.enumsAsRef = true;\n        SwaggerConfiguration config = new SwaggerConfiguration().openAPI31(true);\n        Reader reader = new Reader(config);\n        OpenAPI openAPI = reader.read(Ticket5017Resource.class);\n\n        OpenAPISpecFilter filterImpl = new RemoveUnusedSchemasOAS31Filter();\n        SpecFilter f = new SpecFilter();\n        openAPI = f.filter(openAPI, filterImpl, null, null, null);\n\n        String yaml = \"openapi: 3.1.0\\n\" +\n                \"paths:\\n\" +\n                \"  /test:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: myMethod\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Example\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Example:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        myMap:\\n\" +\n                \"          type: object\\n\" +\n                \"          additionalProperties:\\n\" +\n                \"            type: string\\n\" +\n                \"          propertyNames:\\n\" +\n                \"            $ref: \\\"#/components/schemas/MyEnum\\\"\\n\" +\n                \"    MyEnum:\\n\" +\n                \"      type: string\\n\" +\n                \"      enum:\\n\" +\n                \"      - FOO\\n\" +\n                \"      - BAR\\n\";\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n\n    static class RemoveUnusedSchemasOAS31Filter extends AbstractSpecFilter {\n        @Override\n        public boolean isRemovingUnreferencedDefinitions() {\n            return true;\n        }\n\n        @Override\n        public boolean isOpenAPI31Filter() {\n            return true;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/SchemaResolutionAllOfRefTest.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.jaxrs2.matchers.SerializationMatchers;\nimport io.swagger.v3.jaxrs2.schemaResolution.SchemaResolutionResource;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class SchemaResolutionAllOfRefTest {\n\n    @Test\n    public void testSchemaResolutionAllOfRef() {\n        ModelConverters.reset();\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).schemaResolution(Schema.SchemaResolution.ALL_OF_REF));\n        OpenAPI openAPI = reader.read(SchemaResolutionResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/inlineSchemaFirst:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: inlineSchemaFirst\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/InlineSchemaFirst\\\"\\n\" +\n                \"  /test/inlineSchemaSecond:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: inlineSchemaSecond\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              description: InlineSchemaSecond API\\n\" +\n                \"              allOf:\\n\" +\n                \"              - $ref: \\\"#/components/schemas/InlineSchemaSecond\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/InlineSchemaSecond\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    InlineSchemaFirst:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        property1:\\n\" +\n                \"          description: InlineSchemaFirst property 1\\n\" +\n                \"          nullable: true\\n\" +\n                \"          allOf:\\n\" +\n                \"          - $ref: \\\"#/components/schemas/InlineSchemaPropertyFirst\\\"\\n\" +\n                \"        property2:\\n\" +\n                \"          description: ' InlineSchemaFirst property 2'\\n\" +\n                \"          example: example 2\\n\" +\n                \"          allOf:\\n\" +\n                \"          - $ref: \\\"#/components/schemas/InlineSchemaPropertyFirst\\\"\\n\" +\n                \"    InlineSchemaPropertyFirst:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: string\\n\" +\n                \"      description: property\\n\" +\n                \"      example: example\\n\" +\n                \"    InlineSchemaPropertySecond:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          $ref: \\\"#/components/schemas/InlineSchemaSimple\\\"\\n\" +\n                \"      description: propertysecond\\n\" +\n                \"      example: examplesecond\\n\" +\n                \"    InlineSchemaPropertySimple:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: string\\n\" +\n                \"      description: property\\n\" +\n                \"    InlineSchemaSecond:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        foo:\\n\" +\n                \"          type: string\\n\" +\n                \"        propertySecond1:\\n\" +\n                \"          description: InlineSchemaSecond property 1\\n\" +\n                \"          nullable: true\\n\" +\n                \"          allOf:\\n\" +\n                \"          - $ref: \\\"#/components/schemas/InlineSchemaPropertySecond\\\"\\n\" +\n                \"        property2:\\n\" +\n                \"          description: InlineSchemaSecond property 2\\n\" +\n                \"          example: InlineSchemaSecond example 2\\n\" +\n                \"          allOf:\\n\" +\n                \"          - $ref: \\\"#/components/schemas/InlineSchemaPropertyFirst\\\"\\n\" +\n                \"    InlineSchemaSimple:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        property1:\\n\" +\n                \"          description: property 1\\n\" +\n                \"          allOf:\\n\" +\n                \"          - $ref: \\\"#/components/schemas/InlineSchemaPropertySimple\\\"\\n\" +\n                \"        property2:\\n\" +\n                \"          description: property 2\\n\" +\n                \"          example: example\\n\" +\n                \"          allOf:\\n\" +\n                \"          - $ref: \\\"#/components/schemas/InlineSchemaPropertySimple\\\"\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/SchemaResolutionAllOfTest.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.jaxrs2.matchers.SerializationMatchers;\nimport io.swagger.v3.jaxrs2.schemaResolution.SchemaResolutionResourceSimple;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class SchemaResolutionAllOfTest {\n\n    @Test\n    public void testSchemaResolutionAllOf() {\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).schemaResolution(Schema.SchemaResolution.ALL_OF));\n        OpenAPI openAPI = reader.read(SchemaResolutionResourceSimple.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/inlineSchemaFirst:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: inlineSchemaFirst\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: InlineSchemaFirst Response API\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/InlineSchemaFirst\\\"\\n\" +\n                \"  /test/inlineSchemaSecond:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: inlineSchemaFirst_1\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              allOf:\\n\" +\n                \"              - description: InlineSchemaSecond API\\n\" +\n                \"              - $ref: \\\"#/components/schemas/InlineSchemaFirst\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    InlineSchemaFirst:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        property1:\\n\" +\n                \"          $ref: \\\"#/components/schemas/InlineSchemaPropertyFirst\\\"\\n\" +\n                \"    InlineSchemaPropertyFirst:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: string\\n\" +\n                \"      description: property\\n\" +\n                \"      nullable: true\\n\" +\n                \"      example: example\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/SchemaResolutionAnnotationTest.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.jaxrs2.matchers.SerializationMatchers;\nimport io.swagger.v3.jaxrs2.schemaResolution.SchemaResolutionAnnotatedResource;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.testng.annotations.Test;\n\npublic class SchemaResolutionAnnotationTest {\n\n    @Test\n    public void testSchemaResolutionAnnotation() {\n        ModelConverters.reset();\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()));\n        OpenAPI openAPI = reader.read(SchemaResolutionAnnotatedResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/inlineSchemaFirst:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: inlineSchemaFirst\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/InlineSchemaFirst\\\"\\n\" +\n                \"  /test/inlineSchemaSecond:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: inlineSchemaSecond\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                foo:\\n\" +\n                \"                  type: string\\n\" +\n                \"                propertySecond1:\\n\" +\n                \"                  $ref: \\\"#/components/schemas/InlineSchemaPropertySecond\\\"\\n\" +\n                \"                property2:\\n\" +\n                \"                  $ref: \\\"#/components/schemas/InlineSchemaPropertyFirst\\\"\\n\" +\n                \"              description: InlineSchemaSecond API\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/InlineSchemaSecond\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    InlineSchemaFirst:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        property1:\\n\" +\n                \"          description: InlineSchemaFirst property 1\\n\" +\n                \"          nullable: true\\n\" +\n                \"          allOf:\\n\" +\n                \"          - $ref: \\\"#/components/schemas/InlineSchemaPropertyFirst\\\"\\n\" +\n                \"        property2:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            bar:\\n\" +\n                \"              type: string\\n\" +\n                \"          description: property\\n\" +\n                \"          example: example\\n\" +\n                \"    InlineSchemaPropertyFirst:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: string\\n\" +\n                \"      description: property\\n\" +\n                \"      example: example\\n\" +\n                \"    InlineSchemaPropertySecond:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          $ref: \\\"#/components/schemas/InlineSchemaSimple\\\"\\n\" +\n                \"      description: propertysecond\\n\" +\n                \"      nullable: true\\n\" +\n                \"      example: examplesecond\\n\" +\n                \"    InlineSchemaPropertySimple:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: string\\n\" +\n                \"      description: property\\n\" +\n                \"    InlineSchemaSecond:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        foo:\\n\" +\n                \"          type: string\\n\" +\n                \"        propertySecond1:\\n\" +\n                \"          $ref: \\\"#/components/schemas/InlineSchemaPropertySecond\\\"\\n\" +\n                \"        property2:\\n\" +\n                \"          $ref: \\\"#/components/schemas/InlineSchemaPropertyFirst\\\"\\n\" +\n                \"      description: InlineSchemaSecond API\\n\" +\n                \"    InlineSchemaSimple:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        property1:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            bar:\\n\" +\n                \"              type: string\\n\" +\n                \"          description: property\\n\" +\n                \"        property2:\\n\" +\n                \"          description: property 2\\n\" +\n                \"          example: example\\n\" +\n                \"          allOf:\\n\" +\n                \"          - $ref: \\\"#/components/schemas/InlineSchemaPropertySimple\\\"\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/SchemaResolutionInlineTest.java",
    "content": "package io.swagger.v3.jaxrs2;\n\nimport io.swagger.v3.core.converter.ModelConverters;\nimport io.swagger.v3.jaxrs2.matchers.SerializationMatchers;\nimport io.swagger.v3.jaxrs2.schemaResolution.SchemaResolutionResource;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.Test;\n\npublic class SchemaResolutionInlineTest {\n    @Test\n    public void testSchemaResolutionInline() {\n        ModelConverters.reset();\n        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).schemaResolution(Schema.SchemaResolution.INLINE));\n        OpenAPI openAPI = reader.read(SchemaResolutionResource.class);\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /test/inlineSchemaFirst:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: inlineSchemaFirst\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: object\\n\" +\n                \"                properties:\\n\" +\n                \"                  property1:\\n\" +\n                \"                    type: object\\n\" +\n                \"                    properties:\\n\" +\n                \"                      bar:\\n\" +\n                \"                        type: string\\n\" +\n                \"                    description: InlineSchemaFirst property 1\\n\" +\n                \"                    nullable: true\\n\" +\n                \"                    example: example\\n\" +\n                \"                  property2:\\n\" +\n                \"                    type: object\\n\" +\n                \"                    properties:\\n\" +\n                \"                      bar:\\n\" +\n                \"                        type: string\\n\" +\n                \"                    description: ' InlineSchemaFirst property 2'\\n\" +\n                \"                    example: example 2\\n\" +\n                \"  /test/inlineSchemaSecond:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: inlineSchemaSecond\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                foo:\\n\" +\n                \"                  type: string\\n\" +\n                \"                propertySecond1:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    bar:\\n\" +\n                \"                      type: object\\n\" +\n                \"                      properties:\\n\" +\n                \"                        property1:\\n\" +\n                \"                          type: object\\n\" +\n                \"                          properties:\\n\" +\n                \"                            bar:\\n\" +\n                \"                              type: string\\n\" +\n                \"                          description: property 1\\n\" +\n                \"                        property2:\\n\" +\n                \"                          type: object\\n\" +\n                \"                          properties:\\n\" +\n                \"                            bar:\\n\" +\n                \"                              type: string\\n\" +\n                \"                          description: property 2\\n\" +\n                \"                          example: example\\n\" +\n                \"                  description: InlineSchemaSecond property 1\\n\" +\n                \"                  nullable: true\\n\" +\n                \"                  example: examplesecond\\n\" +\n                \"                property2:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    bar:\\n\" +\n                \"                      type: string\\n\" +\n                \"                  description: InlineSchemaSecond property 2\\n\" +\n                \"                  example: InlineSchemaSecond example 2\\n\" +\n                \"              description: InlineSchemaSecond API\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: object\\n\" +\n                \"                properties:\\n\" +\n                \"                  foo:\\n\" +\n                \"                    type: string\\n\" +\n                \"                  propertySecond1:\\n\" +\n                \"                    type: object\\n\" +\n                \"                    properties:\\n\" +\n                \"                      bar:\\n\" +\n                \"                        type: object\\n\" +\n                \"                        properties:\\n\" +\n                \"                          property1:\\n\" +\n                \"                            type: object\\n\" +\n                \"                            properties:\\n\" +\n                \"                              bar:\\n\" +\n                \"                                type: string\\n\" +\n                \"                            description: property 1\\n\" +\n                \"                          property2:\\n\" +\n                \"                            type: object\\n\" +\n                \"                            properties:\\n\" +\n                \"                              bar:\\n\" +\n                \"                                type: string\\n\" +\n                \"                            description: property 2\\n\" +\n                \"                            example: example\\n\" +\n                \"                    description: InlineSchemaSecond property 1\\n\" +\n                \"                    nullable: true\\n\" +\n                \"                    example: examplesecond\\n\" +\n                \"                  property2:\\n\" +\n                \"                    type: object\\n\" +\n                \"                    properties:\\n\" +\n                \"                      bar:\\n\" +\n                \"                        type: string\\n\" +\n                \"                    description: InlineSchemaSecond property 2\\n\" +\n                \"                    example: InlineSchemaSecond example 2\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    InlineSchemaFirst:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        property1:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            bar:\\n\" +\n                \"              type: string\\n\" +\n                \"          description: InlineSchemaFirst property 1\\n\" +\n                \"          nullable: true\\n\" +\n                \"          example: example\\n\" +\n                \"        property2:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            bar:\\n\" +\n                \"              type: string\\n\" +\n                \"          description: ' InlineSchemaFirst property 2'\\n\" +\n                \"          example: example 2\\n\" +\n                \"    InlineSchemaPropertyFirst:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: string\\n\" +\n                \"      description: property\\n\" +\n                \"      example: example\\n\" +\n                \"    InlineSchemaPropertySecond:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            property1:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                bar:\\n\" +\n                \"                  type: string\\n\" +\n                \"              description: property 1\\n\" +\n                \"            property2:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                bar:\\n\" +\n                \"                  type: string\\n\" +\n                \"              description: property 2\\n\" +\n                \"              example: example\\n\" +\n                \"      description: propertysecond\\n\" +\n                \"      nullable: true\\n\" +\n                \"      example: examplesecond\\n\" +\n                \"    InlineSchemaPropertySimple:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        bar:\\n\" +\n                \"          type: string\\n\" +\n                \"      description: property\\n\" +\n                \"      example: example\\n\" +\n                \"    InlineSchemaSecond:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        foo:\\n\" +\n                \"          type: string\\n\" +\n                \"        propertySecond1:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            bar:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                property1:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    bar:\\n\" +\n                \"                      type: string\\n\" +\n                \"                  description: property 1\\n\" +\n                \"                property2:\\n\" +\n                \"                  type: object\\n\" +\n                \"                  properties:\\n\" +\n                \"                    bar:\\n\" +\n                \"                      type: string\\n\" +\n                \"                  description: property 2\\n\" +\n                \"                  example: example\\n\" +\n                \"          description: InlineSchemaSecond property 1\\n\" +\n                \"          nullable: true\\n\" +\n                \"          example: examplesecond\\n\" +\n                \"        property2:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            bar:\\n\" +\n                \"              type: string\\n\" +\n                \"          description: InlineSchemaSecond property 2\\n\" +\n                \"          example: InlineSchemaSecond example 2\\n\" +\n                \"      description: InlineSchemaSecond API\\n\" +\n                \"    InlineSchemaSimple:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        property1:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            bar:\\n\" +\n                \"              type: string\\n\" +\n                \"          description: property 1\\n\" +\n                \"        property2:\\n\" +\n                \"          type: object\\n\" +\n                \"          properties:\\n\" +\n                \"            bar:\\n\" +\n                \"              type: string\\n\" +\n                \"          description: property 2\\n\" +\n                \"          example: example\\n\\n\";\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n        ModelConverters.reset();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/AbstractAnnotationTest.java",
    "content": "package io.swagger.v3.jaxrs2.annotations;\n\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.jaxrs2.Reader;\nimport io.swagger.v3.jaxrs2.matchers.SerializationMatchers;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.apache.commons.io.IOUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.nio.charset.StandardCharsets;\n\nimport static org.testng.Assert.fail;\n\npublic abstract class AbstractAnnotationTest {\n    private static final Logger LOGGER = LoggerFactory.getLogger(AbstractAnnotationTest.class);\n\n    public String readIntoYaml(final Class<?> cls) {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(cls);\n\n        try {\n            Yaml.mapper().setSerializationInclusion(JsonInclude.Include.NON_NULL);\n            // parse JSON\n            JsonNode jsonNodeTree = Yaml.mapper().readTree(Yaml.mapper().writeValueAsString(openAPI));\n            // return it as YAML\n            return Yaml.mapper().writeValueAsString(jsonNodeTree);\n        } catch (Exception e) {\n            return \"Empty YAML\";\n        }\n    }\n\n    public void compareToYamlFile(final Class<?> cls, String source){\n\n        final String file = source + cls.getSimpleName() + \".yaml\";\n            try {\n            compareAsYaml(cls, getOpenAPIAsString(file));\n        } catch (IOException e) {\n            LOGGER.error(\"Failed to compare class {} with YAML resource {}\", cls.getName(), file, e);\n            fail();\n        }\n    }\n\n    public void compareAsYaml(final Class<?> cls, final String yaml) throws IOException {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(cls);\n        SerializationMatchers.assertEqualsToYaml(openAPI, yaml);\n    }\n\n    public void compareAsYaml(final String actualYaml, final String expectedYaml) throws IOException {\n        SerializationMatchers.assertEqualsToYaml(Yaml.mapper().readValue(actualYaml, OpenAPI.class), expectedYaml);\n    }\n\n    public void compareAsJson(final String actualJson, final String expectedJson) throws IOException {\n        SerializationMatchers.assertEqualsToJson(Yaml.mapper().readValue(actualJson, OpenAPI.class), expectedJson);\n    }\n\n    protected String getOpenAPIAsString(final String file) throws IOException {\n        InputStream in = null;\n        try {\n            in = getClass().getClassLoader().getResourceAsStream(file);\n            return IOUtils.toString(in, StandardCharsets.UTF_8);\n        } finally {\n            IOUtils.closeQuietly(in);\n        }\n    }\n\n    public void compareAsYamlOAS31(final Class<?> cls, final String yaml) throws IOException {\n        Reader reader = new Reader(new SwaggerConfiguration()\n                .openAPI(new OpenAPI())\n                .openAPI31(true));\n        OpenAPI openAPI = reader.read(cls);\n        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/callbacks/CallbackTest.java",
    "content": "package io.swagger.v3.jaxrs2.annotations.callbacks;\n\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.callbacks.Callbacks;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport org.testng.annotations.Test;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.HeaderParam;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class CallbackTest extends AbstractAnnotationTest {\n    @Test\n    public void testSimpleCallback() {\n        String openApiYAML = readIntoYaml(SimpleCallback.class);\n        int start = openApiYAML.indexOf(\"/test:\");\n        int end = openApiYAML.length() - 1;\n        String extractedYAML = openApiYAML.substring(start, end);\n        String expectedYAML = \"/test:\\n\" +\n                \"    post:\\n\" +\n                \"      description: \\\"subscribes a client to updates relevant to the requestor's account,\\\\\\n\" +\n                \"        \\\\ as identified by the input token.  The supplied url will be used as the\\\\\\n\" +\n                \"        \\\\ delivery address for response payloads\\\"\\n\" +\n                \"      operationId: subscribe\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: x-auth-token\\n\" +\n                \"        in: header\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"          description: the authentication token provided after initially authenticating\\n\" +\n                \"            to the application\\n\" +\n                \"          readOnly: true\\n\" +\n                \"      - name: url\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"          description: the URL to call with response data\\n\" +\n                \"          readOnly: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: test description\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"      callbacks:\\n\" +\n                \"        subscription:\\n\" +\n                \"          http://$request.query.url:\\n\" +\n                \"            post:\\n\" +\n                \"              description: payload data will be sent\\n\" +\n                \"              parameters:\\n\" +\n                \"              - name: subscriptionId\\n\" +\n                \"                in: path\\n\" +\n                \"                required: true\\n\" +\n                \"                schema:\\n\" +\n                \"                  maximum: 34\\n\" +\n                \"                  minimum: 2\\n\" +\n                \"                  type: string\\n\" +\n                \"                  description: the generated UUID\\n\" +\n                \"                  format: uuid\\n\" +\n                \"                  readOnly: true\\n\" +\n                \"              responses:\\n\" +\n                \"                \\\"200\\\":\\n\" +\n                \"                  description: Return this code if the callback was received and processed\\n\" +\n                \"                    successfully\\n\" +\n                \"                \\\"205\\\":\\n\" +\n                \"                  description: Return this code to unsubscribe from future data updates\\n\" +\n                \"                default:\\n\" +\n                \"                  description: All other response codes will disable this callback\\n\" +\n                \"                    subscription\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    SubscriptionResponse:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        subscriptionId:\\n\" +\n                \"          type: string\";\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class SimpleCallback {\n        @Path(\"/test\")\n        @POST\n        @Callback(\n                callbackUrlExpression = \"http://$request.query.url\",\n                name = \"subscription\",\n                operation =\n                @Operation(\n                        method = \"post\",\n                        description = \"payload data will be sent\",\n                        parameters = {\n                                @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n                                        schema = @Schema(\n                                                type = \"string\",\n                                                format = \"uuid\",\n                                                description = \"the generated UUID\",\n                                                accessMode = Schema.AccessMode.READ_ONLY,\n                                                minimum = \"2\",\n                                                maximum = \"34\"\n                                        ))\n                        },\n                        responses = {\n                                @ApiResponse(\n                                        responseCode = \"200\",\n                                        description = \"Return this code if the callback was received and processed successfully\"\n                                ),\n                                @ApiResponse(\n                                        responseCode = \"205\",\n                                        description = \"Return this code to unsubscribe from future data updates\"\n                                ),\n                                @ApiResponse(\n                                        responseCode = \"default\",\n                                        description = \"All other response codes will disable this callback subscription\"\n                                )\n                        }))\n        @Operation(\n                operationId = \"subscribe\",\n                description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                        \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"default\",\n                                description = \"test description\", content = @Content(\n                                mediaType = \"*/*\",\n                                schema =\n                                @Schema(\n                                        implementation = CallbackTest.SubscriptionResponse.class)\n                        ))\n                })\n        public SubscriptionResponse subscribe(@Schema(accessMode = Schema.AccessMode.READ_ONLY, description = \"the authentication token \" +\n                \"provided after initially authenticating to the application\", type = \"string\") @HeaderParam(\"x-auth-token\") String token,\n                                              @Schema(accessMode = Schema.AccessMode.READ_ONLY, description = \"the URL to call with response \" +\n                                                      \"data\") @QueryParam(\"url\") String url) {\n            return null;\n        }\n    }\n\n    static class SubscriptionResponse {\n        public String subscriptionId;\n    }\n\n    @Test\n    public void simpleCallbacksWithOneCallbackTest() {\n        String openApiYAML = readIntoYaml(SimpleCallbacksTest.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"      callbacks:\\n\" +\n                \"        testCallback1:\\n\" +\n                \"          localhost:9080/airlines/reviews/{id}/1: {}\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(expectedYAML, extractedYAML);\n    }\n\n    static class SimpleCallbacksTest {\n        @Callbacks({\n                @Callback(name = \"testCallback1\", operation = @Operation(), callbackUrlExpression = \"localhost:9080/airlines/reviews/{id}/1\")\n        })\n        @Operation(\n                summary = \"Simple get operation\",\n                operationId = \"getWithNoParameters\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    @Test\n    public void simpleCallbacksWithOneCallbackWithOperationTest() {\n        String openApiYAML = readIntoYaml(SimpleCallbacksTestWithOperation.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"      callbacks:\\n\" +\n                \"        testCallback1:\\n\" +\n                \"          http://www.url.com:\\n\" +\n                \"            get:\\n\" +\n                \"              summary: get all the reviews\\n\" +\n                \"              operationId: getAllReviews\\n\" +\n                \"              responses:\\n\" +\n                \"                \\\"200\\\":\\n\" +\n                \"                  description: successful operation\\n\" +\n                \"                  content:\\n\" +\n                \"                    application/json:\\n\" +\n                \"                      schema:\\n\" +\n                \"                        type: integer\\n\" +\n                \"                        format: int32\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(expectedYAML, extractedYAML);\n    }\n\n    static class SimpleCallbacksTestWithOperation {\n        @Callbacks({\n                @Callback(\n                        name = \"testCallback1\",\n                        operation = @Operation(\n                                operationId = \"getAllReviews\",\n                                summary = \"get all the reviews\",\n                                method = \"get\",\n                                responses = @ApiResponse(\n                                        responseCode = \"200\",\n                                        description = \"successful operation\",\n                                        content = @Content(\n                                                mediaType = \"application/json\",\n                                                schema = @Schema(\n                                                        type = \"integer\",\n                                                        format = \"int32\")))),\n                        callbackUrlExpression = \"http://www.url.com\")\n        })\n        @Operation(\n                summary = \"Simple get operation\",\n                operationId = \"getWithNoParameters\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    @Test\n    public void simpleCallbacksWithMultipleCallbackWithOperationTest() {\n        String openApiYAML = readIntoYaml(MultipleCallbacksTestWithOperation.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"      callbacks:\\n\" +\n                \"        testCallback1:\\n\" +\n                \"          http://www.url.com:\\n\" +\n                \"            get:\\n\" +\n                \"              summary: get all the reviews\\n\" +\n                \"              operationId: getAllReviews\\n\" +\n                \"              responses:\\n\" +\n                \"                \\\"200\\\":\\n\" +\n                \"                  description: successful operation\\n\" +\n                \"                  content:\\n\" +\n                \"                    application/json:\\n\" +\n                \"                      schema:\\n\" +\n                \"                        type: integer\\n\" +\n                \"                        format: int32\\n\" +\n                \"        testCallback2:\\n\" +\n                \"          http://$request.query.url: {}\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(expectedYAML, extractedYAML);\n    }\n\n    static class MultipleCallbacksTestWithOperation {\n        @Callbacks({\n                @Callback(\n                        name = \"testCallback1\",\n                        operation = @Operation(\n                                operationId = \"getAllReviews\",\n                                summary = \"get all the reviews\",\n                                method = \"get\",\n                                responses = @ApiResponse(\n                                        responseCode = \"200\",\n                                        description = \"successful operation\",\n                                        content = @Content(\n                                                mediaType = \"application/json\",\n                                                schema = @Schema(\n                                                        type = \"integer\",\n                                                        format = \"int32\")))),\n                        callbackUrlExpression = \"http://www.url.com\"),\n                @Callback(name = \"testCallback2\", operation = @Operation(), callbackUrlExpression = \"http://$request.query.url\")\n        })\n        @Operation(\n                summary = \"Simple get operation\",\n                operationId = \"getWithNoParameters\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    @Test\n    public void callbackCallbacksAnnotationTest() {\n        String openApiYAML = readIntoYaml(CallbackCallbacksAnnotationTest.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"      callbacks:\\n\" +\n                \"        testCallback:\\n\" +\n                \"          http://$requests.query.url: {}\\n\" +\n                \"        testCallback1:\\n\" +\n                \"          http://www.url.com:\\n\" +\n                \"            get:\\n\" +\n                \"              summary: get all the reviews\\n\" +\n                \"              operationId: getAllReviews\\n\" +\n                \"              responses:\\n\" +\n                \"                \\\"200\\\":\\n\" +\n                \"                  description: successful operation\\n\" +\n                \"                  content:\\n\" +\n                \"                    application/json:\\n\" +\n                \"                      schema:\\n\" +\n                \"                        type: integer\\n\" +\n                \"                        format: int32\\n\" +\n                \"        testCallback2:\\n\" +\n                \"          http://$request.query.url: {}\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(expectedYAML, extractedYAML);\n    }\n\n    @Test\n    public void repeatableCallbackCallbacksAnnotationTest() {\n        String openApiYAML = readIntoYaml(RepeatableCallbackAnnotationTest.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"      callbacks:\\n\" +\n                \"        testCallback:\\n\" +\n                \"          http://$requests.query.url: {}\\n\" +\n                \"        testCallback1:\\n\" +\n                \"          http://www.url.com:\\n\" +\n                \"            get:\\n\" +\n                \"              summary: get all the reviews\\n\" +\n                \"              operationId: getAllReviews\\n\" +\n                \"              responses:\\n\" +\n                \"                \\\"200\\\":\\n\" +\n                \"                  description: successful operation\\n\" +\n                \"                  content:\\n\" +\n                \"                    application/json:\\n\" +\n                \"                      schema:\\n\" +\n                \"                        type: integer\\n\" +\n                \"                        format: int32\\n\" +\n                \"        testCallback2:\\n\" +\n                \"          http://$request.query.url: {}\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(expectedYAML, extractedYAML);\n    }\n\n    static class CallbackCallbacksAnnotationTest {\n        @Callback(name = \"testCallback\", operation = @Operation(), callbackUrlExpression = \"http://$requests.query.url\")\n        @Callbacks({\n                @Callback(\n                        name = \"testCallback1\",\n                        operation = @Operation(\n                                operationId = \"getAllReviews\",\n                                summary = \"get all the reviews\",\n                                method = \"get\",\n                                responses = @ApiResponse(\n                                        responseCode = \"200\",\n                                        description = \"successful operation\",\n                                        content = @Content(\n                                                mediaType = \"application/json\",\n                                                schema = @Schema(\n                                                        type = \"integer\",\n                                                        format = \"int32\")))),\n                        callbackUrlExpression = \"http://www.url.com\"),\n                @Callback(name = \"testCallback2\", operation = @Operation(), callbackUrlExpression = \"http://$request.query.url\")\n        })\n        @Operation(\n                summary = \"Simple get operation\",\n                operationId = \"getWithNoParameters\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    static class RepeatableCallbackAnnotationTest {\n        @Callback(name = \"testCallback\", operation = @Operation(), callbackUrlExpression = \"http://$requests.query.url\")\n        @Callback(\n                name = \"testCallback1\",\n                operation = @Operation(\n                        operationId = \"getAllReviews\",\n                        summary = \"get all the reviews\",\n                        method = \"get\",\n                        responses = @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"successful operation\",\n                                content = @Content(\n                                        mediaType = \"application/json\",\n                                        schema = @Schema(\n                                                type = \"integer\",\n                                                format = \"int32\")))),\n                callbackUrlExpression = \"http://www.url.com\")\n        @Callback(name = \"testCallback2\", operation = @Operation(), callbackUrlExpression = \"http://$request.query.url\")\n        @Operation(\n                summary = \"Simple get operation\",\n                operationId = \"getWithNoParameters\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/definition/OpenApiDefinitionTest.java",
    "content": "package io.swagger.v3.jaxrs2.annotations.definition;\n\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.info.Contact;\nimport io.swagger.v3.oas.annotations.info.Info;\nimport io.swagger.v3.oas.annotations.info.License;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.servers.Server;\nimport io.swagger.v3.oas.annotations.servers.ServerVariable;\nimport io.swagger.v3.oas.annotations.tags.Tag;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\n\npublic class OpenApiDefinitionTest extends AbstractAnnotationTest {\n\n    @Test\n    public void testSimpleInfoGet() throws IOException {\n\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  title: the title\\n\" +\n                \"  description: My API\\n\" +\n                \"  contact:\\n\" +\n                \"    name: Fred\\n\" +\n                \"    url: http://gigantic-server.com\\n\" +\n                \"    email: Fred@gigagantic-server.com\\n\" +\n                \"  license:\\n\" +\n                \"    name: Apache 2.0\\n\" +\n                \"    url: http://foo.bar\\n\" +\n                \"  version: \\\"0.0\\\"\\n\" +\n                \"externalDocs:\\n\" +\n                \"  description: definition docs desc\\n\" +\n                \"servers:\\n\" +\n                \"- url: http://foo\\n\" +\n                \"  description: server 1\\n\" +\n                \"  variables:\\n\" +\n                \"    var1:\\n\" +\n                \"      description: var 1\\n\" +\n                \"      enum:\\n\" +\n                \"      - \\\"1\\\"\\n\" +\n                \"      - \\\"2\\\"\\n\" +\n                \"      default: \\\"1\\\"\\n\" +\n                \"    var2:\\n\" +\n                \"      description: var 2\\n\" +\n                \"      enum:\\n\" +\n                \"      - \\\"1\\\"\\n\" +\n                \"      - \\\"2\\\"\\n\" +\n                \"      default: \\\"1\\\"\\n\" +\n                \"security:\\n\" +\n                \"- req 1:\\n\" +\n                \"  - a\\n\" +\n                \"  - b\\n\" +\n                \"- req 2:\\n\" +\n                \"  - b\\n\" +\n                \"  - c\\n\" +\n                \"tags:\\n\" +\n                \"- name: Tag 1\\n\" +\n                \"  description: desc 1\\n\" +\n                \"  externalDocs:\\n\" +\n                \"    description: docs desc\\n\" +\n                \"- name: Tag 2\\n\" +\n                \"  description: desc 2\\n\" +\n                \"  externalDocs:\\n\" +\n                \"    description: docs desc 2\\n\" +\n                \"- name: Tag 3\\n\";\n\n        compareAsYaml(OpenApiDefinitionTest.ClassWithAnnotation.class, expectedYAML);\n    }\n\n    @OpenAPIDefinition(\n            info = @Info(\n                    title = \"the title\",\n                    version = \"0.0\",\n                    description = \"My API\",\n                    license = @License(name = \"Apache 2.0\", url = \"http://foo.bar\"),\n                    contact = @Contact(url = \"http://gigantic-server.com\", name = \"Fred\", email = \"Fred@gigagantic-server.com\")\n            ),\n            tags = {\n                    @Tag(name = \"Tag 1\", description = \"desc 1\", externalDocs = @ExternalDocumentation(description = \"docs desc\")),\n                    @Tag(name = \"Tag 2\", description = \"desc 2\", externalDocs = @ExternalDocumentation(description = \"docs desc 2\")),\n                    @Tag(name = \"Tag 3\")\n            },\n            externalDocs = @ExternalDocumentation(description = \"definition docs desc\"),\n            security = {\n                    @SecurityRequirement(name = \"req 1\", scopes = {\"a\", \"b\"}),\n                    @SecurityRequirement(name = \"req 2\", scopes = {\"b\", \"c\"})\n            },\n            servers = {\n                    @Server(\n                            description = \"server 1\",\n                            url = \"http://foo\",\n                            variables = {\n                                    @ServerVariable(name = \"var1\", description = \"var 1\", defaultValue = \"1\", allowableValues = {\"1\", \"2\"}),\n                                    @ServerVariable(name = \"var2\", description = \"var 2\", defaultValue = \"1\", allowableValues = {\"1\", \"2\"})\n                            })\n            }\n    )\n    static class ClassWithAnnotation {\n\n        public void foo() {\n        }\n\n    }\n\n    @Test\n    public void testServerVariableWithoutEnum() throws IOException {\n\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  title: My Rest API\\n\" +\n                \"  description: My RESTful API implementation\\n\" +\n                \"  version: 1.0.0\\n\" +\n                \"servers:\\n\" +\n                \"- url: /{context-path}/{rest-api}\\n\" +\n                \"  description: My REST API\\n\" +\n                \"  variables:\\n\" +\n                \"    context-path:\\n\" +\n                \"      default: my-war\\n\" +\n                \"    rest-api:\\n\" +\n                \"      enum:\\n\" +\n                \"      - api\\n\" +\n                \"      - rest\\n\" +\n                \"      - batchapi\\n\" +\n                \"      default: api\\n\";\n\n        compareAsYaml(OpenApiDefinitionTest.ServerVariableWithoutEnum.class, expectedYAML);\n    }\n\n    @OpenAPIDefinition(\n            info = @Info( title = \"My Rest API\", version = \"1.0.0\", description = \"My RESTful API implementation\" ),\n            servers = {\n                    @Server( description = \"My REST API\",\n                            url = \"/{context-path}/{rest-api}\",\n                            variables = {\n                            @ServerVariable(name = \"context-path\", defaultValue = \"my-war\"),\n                                    @ServerVariable(name = \"rest-api\", defaultValue = \"api\",\n                                            allowableValues = {\"api\", \"rest\", \"batchapi\"}) } ) } )\n    static class ServerVariableWithoutEnum {\n\n        public void foo() {\n        }\n\n    }\n\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/encoding/EncodingTest.java",
    "content": "package io.swagger.v3.jaxrs2.annotations.encoding;\n\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.headers.Header;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Encoding;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport org.testng.annotations.Test;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class EncodingTest extends AbstractAnnotationTest {\n    //Test encoding inside ApiResponse/Content\n    @Test\n    public void testSimpleGetOperationWithEncodingInApiResponse() {\n\n        String openApiYAML = readIntoYaml(SimpleGetOperationWithEncodingInApiResponse.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex\\n\" +\n                \"      operationId: simpleGet\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\\n\" +\n                \"              encoding:\\n\" +\n                \"                test:\\n\" +\n                \"                  contentType: text/plain\\n\" +\n                \"                  style: form\\n\" +\n                \"                  explode: true\\n\" +\n                \"                  allowReserved: true\";\n\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class SimpleGetOperationWithEncodingInApiResponse {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex\",\n                operationId = \"simpleGet\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\",\n                                content = @Content(\n                                        mediaType = \"application/json\",\n                                        schema = @Schema(\n                                                name = \"test\"),\n                                        encoding = @Encoding(\n                                                name = \"test\",\n                                                contentType = \"text/plain\",\n                                                style = \"FORM\",\n                                                allowReserved = true,\n                                                explode = true)))\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    //Test encoding inside Parameter/Content\n    @Test\n    public void testGetOperationWithEncodingInParameter() {\n\n        String openApiYAML = readIntoYaml(GetOperationWithEncodingInParameter.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex\\n\" +\n                \"      operationId: getWithEncodingInParameter\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: testParam\\n\" +\n                \"        in: query\\n\" +\n                \"        description: A parameter for testing encoding annotation.\\n\" +\n                \"        required: true\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: string\\n\" +\n                \"            encoding:\\n\" +\n                \"              testingParam:\\n\" +\n                \"                style: form\\n\" +\n                \"                allowReserved: true\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\";\n\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class GetOperationWithEncodingInParameter {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex\",\n                operationId = \"getWithEncodingInParameter\",\n                parameters = {\n                        @Parameter(\n                                name = \"testParam\",\n                                in = ParameterIn.QUERY,\n                                description = \"A parameter for testing encoding annotation.\",\n                                required = true,\n                                content = @Content(\n                                        mediaType = \"application/json\",\n                                        schema = @Schema(\n                                                name = \"testingParam\"),\n                                        encoding = @Encoding(\n                                                name = \"testingParam\",\n                                                style = \"FORM\",\n                                                allowReserved = true,\n                                                explode = false))\n\n                        )\n                },\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    //Test encoding inside Parameter/Content\n    @Test\n    public void testGetOperationWithEncodingArrayInParameter() {\n\n        String openApiYAML = readIntoYaml(GetOperationWithEncodingArrayInParameter.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex\\n\" +\n                \"      operationId: getWithEncodingArrayInParameter\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: testParam\\n\" +\n                \"        in: query\\n\" +\n                \"        description: A parameter for testing encoding annotation.\\n\" +\n                \"        required: true\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              title: testEncoding2\\n\" +\n                \"              type: string\\n\" +\n                \"            encoding:\\n\" +\n                \"              testEncoding:\\n\" +\n                \"                style: form\\n\" +\n                \"                allowReserved: true\\n\" +\n                \"              testEncoding2:\\n\" +\n                \"                headers:\\n\" +\n                \"                  testHeader:\\n\" +\n                \"                    required: true\\n\" +\n                \"                    style: simple\\n\" +\n                \"                style: form\\n\" +\n                \"                allowReserved: true\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\";\n\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class GetOperationWithEncodingArrayInParameter {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex\",\n                operationId = \"getWithEncodingArrayInParameter\",\n                parameters = {\n                        @Parameter(\n                                name = \"testParam\",\n                                in = ParameterIn.QUERY,\n                                description = \"A parameter for testing encoding annotation.\",\n                                required = true,\n                                content = @Content(\n                                        mediaType = \"application/json\",\n                                        schema = @Schema(\n                                                name = \"testEncoding\",\n                                                title = \"testEncoding2\"),\n                                        encoding = {\n                                                @Encoding(\n                                                        name = \"testEncoding\",\n                                                        style = \"FORM\",\n                                                        allowReserved = true,\n                                                        explode = false),\n                                                @Encoding(\n                                                        name = \"testEncoding2\",\n                                                        style = \"FORM\",\n                                                        allowReserved = true,\n                                                        explode = false,\n                                                        headers = @Header(\n                                                                name = \"testHeader\",\n                                                                required = true))})\n\n                        )\n                },\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    //Test encoding inside RequestBody/Content\n    @Test\n    public void testGetOperationWithEncodingInRequestBody() {\n\n        String openApiYAML = readIntoYaml(GetOperationWithEncodingInRequestBody.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with encoding in requestBody\\n\" +\n                \"      operationId: getWithEncodingInRequestBody\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Test requestBody with encoding.\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: string\\n\" +\n                \"            encoding:\\n\" +\n                \"              testRequestBody:\\n\" +\n                \"                contentType: text/plain\\n\" +\n                \"                style: form\\n\" +\n                \"                explode: true\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class GetOperationWithEncodingInRequestBody {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with encoding in requestBody\",\n                operationId = \"getWithEncodingInRequestBody\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                })\n\n        @GET\n        @Path(\"/path\")\n        public void simpleGet(@RequestBody(\n                description = \"Test requestBody with encoding.\",\n                required = true,\n                content = @Content(\n                        mediaType = \"application/json\",\n                        schema = @Schema(\n                                name = \"testRequestBody\"),\n                        encoding = @Encoding(\n                                name = \"testRequestBody\",\n                                contentType = \"text/plain\",\n                                style = \"FORM\",\n                                explode = true))) String testRequestBody) {\n        }\n    }\n\n    //Test an operation with ApiResponse but no Content/Encoding in it\n    @Test\n    public void testSimpleGetOperation() {\n        String openApiYAML = readIntoYaml(SimpleGetOperationTest.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class SimpleGetOperationTest {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex\",\n                operationId = \"getWithNoParameters\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    //Test an operation with no response, parameters, or requestBody\n    @Test\n    public void testSimpleGetOperationWithoutResponses() {\n        String openApiYAML = readIntoYaml(SimpleGetWithoutResponses.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs or responses\\n\" +\n                \"      operationId: getWithNoParametersAndNoResponses\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class SimpleGetWithoutResponses {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs or responses\",\n                operationId = \"getWithNoParametersAndNoResponses\")\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/examples/ExamplesTest.java",
    "content": "package io.swagger.v3.jaxrs2.annotations.examples;\n\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport org.testng.annotations.Test;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class ExamplesTest extends AbstractAnnotationTest {\n\n    @Test\n    public void testRequestBodyContentExample() {\n        compareToYamlFile(ExamplesTest.RequestBodyContentExample.class, \"examples/\");\n        compareToYamlFile(ExamplesTest.RequestBodyContentExampleWithConsumes.class, \"examples/\");\n        compareToYamlFile(ExamplesTest.RequestBodyContentExampleWithMediatype.class, \"examples/\");\n        compareToYamlFile(ExamplesTest.RequestBodyContentExampleWithMediatype.class, \"examples/\");\n        compareToYamlFile(ExamplesTest.RequestBodyContentExampleWithSchema.class, \"examples/\");\n        compareToYamlFile(ExamplesTest.RequestBodyContentExampleWithSchemaImplementation.class, \"examples/\");\n    }\n\n    @Test\n    public void testResponseExample() {\n        compareToYamlFile(ExamplesTest.ResponseExample.class, \"examples/\");\n        compareToYamlFile(ExamplesTest.ResponseExampleSchema.class, \"examples/\");\n        compareToYamlFile(ExamplesTest.ResponseExampleSchemaImplementation.class, \"examples/\");\n    }\n\n    @Test\n    public void testParameterExample() {\n        compareToYamlFile(ExamplesTest.ParameterExample.class, \"examples/\");\n    }\n\n\n    @Test\n    public void testAnnotatedModel() {\n        compareToYamlFile(ExamplesTest.AnnotatedModelExample.class, \"examples/\");\n        compareToYamlFile(ExamplesTest.AnnotatedModelAndContentExample.class, \"examples/\");\n    }\n\n    static class ResponseExampleSchema {\n        @Path(\"/test\")\n        @POST\n        @Operation(\n                operationId = \"subscribe\",\n                description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                        \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n                responses = {\n                        @ApiResponse(\n                                description = \"test description\",\n                                content = @Content(\n                                        mediaType = \"*/*\",\n                                        schema = @Schema(\n                                                type = \"string\",\n                                                format = \"uuid\",\n                                                description = \"the generated UUID\",\n                                                accessMode = Schema.AccessMode.READ_ONLY,\n                                                example = \"Schema example\"\n                                        ),\n                                        examples = {\n                                                @ExampleObject(\n                                                        name = \"Default Response\",\n                                                        value = \"SubscriptionResponse\",\n                                                        summary = \"Subscription Response Example\"\n                                                )\n                                        }\n                                ))\n                })\n        public ExamplesTest.SubscriptionResponse subscribe() {\n            return null;\n        }\n    }\n\n    static class ResponseExampleSchemaImplementation {\n        @Path(\"/test\")\n        @POST\n        @Operation(\n                operationId = \"subscribe\",\n                description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                        \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n                responses = {\n                        @ApiResponse(\n                                description = \"test description\",\n                                content = @Content(\n                                        mediaType = \"*/*\",\n                                        schema = @Schema(\n                                                implementation = Subscription.class\n                                        ),\n                                        examples = {\n                                                @ExampleObject(\n                                                        name = \"Default Response\",\n                                                        value = \"{\\\"subscriptionId\\\" : \\\"1\\\", \\\"subscriptionItem\\\" : {\\\"subscriptionItemId\\\" : \\\"2\\\"}}\",\n                                                        summary = \"Subscription Response Example\"\n                                                )\n                                        }\n                                ))\n                })\n        public ExamplesTest.SubscriptionResponse subscribe() {\n            return null;\n        }\n    }\n\n    static class ResponseExample {\n        @Path(\"/test\")\n        @POST\n        @Operation(\n                operationId = \"subscribe\",\n                description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                        \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n                responses = {\n                        @ApiResponse(\n                                description = \"test description\",\n                                content = @Content(\n                                        mediaType = \"*/*\",\n                                        examples = {\n                                                @ExampleObject(\n                                                        name = \"Default Response\",\n                                                        value = \"{\\\"subscriptionId\\\" : \\\"1\\\", \\\"subscriptionItem\\\" : {\\\"subscriptionItemId\\\" : \\\"2\\\"}}\",\n                                                        summary = \"Subscription Response Example\"\n                                                )\n                                        }\n                                ))\n                })\n        public ExamplesTest.SubscriptionResponse subscribe() {\n            return null;\n        }\n    }\n\n    static class ParameterExample{\n        @Path(\"/test\")\n        @POST\n        public ExamplesTest.Subscription testRequestBody(\n                @Parameter(\n                        in = ParameterIn.QUERY,\n                        description = \"subscription param\",\n                        required = true,\n                        example = \"1\",\n                        schema = @Schema(\n                                type = \"string\",\n                                description = \"the Sub\",\n                                accessMode = Schema.AccessMode.READ_ONLY,\n                                example = \"Schema example\"\n                        ),\n                        content = @Content(\n                                mediaType = \"application/json\",\n                                examples = {\n                                        @ExampleObject(\n                                                name = \"Default Request\",\n                                                description = \"Subscription Example Description\",\n                                                value = \"{\\\"subscriptionId\\\" : \\\"1\\\", \\\"subscriptionItem\\\" : {\\\"subscriptionItemId\\\" : \\\"2\\\"}}\",\n                                                summary = \"Subscription  Example\")\n                                }\n                        ),\n                        examples = {\n                                @ExampleObject(\n                                        name = \"ex 1\",\n                                        value = \"{\\\"subscriptionId\\\" : \\\"1\\\", \\\"subscriptionItem\\\" : {\\\"subscriptionItemId\\\" : \\\"2\\\"}}\"\n                                ),\n                                @ExampleObject(\n                                        name = \"ex 2\",\n                                        value = \"{\\\"subscriptionId\\\" : \\\"12\\\", \\\"subscriptionItem\\\" : {\\\"subscriptionItemId\\\" : \\\"22\\\"}}\"\n                                )\n                        }\n                ) String subId) {\n            return null;\n        }\n    }\n\n\n    static class RequestBodyContentExample{\n        @Path(\"/test\")\n        @POST\n        public ExamplesTest.Subscription testRequestBody(\n                @RequestBody(\n                        description = \"Created user object\",\n                        required = true,\n                        content = @Content(\n                                examples = {\n                                        @ExampleObject(\n                                                name = \"Default Request\",\n                                                value = \"{\\\"subscriptionId\\\" : \\\"1\\\", \\\"subscriptionItem\\\" : {\\\"subscriptionItemId\\\" : \\\"2\\\"}}\",\n                                                summary = \"Subscription  Example\")\n                                }\n                        )\n                ) ExamplesTest.Subscription sub) {\n            return null;\n        }\n    }\n\n\n    static class RequestBodyContentExampleWithSchemaImplementation{\n\n        @Path(\"/test\")\n        @POST\n        public ExamplesTest.Subscription testRequestBody(\n                @RequestBody(\n                        description = \"Created user object\",\n                        required = true,\n                        content = @Content(\n                            schema = @Schema(\n                                implementation = ExamplesTest.Subscription.class\n                            ),\n                            examples = {\n                                @ExampleObject(\n                                        name = \"Default Request\",\n                                        value = \"{\\\"subscriptionId\\\" : \\\"1\\\", \\\"subscriptionItem\\\" : {\\\"subscriptionItemId\\\" : \\\"2\\\"}}\",\n                                        summary = \"Subscription  Example\")\n                            }\n                        )\n                ) ExamplesTest.Subscription sub) {\n            return null;\n        }\n\n    }\n\n    static class RequestBodyContentExampleWithSchema{\n\n        @Path(\"/test\")\n        @POST\n        public ExamplesTest.Subscription testRequestBody(\n                @RequestBody(\n                        description = \"Created user object\",\n                        required = true,\n                        content = @Content(\n                                schema = @Schema(\n                                        type = \"string\",\n                                        description = \"the Sub\",\n                                        accessMode = Schema.AccessMode.READ_ONLY,\n                                        example = \"Schema example\"\n                                ),\n                                examples = {\n                                        @ExampleObject(\n                                                name = \"Default Request\",\n                                                value = \"3\",\n                                                summary = \"Subscription  Example\")\n                                }\n                        )\n                ) ExamplesTest.Subscription sub) {\n            return null;\n        }\n\n    }\n\n    static class RequestBodyContentExampleWithMediatype{\n\n        @Path(\"/test\")\n        @POST\n        public ExamplesTest.Subscription testRequestBody(\n                @RequestBody(\n                        description = \"Created user object\",\n                        required = true,\n                        content = @Content(\n                                mediaType = \"application/json\",\n                                examples = {\n                                        @ExampleObject(\n                                                name = \"Default Request\",\n                                                value = \"{\\\"subscriptionId\\\" : \\\"1\\\", \\\"subscriptionItem\\\" : {\\\"subscriptionItemId\\\" : \\\"2\\\"}}\",\n                                                summary = \"Subscription  Example\")\n                                }\n                        )\n                ) ExamplesTest.Subscription sub) {\n            return null;\n        }\n\n    }\n    static class RequestBodyContentExampleWithConsumes{\n\n        @Path(\"/test\")\n        @POST\n        @Consumes(\"application/json\")\n        public ExamplesTest.Subscription testRequestBody(\n                @RequestBody(\n                        description = \"Created user object\",\n                        required = true,\n                        content = @Content(\n                                examples = {\n                                        @ExampleObject(\n                                                name = \"Default Request\",\n                                                value = \"{\\\"subscriptionId\\\" : \\\"1\\\", \\\"subscriptionItem\\\" : {\\\"subscriptionItemId\\\" : \\\"2\\\"}}\",\n                                                summary = \"Subscription  Example\")\n                                }\n                        )\n                ) ExamplesTest.Subscription sub) {\n            return null;\n        }\n\n    }\n\n    static class AnnotatedModelExample{\n\n        @Path(\"/test\")\n        @POST\n        public ExamplesTest.AnnotatedSubscription testAnnotatedModel(\n                @RequestBody(\n                        description = \"Created user object\",\n                        required = true\n                ) ExamplesTest.AnnotatedSubscription sub) {\n            return null;\n        }\n\n    }\n\n    static class AnnotatedModelAndContentExample{\n\n        @Path(\"/test\")\n        @POST\n        public ExamplesTest.AnnotatedSubscription testAnnotatedModel(\n                @RequestBody(\n                        description = \"Created user object\",\n                        required = true,\n                        content = @Content(\n                                mediaType = \"application/json\",\n                                examples = {\n                                        @ExampleObject(\n                                                name = \"Default Request\",\n                                                value = \"{\\\"subscriptionId\\\" : \\\"1\\\", \\\"subscriptionItem\\\" : {\\\"subscriptionItemId\\\" : \\\"2\\\"}}\",\n                                                summary = \"Subscription  Example\"),\n                                        @ExampleObject(\n                                                name = \"Default Request 2\",\n                                                value = \"{\\\"subscriptionId\\\" : \\\"12\\\", \\\"subscriptionItem\\\" : {\\\"subscriptionItemId\\\" : \\\"22\\\"}}\",\n                                                summary = \"Subscription  Example 2\")\n                                }\n                        )\n                ) ExamplesTest.AnnotatedSubscription sub) {\n            return null;\n        }\n\n    }\n\n\n\n    @Test\n    public void testFullExample() {\n        String openApiYAML = readIntoYaml(ExamplesTest.SimpleOperations.class);\n        int start = openApiYAML.indexOf(\"/test:\");\n        int end = openApiYAML.length() - 1;\n        String extractedYAML = openApiYAML.substring(start, end);\n        String expectedYAML = \"/test:\\n\" +\n                \"    post:\\n\" +\n                \"      description: \\\"subscribes a client to updates relevant to the requestor's account,\\\\\\n\" +\n                \"        \\\\ as identified by the input token.  The supplied url will be used as the\\\\\\n\" +\n                \"        \\\\ delivery address for response payloads\\\"\\n\" +\n                \"      operationId: subscribe\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: subscriptionId\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        style: simple\\n\" +\n                \"        schema:\\n\" +\n                \"          $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"        examples:\\n\" +\n                \"          subscriptionId_1:\\n\" +\n                \"            summary: Subscription number 12345\\n\" +\n                \"            description: subscriptionId_1\\n\" +\n                \"            value: 12345\\n\" +\n                \"            externalValue: Subscription external value 1\\n\" +\n                \"          subscriptionId_2:\\n\" +\n                \"            summary: Subscription number 54321\\n\" +\n                \"            description: subscriptionId_2\\n\" +\n                \"            value: 54321\\n\" +\n                \"            externalValue: Subscription external value 2\\n\" +\n                \"        example: example\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Created user object\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: string\\n\" +\n                \"              description: the generated UUID\\n\" +\n                \"              format: uuid\\n\" +\n                \"              readOnly: true\\n\" +\n                \"              example: Schema example\\n\" +\n                \"            examples:\\n\" +\n                \"              Default Response:\\n\" +\n                \"                summary: Subscription Response Example\\n\" +\n                \"                description: Default Response\\n\" +\n                \"                value: SubscriptionResponse\\n\" +\n                \"                externalValue: Subscription Response value 1\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: test description\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\\n\" +\n                \"                description: the generated UUID\\n\" +\n                \"                format: uuid\\n\" +\n                \"                readOnly: true\\n\" +\n                \"                example: Schema example\\n\" +\n                \"              examples:\\n\" +\n                \"                Default Response:\\n\" +\n                \"                  summary: Subscription Response Example\\n\" +\n                \"                  description: Default Response\\n\" +\n                \"                  value: SubscriptionResponse\\n\" +\n                \"                  externalValue: Subscription Response value 1\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    SubscriptionResponse:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        subscriptionId:\\n\" +\n                \"          type: string\\n\" +\n                \"    User:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        username:\\n\" +\n                \"          type: string\\n\" +\n                \"        firstName:\\n\" +\n                \"          type: string\\n\" +\n                \"        lastName:\\n\" +\n                \"          type: string\\n\" +\n                \"        email:\\n\" +\n                \"          type: string\\n\" +\n                \"        password:\\n\" +\n                \"          type: string\\n\" +\n                \"        phone:\\n\" +\n                \"          type: string\\n\" +\n                \"        userStatus:\\n\" +\n                \"          type: integer\\n\" +\n                \"          description: User Status\\n\" +\n                \"          format: int32\\n\" +\n                \"      xml:\\n\" +\n                \"        name: User\";\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class SimpleOperations {\n        @Path(\"/test\")\n        @POST\n        @Operation(\n                operationId = \"subscribe\",\n                description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                        \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n                parameters = {\n                        @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n                                schema = @Schema(implementation = ExamplesTest.SubscriptionResponse.class),\n                                style = ParameterStyle.SIMPLE, example = \"example\",\n                                examples = {\n                                        @ExampleObject(name = \"subscriptionId_1\", value = \"12345\",\n                                                summary = \"Subscription number 12345\", externalValue = \"Subscription external value 1\"),\n                                        @ExampleObject(name = \"subscriptionId_2\", value = \"54321\",\n                                                summary = \"Subscription number 54321\", externalValue = \"Subscription external value 2\")\n                                })\n                },\n                responses = {\n                        @ApiResponse(\n                                description = \"test description\",\n                                content = @Content(\n                                        mediaType = \"*/*\",\n                                        schema = @Schema(\n                                                type = \"string\",\n                                                format = \"uuid\",\n                                                description = \"the generated UUID\",\n                                                accessMode = Schema.AccessMode.READ_ONLY,\n                                                example = \"Schema example\"\n                                        ),\n                                        examples = {\n                                                @ExampleObject(name = \"Default Response\", value = \"SubscriptionResponse\",\n                                                        summary = \"Subscription Response Example\", externalValue = \"Subscription Response value 1\")\n                                        }\n                                ))\n                })\n        public ExamplesTest.SubscriptionResponse subscribe(@RequestBody(description = \"Created user object\", required = true,\n                content = @Content(\n                        schema = @Schema(\n                                type = \"string\",\n                                format = \"uuid\",\n                                description = \"the generated UUID\",\n                                accessMode = Schema.AccessMode.READ_ONLY,\n                                example = \"Schema example\"),\n                        examples = {\n                                @ExampleObject(name = \"Default Response\", value = \"SubscriptionResponse\",\n                                        summary = \"Subscription Response Example\", externalValue = \"Subscription Response value 1\")\n                        })) User user) {\n            return null;\n        }\n    }\n\n    static class SubscriptionResponse {\n        public String subscriptionId;\n    }\n\n    static class Subscription {\n        public String subscriptionId;\n        public SubscriptionItem subscriptionItem;\n    }\n\n    static class SubscriptionItem {\n        public String subscriptionItemId;\n    }\n\n    @Schema(example = \"{\\\"subscriptionId\\\" : \\\"1\\\", \\\"subscriptionItem\\\" : {\\\"subscriptionItemId\\\" : \\\"2\\\"}}\")\n    static class AnnotatedSubscription {\n        public String subscriptionId;\n        public AnnotatedSubscriptionItem subscriptionItem;\n    }\n\n    @Schema(example = \"{\\\"subscriptionItemId\\\" : \\\"1\\\"}\")\n    static class AnnotatedSubscriptionItem {\n        public String subscriptionItemId;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/info/InfoTest.java",
    "content": "package io.swagger.v3.jaxrs2.annotations.info;\n\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.info.Contact;\nimport io.swagger.v3.oas.annotations.info.Info;\nimport io.swagger.v3.oas.annotations.info.License;\nimport org.testng.annotations.Test;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class InfoTest extends AbstractAnnotationTest {\n    @Test\n    public void testSimpleInfoGet() {\n        String openApiYAML = readIntoYaml(InfoTest.ClassWithInfoAnnotation.class);\n        int start = openApiYAML.indexOf(\"info:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"info:\\n\" +\n                \"  title: the title\\n\" +\n                \"  description: My API\\n\" +\n                \"  contact:\\n\" +\n                \"    name: Fred\\n\" +\n                \"    url: http://gigantic-server.com\\n\" +\n                \"    email: Fred@gigagantic-server.com\\n\" +\n                \"  license:\\n\" +\n                \"    name: Apache 2.0\\n\" +\n                \"    url: http://foo.bar\\n\" +\n                \"  version: \\\"0.0\\\"\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    @OpenAPIDefinition(info = @Info(\n            title = \"the title\",\n            version = \"0.0\",\n            description = \"My API\",\n            license = @License(name = \"Apache 2.0\", url = \"http://foo.bar\"),\n            contact = @Contact(url = \"http://gigantic-server.com\", name = \"Fred\", email = \"Fred@gigagantic-server.com\"))\n    )\n    static class ClassWithInfoAnnotation {\n        // do something here\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/operations/AnnotatedOperationMethodTest.java",
    "content": "package io.swagger.v3.jaxrs2.annotations.operations;\n\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport io.swagger.v3.jaxrs2.resources.GenericResponsesResource;\nimport io.swagger.v3.jaxrs2.resources.HiddenAnnotatedUserResource;\nimport io.swagger.v3.jaxrs2.resources.HiddenUserResource;\nimport io.swagger.v3.jaxrs2.resources.PetResource;\nimport io.swagger.v3.jaxrs2.resources.PetResourceSlashesinPath;\nimport io.swagger.v3.jaxrs2.resources.SimpleUserResource;\nimport io.swagger.v3.jaxrs2.resources.UserResource;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.headers.Header;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport org.testng.annotations.Test;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport java.io.IOException;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class AnnotatedOperationMethodTest extends AbstractAnnotationTest {\n    @Test\n    public void testSimpleGetOperation() {\n        String openApiYAML = readIntoYaml(SimpleGetOperationTest.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"      deprecated: true\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class SimpleGetOperationTest {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex\",\n                operationId = \"getWithNoParameters\",\n                deprecated = true,\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                }\n        )\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    @Test\n    public void testSimpleGetOperationWithoutResponses() {\n        String openApiYAML = readIntoYaml(SimpleGetWithoutResponses.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs or responses\\n\" +\n                \"      operationId: getWithNoParametersAndNoResponses\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"      deprecated: true\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class SimpleGetWithoutResponses {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs or responses\",\n                operationId = \"getWithNoParametersAndNoResponses\",\n                deprecated = true\n        )\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    @Test\n    public void testGetOperationWithResponsePayloadAndAlternateCodes() {\n        String openApiYAML = readIntoYaml(GetOperationWithResponsePayloadAndAlternateCodes.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.indexOf(\"components:\");\n        String extractedYAML = openApiYAML.substring(start, end);\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SampleResponseSchema\\\"\\n\" +\n                \"        default:\\n\" +\n                \"          description: boo\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/GenericError\\\"\\n\" +\n                \"              examples:\\n\" +\n                \"                boo:\\n\" +\n                \"                  summary: example of boo\\n\" +\n                \"                  description: boo\\n\" +\n                \"                  value: example\\n\" +\n                \"                  externalValue: example of external value\\n\" +\n                \"      deprecated: true\\n\";\n\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class GetOperationWithResponsePayloadAndAlternateCodes {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex\",\n                operationId = \"getWithPayloadResponse\",\n                deprecated = true,\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\",\n                                content = @Content(\n                                        mediaType = \"application/json\",\n                                        schema = @Schema(implementation = SampleResponseSchema.class)\n                                )\n                        ),\n                        @ApiResponse(\n                                description = \"boo\",\n                                content = @Content(\n                                        mediaType = \"*/*\",\n                                        schema = @Schema(implementation = GenericError.class),\n                                        examples = {\n                                                @ExampleObject(name = \"boo\", value = \"example\",\n                                                        summary = \"example of boo\", externalValue = \"example of external value\")\n                                        }\n\n                                )\n                        )\n                }\n        )\n        @Path(\"/path\")\n        @GET\n        public void simpleGet() {\n        }\n    }\n\n    static class SampleResponseSchema {\n        @Schema(description = \"the user id\")\n        public String id;\n    }\n\n    static class SampleHeaderSchema {\n        public String id;\n    }\n\n    static class GenericError {\n        public int code;\n        public String message;\n    }\n\n    @Test(description = \"reads an operation with response examples defined\")\n    public void testOperationWithResponseExamples() {\n        String openApiYAML = readIntoYaml(GetOperationWithResponseExamples.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.indexOf(\"components:\");\n        String extractedYAML = openApiYAML.substring(start, end);\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex output\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SampleResponseSchema\\\"\\n\" +\n                \"              examples:\\n\" +\n                \"                basic:\\n\" +\n                \"                  summary: shows a basic example\\n\" +\n                \"                  description: basic\\n\" +\n                \"                  value: \\\"{id: 19877734}\\\"\\n\" +\n                \"      deprecated: true\\n\";\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    @Test(description = \"reads an operation with response examples defined\")\n    public void testOperationWithParameterExample() {\n        String openApiYAML = readIntoYaml(GetOperationWithParameterExample.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.indexOf(\"components:\");\n        String extractedYAML = openApiYAML.substring(start, end);\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with a parameter example\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      parameters:\\n\" +\n                \"      - in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"        example:\\n\" +\n                \"          id: 19877734\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SampleResponseSchema\\\"\\n\" +\n                \"              examples:\\n\" +\n                \"                basic:\\n\" +\n                \"                  summary: shows a basic example\\n\" +\n                \"                  description: basic\\n\" +\n                \"                  value: \\\"{id: 19877734}\\\"\\n\" +\n                \"      deprecated: true\\n\";\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class GetOperationWithResponseExamples {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex output\",\n                operationId = \"getWithPayloadResponse\",\n                deprecated = true,\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\",\n                                content = @Content(\n                                        mediaType = \"application/json\",\n                                        schema = @Schema(implementation = SampleResponseSchema.class),\n                                        examples = {\n                                                @ExampleObject(\n                                                        name = \"basic\",\n                                                        summary = \"shows a basic example\",\n                                                        value = \"{id: 19877734}\")\n                                        }\n                                )\n                        )\n                }\n        )\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    static class GetOperationWithParameterExample {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with a parameter example\",\n                operationId = \"getWithPayloadResponse\",\n                deprecated = true,\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\",\n                                content = @Content(\n                                        mediaType = \"application/json\",\n                                        schema = @Schema(implementation = SampleResponseSchema.class),\n                                        examples = {\n                                                @ExampleObject(\n                                                        name = \"basic\",\n                                                        summary = \"shows a basic example\",\n                                                        value = \"{id: 19877734}\")\n                                        }\n                                )\n                        )\n                }\n        )\n        @GET\n        @Path(\"/path\")\n        public void simpleGet(@Parameter(in = ParameterIn.QUERY, example = \"{\\\"id\\\": 19877734}\") String exParam) {\n        }\n    }\n\n    static class GetOperationWithResponseSingleHeader {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex output\",\n                operationId = \"getWithPayloadResponse\",\n                deprecated = true,\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\",\n                                headers = {@Header(\n                                        name = \"Rate-Limit-Limit\",\n                                        description = \"The number of allowed requests in the current period\",\n                                        schema = @Schema(type = \"integer\"))})\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    @Test\n    public void testOperationWithResponseSingleHeader() {\n        String openApiYAML = readIntoYaml(GetOperationWithResponseSingleHeader.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        String extractedYAML = openApiYAML.substring(start);\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex output\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          headers:\\n\" +\n                \"            Rate-Limit-Limit:\\n\" +\n                \"              description: The number of allowed requests in the current period\\n\" +\n                \"              style: simple\\n\" +\n                \"              schema:\\n\" +\n                \"                type: integer\\n\" +\n                \"      deprecated: true\\n\";\n        assertEquals(expectedYAML, extractedYAML);\n    }\n\n    static class GetOperationWithResponseMultipleHeaders {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex output\",\n                operationId = \"getWithPayloadResponse\",\n                deprecated = true,\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\",\n                                headers = {@Header(\n                                        explode = Explode.TRUE,\n                                        name = \"Rate-Limit-Limit\",\n                                        description = \"The number of allowed requests in the current period\",\n                                        schema = @Schema(type = \"integer\")),\n                                        @Header(\n                                                name = \"X-Rate-Limit-Desc\",\n                                                description = \"The description of rate limit\",\n                                                schema = @Schema(type = \"string\"))})\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    @Test\n    public void testOperationWithResponseArraySchema() {\n        String openApiYAML = readIntoYaml(GetOperationResponseHeaderWithArraySchema.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        String extractedYAML = openApiYAML.substring(start);\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex output\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          headers:\\n\" +\n                \"            Rate-Limit-Limit:\\n\" +\n                \"              description: The number of allowed requests in the current period\\n\" +\n                \"              style: simple\\n\" +\n                \"              schema:\\n\" +\n                \"                maxItems: 10\\n\" +\n                \"                minItems: 1\\n\" +\n                \"                type: array\\n\" +\n                \"                items:\\n\" +\n                \"                  type: integer\\n\" +\n                \"      deprecated: true\\n\";\n        assertEquals(expectedYAML, extractedYAML);\n    }\n\n    static class GetOperationResponseHeaderWithArraySchema {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex output\",\n                operationId = \"getWithPayloadResponse\",\n                deprecated = true,\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\",\n                                headers = {@Header(\n                                        name = \"Rate-Limit-Limit\",\n                                        description = \"The number of allowed requests in the current period\",\n                                        array = @ArraySchema(maxItems = 10, minItems = 1,schema = @Schema(type = \"integer\")))})})\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    static class GetOperationResponseWithoutHiddenHeader {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex output\",\n                operationId = \"getWithPayloadResponse\",\n                deprecated = true,\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\",\n                                headers = {@Header(\n                                        hidden = true,\n                                        name = \"Rate-Limit-Limit\",\n                                        description = \"The number of allowed requests in the current period\",\n                                        schema = @Schema(type = \"integer\")),\n                                        @Header(\n                                                name = \"X-Rate-Limit-Desc\",\n                                                description = \"The description of rate limit\",\n                                                schema = @Schema(type = \"string\"))})\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    static class GetOperationWithResponseMultipleHeadersAndExamples {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex output\",\n                operationId = \"getWithPayloadResponse\",\n                deprecated = true,\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\",\n                                headers = {@Header(\n                                        examples = {\n                                                @ExampleObject(\n                                                        name = \"ex 1\",\n                                                        description = \"example description\",\n                                                        value = \"example value\"\n                                                ),\n                                                @ExampleObject(\n                                                        name = \"ex 2\",\n                                                        description = \"example description 2\",\n                                                        value = \"example value 2\"\n                                                )\n                                        },\n                                        name = \"Rate-Limit-Limit\",\n                                        description = \"The number of allowed requests in the current period\",\n                                        schema = @Schema(type = \"object\")),\n                                        @Header(\n                                                name = \"X-Rate-Limit-Desc\",\n                                                description = \"The description of rate limit\",\n                                                array = @ArraySchema(schema = @Schema()),\n                                                example = \"example1\")})\n\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    static class GetOperationResponseWithHeaderExplodeAttribute {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex output\",\n                operationId = \"getWithPayloadResponse\",\n                deprecated = true,\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\",\n                                headers = {@Header(\n                                        name = \"Rate-Limit-Limit\",\n                                        description = \"The number of allowed requests in the current period\",\n                                        explode = Explode.TRUE,\n                                        schema = @Schema(type = \"object\")),\n                                        @Header(\n                                                name = \"X-Rate-Limit-Desc\",\n                                                description = \"The description of rate limit\",\n                                                explode = Explode.FALSE,\n                                                schema = @Schema(type = \"array\"))})\n                })\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    @Test\n    public void testOperationWithResponseMultipleHeaders() {\n        String openApiYAML = readIntoYaml(GetOperationWithResponseMultipleHeaders.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        String extractedYAML = openApiYAML.substring(start);\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex output\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          headers:\\n\" +\n                \"            X-Rate-Limit-Desc:\\n\" +\n                \"              description: The description of rate limit\\n\" +\n                \"              style: simple\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\\n\" +\n                \"            Rate-Limit-Limit:\\n\" +\n                \"              description: The number of allowed requests in the current period\\n\" +\n                \"              style: simple\\n\" +\n                \"              schema:\\n\" +\n                \"                type: integer\\n\" +\n                \"      deprecated: true\\n\";\n        assertEquals(expectedYAML, extractedYAML);\n    }\n\n    static class GetOperationWithResponseMultipleHeadersWithImplementationSchema {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex output\",\n                operationId = \"getWithPayloadResponse\",\n                deprecated = true,\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\",\n                                headers = {@Header(\n                                        explode = Explode.TRUE,\n                                        name = \"Rate-Limit-Limit\",\n                                        description = \"The number of allowed requests in the current period\",\n                                        array = @ArraySchema(maxItems = 10, minItems = 1,schema = @Schema(implementation = SampleHeaderSchema.class))),\n                                        @Header(\n                                                explode = Explode.TRUE,\n                                                name = \"X-Rate-Limit-Desc\",\n                                                description = \"The description of rate limit\",\n                                                schema = @Schema(implementation = SampleHeaderSchema.class))})})\n\n\n\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    @Test\n    public void testOperationWithResponseMultipleHeadersImplementationSchema() {\n        String openApiYAML = readIntoYaml(GetOperationWithResponseMultipleHeadersWithImplementationSchema.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        String extractedYAML = openApiYAML.substring(start);\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex output\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          headers:\\n\" +\n                \"            X-Rate-Limit-Desc:\\n\" +\n                \"              description: The description of rate limit\\n\" +\n                \"              style: simple\\n\" +\n                \"              explode: true\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SampleHeaderSchema\\\"\\n\" +\n                \"            Rate-Limit-Limit:\\n\" +\n                \"              description: The number of allowed requests in the current period\\n\" +\n                \"              style: simple\\n\" +\n                \"              explode: true\\n\" +\n                \"              schema:\\n\" +\n                \"                maxItems: 10\\n\" +\n                \"                minItems: 1\\n\" +\n                \"                type: array\\n\" +\n                \"                items:\\n\" +\n                \"                  $ref: \\\"#/components/schemas/SampleHeaderSchema\\\"\\n\" +\n                \"      deprecated: true\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    SampleHeaderSchema:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: string\\n\";\n        assertEquals(expectedYAML, extractedYAML);\n    }\n\n    @Test\n    public void testOperationWithResponseMultipleHeadersAndExplodeAttribute() {\n        String openApiYAML = readIntoYaml(GetOperationResponseWithHeaderExplodeAttribute.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        String extractedYAML = openApiYAML.substring(start);\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex output\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          headers:\\n\" +\n                \"            X-Rate-Limit-Desc:\\n\" +\n                \"              description: The description of rate limit\\n\" +\n                \"              style: simple\\n\" +\n                \"              explode: false\\n\" +\n                \"              schema:\\n\" +\n                \"                type: array\\n\" +\n                \"            Rate-Limit-Limit:\\n\" +\n                \"              description: The number of allowed requests in the current period\\n\" +\n                \"              style: simple\\n\" +\n                \"              explode: true\\n\" +\n                \"              schema:\\n\" +\n                \"                type: object\\n\" +\n                \"      deprecated: true\\n\";\n        assertEquals(expectedYAML, extractedYAML);\n    }\n\n    @Test\n    public void testOperationResponseWithoutHiddenHeader() {\n        String openApiYAML = readIntoYaml(GetOperationResponseWithoutHiddenHeader.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        String extractedYAML = openApiYAML.substring(start);\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex output\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          headers:\\n\" +\n                \"            X-Rate-Limit-Desc:\\n\" +\n                \"              description: The description of rate limit\\n\" +\n                \"              style: simple\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\\n\" +\n                \"      deprecated: true\\n\";\n        assertEquals(expectedYAML, extractedYAML);\n    }\n\n    @Test\n    public void testOperationWithResponseMultipleHeadersAndExamples() {\n        String openApiYAML = readIntoYaml(GetOperationWithResponseMultipleHeadersAndExamples.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        String extractedYAML = openApiYAML.substring(start);\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex output\\n\" +\n                \"      operationId: getWithPayloadResponse\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"          headers:\\n\" +\n                \"            X-Rate-Limit-Desc:\\n\" +\n                \"              description: The description of rate limit\\n\" +\n                \"              style: simple\\n\" +\n                \"              example: example1\\n\" +\n                \"            Rate-Limit-Limit:\\n\" +\n                \"              description: The number of allowed requests in the current period\\n\" +\n                \"              style: simple\\n\" +\n                \"              schema:\\n\" +\n                \"                type: object\\n\" +\n                \"              examples:\\n\" +\n                \"                ex 1:\\n\" +\n                \"                  description: example description\\n\" +\n                \"                  value: example value\\n\" +\n                \"                ex 2:\\n\" +\n                \"                  description: example description 2\\n\" +\n                \"                  value: example value 2\\n\" +\n                \"      deprecated: true\\n\";\n        assertEquals(expectedYAML, extractedYAML);\n    }\n\n    @Test(description = \"reads the pet resource from sample\")\n    public void testCompletePetResource() throws IOException {\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /pet/findByTags:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Finds Pets by tags\\n\" +\n                \"      description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\\n\" +\n                \"      operationId: findPetsByTags\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: tags\\n\" +\n                \"        in: query\\n\" +\n                \"        description: Tags to filter by\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: Pets matching criteria\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Invalid tag value\\n\" +\n                \"      deprecated: true\\n\" +\n                \"  /pet/findByCategory/{category}:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Finds Pets by category\\n\" +\n                \"      operationId: findPetsByCategory\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: category\\n\" +\n                \"        in: path\\n\" +\n                \"        description: Category value that need to be considered for filter\\n\" +\n                \"        required: true\\n\" +\n                \"        style: matrix\\n\" +\n                \"        schema:\\n\" +\n                \"          $ref: \\\"#/components/schemas/Category\\\"\\n\" +\n                \"      - name: skip\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"      - name: limit\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Invalid category value\\n\" +\n                \"  /pet/{petId}:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Find pet by ID\\n\" +\n                \"      description: Returns a pet when 0 < ID <= 10.  ID > 10 or nonintegers will simulate API error conditions\\n\" +\n                \"      operationId: getPetById\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: petId\\n\" +\n                \"        in: path\\n\" +\n                \"        description: ID of pet that needs to be fetched\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: The pet\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"            application/xml:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Invalid ID supplied\\n\" +\n                \"        \\\"404\\\":\\n\" +\n                \"          description: Pet not found\\n\" +\n                \"  /pet/bodynoannotation:\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Add a new pet to the store no annotation\\n\" +\n                \"      operationId: addPetNoAnnotation\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"405\\\":\\n\" +\n                \"          description: Invalid input\\n\" +\n                \"  /pet/bodyid:\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Add a new pet to the store passing an integer with generic parameter annotation\\n\" +\n                \"      operationId: addPetByInteger\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Pet object that needs to be added to the store\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: integer\\n\" +\n                \"              format: int32\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: integer\\n\" +\n                \"              format: int32\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"405\\\":\\n\" +\n                \"          description: Invalid input\\n\" +\n                \"  /pet/bodyidnoannotation:\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Add a new pet to the store passing an integer without parameter annotation\\n\" +\n                \"      operationId: addPetByIntegerNoAnnotation\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: integer\\n\" +\n                \"              format: int32\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: integer\\n\" +\n                \"              format: int32\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"405\\\":\\n\" +\n                \"          description: Invalid input\\n\" +\n                \"  /pet:\\n\" +\n                \"    put:\\n\" +\n                \"      summary: Update an existing pet\\n\" +\n                \"      operationId: updatePet\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Pet object that needs to be added to the store\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Invalid ID supplied\\n\" +\n                \"        \\\"404\\\":\\n\" +\n                \"          description: Pet not found\\n\" +\n                \"        \\\"405\\\":\\n\" +\n                \"          description: Validation exception\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Add a new pet to the store\\n\" +\n                \"      operationId: addPet\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Pet object that needs to be added to the store\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"405\\\":\\n\" +\n                \"          description: Invalid input\\n\" +\n                \"  /pet/findByStatus:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Finds Pets by status\\n\" +\n                \"      description: Multiple status values can be provided with comma separated strings\\n\" +\n                \"      operationId: findPetsByStatus\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: status\\n\" +\n                \"        in: query\\n\" +\n                \"        description: Status values that need to be considered for filter\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      - name: skip\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"      - name: limit\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int32\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Invalid status value\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    Category:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"      xml:\\n\" +\n                \"        name: Category\\n\" +\n                \"    Tag:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"      xml:\\n\" +\n                \"        name: Tag\\n\" +\n                \"    Pet:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        category:\\n\" +\n                \"          $ref: \\\"#/components/schemas/Category\\\"\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        photoUrls:\\n\" +\n                \"          type: array\\n\" +\n                \"          xml:\\n\" +\n                \"            wrapped: true\\n\" +\n                \"          items:\\n\" +\n                \"            type: string\\n\" +\n                \"            xml:\\n\" +\n                \"              name: photoUrl\\n\" +\n                \"        tags:\\n\" +\n                \"          type: array\\n\" +\n                \"          xml:\\n\" +\n                \"            wrapped: true\\n\" +\n                \"          items:\\n\" +\n                \"            $ref: \\\"#/components/schemas/Tag\\\"\\n\" +\n                \"        status:\\n\" +\n                \"          type: string\\n\" +\n                \"          description: pet status in the store\\n\" +\n                \"          enum:\\n\" +\n                \"          - available,pending,sold\\n\" +\n                \"      xml:\\n\" +\n                \"        name: Pet\";\n\n        compareAsYaml(PetResource.class, expectedYAML);\n        compareAsYaml(PetResourceSlashesinPath.class, expectedYAML);\n\n    }\n\n    @Test(description = \"reads the resource with generic response from sample\")\n    public void testGenericResponseResource() throws IOException {\n        String yaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Returns a list of somethings\\n\" +\n                \"      operationId: getSomethings\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SomethingResponse\\\"\\n\" +\n                \"  /overridden:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Returns a list of somethings\\n\" +\n                \"      operationId: getSomethingsOverridden\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Something\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    SomethingResponse:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        data:\\n\" +\n                \"          $ref: \\\"#/components/schemas/DataSomething\\\"\\n\" +\n                \"    DataSomething:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        items:\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            $ref: \\\"#/components/schemas/Something\\\"\\n\" +\n                \"    Something:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: string\\n\";\n        compareAsYaml(GenericResponsesResource.class, yaml);\n    }\n\n    @Test(description = \"reads the user resource from sample\")\n    public void testCompleteUserResource() throws IOException {\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /user:\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Create user\\n\" +\n                \"      description: This can only be done by the logged in user.\\n\" +\n                \"      operationId: createUser\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Created user object\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            'application/json': {}\\n\" +\n                \"            'application/xml': {}\\n\" +\n                \"  /user/createWithArray:\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Creates list of users with given input array\\n\" +\n                \"      operationId: createUsersWithArrayInput\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: List of user object\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: array\\n\" +\n                \"              items:\\n\" +\n                \"                $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            'application/json': {}\\n\" +\n                \"            'application/xml': {}\\n\" +\n                \"  /user/createWithList:\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Creates list of users with given input array\\n\" +\n                \"      operationId: createUsersWithListInput\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: List of user object\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: array\\n\" +\n                \"              items:\\n\" +\n                \"                $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            'application/json': {}\\n\" +\n                \"            'application/xml': {}\\n\" +\n                \"  /user/{username}:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Get user by user name\\n\" +\n                \"      operationId: getUserByName\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: username\\n\" +\n                \"        in: path\\n\" +\n                \"        description: 'The name that needs to be fetched. Use user1 for testing. '\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: The user\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: User not found\\n\" +\n                \"    put:\\n\" +\n                \"      summary: Updated user\\n\" +\n                \"      description: This can only be done by the logged in user.\\n\" +\n                \"      operationId: updateUser\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: username\\n\" +\n                \"        in: path\\n\" +\n                \"        description: name that need to be deleted\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"        examples:\\n\" +\n                \"          example2:\\n\" +\n                \"            summary: Summary example 2\\n\" +\n                \"            description: example2\\n\" +\n                \"            value: example2\\n\" +\n                \"            externalValue: external value 2\\n\" +\n                \"          example1:\\n\" +\n                \"            summary: Summary example 1\\n\" +\n                \"            description: example1\\n\" +\n                \"            value: example1\\n\" +\n                \"            externalValue: external value 1\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Updated user object\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: user updated\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Invalid user supplied\\n\" +\n                \"        \\\"404\\\":\\n\" +\n                \"          description: User not found\\n\" +\n                \"    delete:\\n\" +\n                \"      summary: Delete user\\n\" +\n                \"      description: This can only be done by the logged in user.\\n\" +\n                \"      operationId: deleteUser\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: username\\n\" +\n                \"        in: path\\n\" +\n                \"        description: The name that needs to be deleted\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: user deteled\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Invalid username supplied\\n\" +\n                \"        \\\"404\\\":\\n\" +\n                \"          description: User not found\\n\" +\n                \"  /user/login:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Logs user into the system\\n\" +\n                \"      operationId: loginUser\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: username\\n\" +\n                \"        in: query\\n\" +\n                \"        description: The user name for login\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      - name: password\\n\" +\n                \"        in: query\\n\" +\n                \"        description: The password for login in clear text\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: Successfully logged in\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\\n\" +\n                \"            application/xml:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: string\\n\" +\n                \"        \\\"400\\\":\\n\" +\n                \"          description: Invalid username/password supplied\\n\" +\n                \"  /user/logout:\\n\" +\n                \"    get:\\n\" +\n                \"      summary: Logs out current logged in user session\\n\" +\n                \"      operationId: logoutUser\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            'application/json': {}\\n\" +\n                \"            'application/xml': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    User:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        username:\\n\" +\n                \"          type: string\\n\" +\n                \"        firstName:\\n\" +\n                \"          type: string\\n\" +\n                \"        lastName:\\n\" +\n                \"          type: string\\n\" +\n                \"        email:\\n\" +\n                \"          type: string\\n\" +\n                \"        password:\\n\" +\n                \"          type: string\\n\" +\n                \"        phone:\\n\" +\n                \"          type: string\\n\" +\n                \"        userStatus:\\n\" +\n                \"          type: integer\\n\" +\n                \"          description: User Status\\n\" +\n                \"          format: int32\\n\" +\n                \"      xml:\\n\" +\n                \"        name: User\";\n        compareAsYaml(UserResource.class, expectedYAML);\n    }\n\n    @Test(description = \"reads the simple user resource from sample\")\n    public void testSimpleUserResource() throws IOException {\n\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /user:\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Create user\\n\" +\n                \"      description: This can only be done by the logged in user.\\n\" +\n                \"      operationId: createUser\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Created user object\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            'application/json': {}\\n\" +\n                \"            'application/xml': {}\\n\" +\n                \"  /user/createUserWithReturnType:\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Create user with return type\\n\" +\n                \"      description: This can only be done by the logged in user.\\n\" +\n                \"      operationId: createUserWithReturnType\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Created user object\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"            application/xml:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"  /user/createUserWithResponseAnnotation:\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Create user with response annotation\\n\" +\n                \"      description: This can only be done by the logged in user.\\n\" +\n                \"      operationId: createUserWithResponseAnnotation\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Created user object\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: aaa\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"            application/xml:\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"  /user/createUserWithReturnTypeAndResponseAnnotation:\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Create user with return type and response annotation\\n\" +\n                \"      description: This can only be done by the logged in user.\\n\" +\n                \"      operationId: createUserWithReturnTypeAndResponseAnnotation\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Created user object\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: aaa\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    User:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        username:\\n\" +\n                \"          type: string\\n\" +\n                \"        firstName:\\n\" +\n                \"          type: string\\n\" +\n                \"        lastName:\\n\" +\n                \"          type: string\\n\" +\n                \"        email:\\n\" +\n                \"          type: string\\n\" +\n                \"        password:\\n\" +\n                \"          type: string\\n\" +\n                \"        phone:\\n\" +\n                \"          type: string\\n\" +\n                \"        userStatus:\\n\" +\n                \"          type: integer\\n\" +\n                \"          description: User Status\\n\" +\n                \"          format: int32\\n\" +\n                \"      xml:\\n\" +\n                \"        name: User\";\n        compareAsYaml(SimpleUserResource.class, expectedYAML);\n    }\n\n    @Test(description = \"reads and skips the hidden user resource\")\n    public void testHiddenUserResource() {\n        String openApiYAML = readIntoYaml(HiddenUserResource.class);\n        assertEquals(openApiYAML, \"openapi: 3.0.1\\n\");\n    }\n\n    @Test(description = \"reads and skips the hidden user resource\")\n    public void testHiddenAnnotatedUserResource() throws IOException {\n        String openApiYAML = readIntoYaml(HiddenAnnotatedUserResource.class);\n        assertEquals(openApiYAML, \"openapi: 3.0.1\\n\");\n        compareAsYaml(HiddenAnnotatedUserResource.HiddenAnnotatedUserResourceMethodAndData.class, \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /user/2:\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Create user\\n\" +\n                \"      description: This can only be done by the logged in user.\\n\" +\n                \"      operationId: createUserWithHiddenBeanProperty\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Created user object\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/UserResourceBean\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            'application/json': {}\\n\" +\n                \"            'application/xml': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    UserResourceBean:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        foo:\\n\" +\n                \"          type: string\");\n\n    }\n\n    @Test\n    public void testSimpleGetOperationWithSecurity() {\n\n        String openApiYAML = readIntoYaml(SimpleGetOperationWithSecurity.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"      security:\\n\" +\n                \"      - petstore-auth:\\n\" +\n                \"        - write:pets\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(expectedYAML, extractedYAML);\n    }\n\n    static class SimpleGetOperationWithSecurity {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex\",\n                operationId = \"getWithNoParameters\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                },\n                security = @SecurityRequirement(\n                        name = \"petstore-auth\",\n                        scopes = \"write:pets\"))\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    @Test\n    public void testSimpleGetOperationWithMultipleSecurity() {\n\n        String openApiYAML = readIntoYaml(SimpleGetOperationWithMultipleSecurityScopes.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"      security:\\n\" +\n                \"      - petstore-auth:\\n\" +\n                \"        - write:pets\\n\" +\n                \"        - read:pets\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class SimpleGetOperationWithMultipleSecurityScopes {\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex\",\n                operationId = \"getWithNoParameters\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                },\n                security = @SecurityRequirement(\n                        name = \"petstore-auth\",\n                        scopes = {\"write:pets\", \"read:pets\"}))\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    @Test\n    public void testSimpleGetOperationWithMultipleSecurityAnnotations() {\n\n        String openApiYAML = readIntoYaml(SimpleGetOperationWithMultipleSecurityAnnotations.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation\\n\" +\n                \"      description: Defines a simple get operation with no inputs and a complex\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"      security:\\n\" +\n                \"      - review-auth:\\n\" +\n                \"        - write:review\\n\" +\n                \"      - petstore-auth:\\n\" +\n                \"        - write:pets\\n\" +\n                \"        - read:pets\\n\" +\n                \"      - api_key: []\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class SimpleGetOperationWithMultipleSecurityAnnotations {\n        @SecurityRequirement(name = \"review-auth\", scopes = {\"write:review\"})\n        @Operation(\n                summary = \"Simple get operation\",\n                description = \"Defines a simple get operation with no inputs and a complex\",\n                operationId = \"getWithNoParameters\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                },\n                security = {@SecurityRequirement(\n                        name = \"petstore-auth\",\n                        scopes = {\"write:pets\", \"read:pets\"}),\n                        @SecurityRequirement(\n                                name = \"api_key\",\n                                scopes = {}),})\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n\n    @Test\n    public void testSimpleDeprecatedGetOperation() {\n        String openApiYAML = readIntoYaml(SimpleDeprecatedGetOperationTest.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Deprecated get operation\\n\" +\n                \"      description: Defines a deprecated get operation with no inputs and a complex\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"      deprecated: true\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    static class SimpleDeprecatedGetOperationTest {\n        @Operation(\n                summary = \"Deprecated get operation\",\n                description = \"Defines a deprecated get operation with no inputs and a complex\",\n                operationId = \"getWithNoParameters\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                }\n        )\n        @GET\n        @Path(\"/path\")\n        @Deprecated\n        public void deprecatedGet() {\n        }\n    }\n\n    @Test\n    public void testSimpleGetOperationInDeprecatedClass() {\n        String openApiYAML = readIntoYaml(DeprecatedSimpleGetOperationTest.class);\n        int start = openApiYAML.indexOf(\"get:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYAML = \"get:\\n\" +\n                \"      summary: Simple get operation in deprecated class\\n\" +\n                \"      description: Defines a simple get operation in a deprecated class with no inputs\\n\" +\n                \"      operationId: getWithNoParameters\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"200\\\":\\n\" +\n                \"          description: voila!\\n\" +\n                \"      deprecated: true\";\n        String extractedYAML = openApiYAML.substring(start, end);\n\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    @Deprecated\n    static class DeprecatedSimpleGetOperationTest {\n        @Operation(\n                summary = \"Simple get operation in deprecated class\",\n                description = \"Defines a simple get operation in a deprecated class with no inputs\",\n                operationId = \"getWithNoParameters\",\n                responses = {\n                        @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"voila!\")\n                }\n        )\n        @GET\n        @Path(\"/path\")\n        public void simpleGet() {\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/operations/MergedOperationTest.java",
    "content": "package io.swagger.v3.jaxrs2.annotations.operations;\n\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport org.testng.annotations.Test;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.HeaderParam;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class MergedOperationTest extends AbstractAnnotationTest {\n    @Test(description = \"shows a response when no annotation is present\")\n    public void testUnannotatedMethod() {\n        String yaml = readIntoYaml(UnannotatedMethodClass.class);\n        String expectedYaml = \"openapi: 3.0.1\\n\";\n        assertEquals(yaml, expectedYaml);\n    }\n\n    static class UnannotatedMethodClass {\n        @GET\n        public SimpleResponse getSimpleResponse() {\n            return null;\n        }\n    }\n\n    static class SimpleResponse {\n        private String id;\n    }\n\n    @Test(description = \"shows how a method with parameters and no special annotations is processed\")\n    public void testAnnotatedParameters() {\n        String yaml = readIntoYaml(MethodWithParameters.class);\n\n        assertEquals(yaml,\n                \"openapi: 3.0.1\\n\" +\n                        \"paths:\\n\" +\n                        \"  /findAll:\\n\" +\n                        \"    get:\\n\" +\n                        \"      description: method with parameters\\n\" +\n                        \"      operationId: getSimpleResponseWithParameters\\n\" +\n                        \"      parameters:\\n\" +\n                        \"      - name: id\\n\" +\n                        \"        in: query\\n\" +\n                        \"        schema:\\n\" +\n                        \"          type: string\\n\" +\n                        \"      - name: x-authorized-by\\n\" +\n                        \"        in: header\\n\" +\n                        \"        schema:\\n\" +\n                        \"          type: array\\n\" +\n                        \"          items:\\n\" +\n                        \"            type: string\\n\" +\n                        \"      responses:\\n\" +\n                        \"        default:\\n\" +\n                        \"          description: default response\\n\" +\n                        \"          content:\\n\" +\n                        \"            '*/*':\\n\" +\n                        \"              schema:\\n\" +\n                        \"                $ref: \\\"#/components/schemas/SimpleResponse\\\"\\n\" +\n                        \"components:\\n\" +\n                        \"  schemas:\\n\" +\n                        \"    SimpleResponse:\\n\" +\n                        \"      type: object\\n\");\n    }\n\n    static class MethodWithParameters {\n        @GET\n        @Operation(description = \"method with parameters\")\n        @Path(\"/findAll\")\n        public SimpleResponse getSimpleResponseWithParameters(\n                @QueryParam(\"id\") String id,\n                @HeaderParam(\"x-authorized-by\") String[] auth) {\n            return null;\n        }\n    }\n\n    @Test(description = \"shows how annotations can decorate an operation\")\n    public void testPartiallyAnnotatedMethod() {\n        String yaml = readIntoYaml(MethodWithPartialAnnotation.class);\n        String expectedYaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /findAll:\\n\" +\n                \"    get:\\n\" +\n                \"      description: returns a value\\n\" +\n                \"      operationId: getSimpleResponseWithParameters\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: id\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          pattern: \\\"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\\"\\n\" +\n                \"          type: string\\n\" +\n                \"          description: a GUID for the user in uuid-v4 format\\n\" +\n                \"          format: uuid\\n\" +\n                \"      - name: x-authorized-by\\n\" +\n                \"        in: header\\n\" +\n                \"        schema:\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SimpleResponse\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    SimpleResponse:\\n\" +\n                \"      type: object\\n\";\n\n        assertEquals(yaml, expectedYaml);\n    }\n\n    static class MethodWithPartialAnnotation {\n        @GET\n        @Operation(description = \"returns a value\")\n        @Path(\"/findAll\")\n        public SimpleResponse getSimpleResponseWithParameters(\n                @Schema(\n                        description = \"a GUID for the user in uuid-v4 format\",\n                        required = true,\n                        format = \"uuid\",\n                        pattern = \"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\")\n                @QueryParam(\"id\") String id,\n                @HeaderParam(\"x-authorized-by\") String[] auth) {\n            return null;\n        }\n    }\n\n    @Test(description = \"shows how a request body is passed\")\n    public void testRequestBody() {\n        String yaml = readIntoYaml(MethodWithRequestBody.class);\n        String expectedYaml = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /add:\\n\" +\n                \"    post:\\n\" +\n                \"      description: receives a body\\n\" +\n                \"      operationId: addValue\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/InputValue\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        \\\"201\\\":\\n\" +\n                \"          description: value successfully processed\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    InputValue:\\n\" +\n                \"      type: object\\n\";\n\n        assertEquals(yaml, expectedYaml);\n    }\n\n    static class MethodWithRequestBody {\n        @POST\n        @Operation(description = \"receives a body\",\n                responses = @ApiResponse(\n                        responseCode = \"201\",\n                        description = \"value successfully processed\")\n        )\n        @Path(\"/add\")\n        public void addValue(InputValue input) {\n        }\n    }\n\n    static class InputValue {\n        private Long id;\n        private String name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/parameters/ParametersTest.java",
    "content": "package io.swagger.v3.jaxrs2.annotations.parameters;\n\nimport io.swagger.v3.jaxrs2.Reader;\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport io.swagger.v3.jaxrs2.resources.ResourceWithJacksonBean;\nimport io.swagger.v3.jaxrs2.resources.ResourceWithKnownInjections;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.testng.annotations.Test;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport java.util.List;\nimport java.util.stream.Collectors;\nimport java.util.stream.Stream;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\n\npublic class ParametersTest extends AbstractAnnotationTest {\n\n    @Test(description = \"scan class level and field level annotations\")\n    public void scanClassAndFieldLevelAnnotations() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(ResourceWithKnownInjections.class);\n        List<io.swagger.v3.oas.models.parameters.Parameter> resourceParameters = openAPI.getPaths().get(\"/resource/{id}\").getGet().getParameters();\n        assertNotNull(resourceParameters);\n        assertEquals(resourceParameters.size(), 3);\n        assertEquals(resourceParameters.get(0).getName(), \"id\");\n        assertEquals(resourceParameters.get(1).getName(), \"fieldParam\");\n        assertEquals(resourceParameters.get(2).getName(), \"methodParam\");\n    }\n\n    @Test\n    public void testParameters() {\n        String openApiYAML = readIntoYaml(ParametersTest.SimpleOperations.class);\n        int start = openApiYAML.indexOf(\"/test:\");\n        int end = openApiYAML.length() - 1;\n        String extractedYAML = openApiYAML.substring(start, end);\n        String expectedYAML = \"/test:\\n\" +\n                \"    post:\\n\" +\n                \"      description: \\\"subscribes a client to updates relevant to the requestor's account,\\\\\\n\" +\n                \"        \\\\ as identified by the input token.  The supplied url will be used as the\\\\\\n\" +\n                \"        \\\\ delivery address for response payloads\\\"\\n\" +\n                \"      operationId: subscribe\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: subscriptionId\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        style: simple\\n\" +\n                \"        schema:\\n\" +\n                \"          $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"      - name: formId\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"        example: Example\\n\" +\n                \"      - name: explodeFalse\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        explode: false\\n\" +\n                \"        schema:\\n\" +\n                \"          $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"      - name: explodeTrue\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        explode: true\\n\" +\n                \"        schema:\\n\" +\n                \"          $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"      - name: explodeAvoiding\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"          description: the generated id\\n\" +\n                \"          format: id\\n\" +\n                \"          readOnly: true\\n\" +\n                \"      - name: arrayParameter\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        explode: true\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: number\\n\" +\n                \"              description: the generated id\\n\" +\n                \"              readOnly: true\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: number\\n\" +\n                \"              description: the generated id\\n\" +\n                \"              readOnly: true\\n\" +\n                \"      - name: arrayParameterImplementation\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        explode: true\\n\" +\n                \"        schema:\\n\" +\n                \"          maxItems: 10\\n\" +\n                \"          minItems: 1\\n\" +\n                \"          uniqueItems: true\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"      - name: arrayParameterImplementation2\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        explode: true\\n\" +\n                \"        schema:\\n\" +\n                \"          $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: test description\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    SubscriptionResponse:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        subscriptionId:\\n\" +\n                \"          type: string\";\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    @Test\n    public void testArraySchemaParameters() {\n        String openApiYAML = readIntoYaml(ParametersTest.ArraySchemaOperations.class);\n        int start = openApiYAML.indexOf(\"/test:\");\n        int end = openApiYAML.length() - 1;\n        String extractedYAML = openApiYAML.substring(start, end);\n        String expectedYAML = \"/test:\\n\" +\n                \"    post:\\n\" +\n                \"      description: \\\"subscribes a client to updates relevant to the requestor's account,\\\\\\n\" +\n                \"        \\\\ as identified by the input token.  The supplied url will be used as the\\\\\\n\" +\n                \"        \\\\ delivery address for response payloads\\\"\\n\" +\n                \"      operationId: subscribe\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: arrayParameter\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        explode: true\\n\" +\n                \"        schema:\\n\" +\n                \"          maxItems: 10\\n\" +\n                \"          minItems: 1\\n\" +\n                \"          uniqueItems: true\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: test description\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    SubscriptionResponse:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        subscriptionId:\\n\" +\n                \"          type: string\";\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    @Test\n    public void testRepeatableParameters() {\n        String openApiYAML = readIntoYaml(ParametersTest.RepeatableParametersOperations.class);\n        int start = openApiYAML.indexOf(\"/test:\");\n        int end = openApiYAML.length() - 1;\n        String extractedYAML = openApiYAML.substring(start, end);\n        String expectedYAML = \"/test:\\n\" +\n                \"    post:\\n\" +\n                \"      description: \\\"subscribes a client to updates relevant to the requestor's account,\\\\\\n\" +\n                \"        \\\\ as identified by the input token.  The supplied url will be used as the\\\\\\n\" +\n                \"        \\\\ delivery address for response payloads\\\"\\n\" +\n                \"      operationId: subscribe\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: subscriptionId\\n\" +\n                \"        in: path\\n\" +\n                \"        required: true\\n\" +\n                \"        style: simple\\n\" +\n                \"        schema:\\n\" +\n                \"          $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"      - name: formId\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"        example: Example\\n\" +\n                \"      - name: explodeFalse\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        explode: false\\n\" +\n                \"        schema:\\n\" +\n                \"          $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"      - name: explodeTrue\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        explode: true\\n\" +\n                \"        schema:\\n\" +\n                \"          $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"      - name: explodeAvoiding\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"          description: the generated id\\n\" +\n                \"          format: id\\n\" +\n                \"          readOnly: true\\n\" +\n                \"      - name: arrayParameter\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        explode: true\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: number\\n\" +\n                \"              description: the generated id\\n\" +\n                \"              readOnly: true\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: number\\n\" +\n                \"              description: the generated id\\n\" +\n                \"              readOnly: true\\n\" +\n                \"      - name: arrayParameterImplementation\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        explode: true\\n\" +\n                \"        schema:\\n\" +\n                \"          maxItems: 10\\n\" +\n                \"          minItems: 1\\n\" +\n                \"          uniqueItems: true\\n\" +\n                \"          type: array\\n\" +\n                \"          items:\\n\" +\n                \"            $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"      - name: arrayParameterImplementation2\\n\" +\n                \"        in: query\\n\" +\n                \"        required: true\\n\" +\n                \"        explode: true\\n\" +\n                \"        schema:\\n\" +\n                \"          $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: test description\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/SubscriptionResponse\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    SubscriptionResponse:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        subscriptionId:\\n\" +\n                \"          type: string\";\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    @Test(description = \"JsonUnwrapped, JsonIgnore, JsonValue should be honoured\")\n    public void testJacksonFeatures() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(ResourceWithJacksonBean.class);\n        io.swagger.v3.oas.models.media.Schema o = openAPI.getComponents().getSchemas().get(\"JacksonBean\");\n\n        assertEquals(o.getProperties().keySet(), Stream.of(\"identity\", \"bean\", \"code\", \"message\",\n                \"precodesuf\", \"premessagesuf\").collect(Collectors.toSet()));\n    }\n\n    static class SimpleOperations {\n        @Path(\"/test\")\n        @POST\n        @Operation(\n                operationId = \"subscribe\",\n                description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                        \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n                parameters = {\n                        @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n                                schema = @Schema(implementation = ParametersTest.SubscriptionResponse.class), style = ParameterStyle.SIMPLE),\n                        @Parameter(in = ParameterIn.QUERY, name = \"formId\", required = true,\n                                example = \"Example\"),\n                        @Parameter(in = ParameterIn.QUERY, name = \"explodeFalse\", required = true, explode = Explode.FALSE,\n                                schema = @Schema(implementation = ParametersTest.SubscriptionResponse.class)),\n                        @Parameter(in = ParameterIn.QUERY, name = \"explodeTrue\", required = true, explode = Explode.TRUE,\n                                schema = @Schema(implementation = ParametersTest.SubscriptionResponse.class)),\n                        @Parameter(in = ParameterIn.QUERY, name = \"explodeAvoiding\", required = true, explode = Explode.TRUE,\n                                schema = @Schema(\n                                        type = \"int\",\n                                        format = \"id\",\n                                        description = \"the generated id\",\n                                        accessMode = Schema.AccessMode.READ_ONLY\n                                )),\n                        @Parameter(in = ParameterIn.QUERY, name = \"arrayParameter\", required = true, explode = Explode.TRUE,\n                                array = @ArraySchema(maxItems = 10, minItems = 1,\n                                        schema = @Schema(implementation = ParametersTest.SubscriptionResponse.class),\n                                        uniqueItems = true\n                                )\n                                ,\n                                schema = @Schema(\n                                        type = \"int\",\n                                        format = \"id\",\n                                        description = \"the generated id\",\n                                        accessMode = Schema.AccessMode.READ_ONLY),\n                                content = @Content(schema = @Schema(type = \"number\",\n                                        description = \"the generated id\",\n                                        accessMode = Schema.AccessMode.READ_ONLY))\n                        ),\n                        @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation\", required = true, explode = Explode.TRUE,\n                                array = @ArraySchema(maxItems = 10, minItems = 1,\n                                        schema = @Schema(implementation = ParametersTest.SubscriptionResponse.class),\n                                        uniqueItems = true\n                                )\n                        ),\n                        @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation2\", required = true, explode = Explode.TRUE,\n                                schema = @Schema(implementation = ParametersTest.SubscriptionResponse.class))\n\n                },\n                responses = {\n                        @ApiResponse(\n                                description = \"test description\", content = @Content(\n                                mediaType = \"*/*\",\n                                schema =\n                                @Schema(\n                                        implementation = ParametersTest.SubscriptionResponse.class)\n                        ))\n                })\n        @Consumes({\"application/json\", \"application/xml\"})\n        public ParametersTest.SubscriptionResponse subscribe() {\n            return null;\n        }\n    }\n\n    static class ArraySchemaOperations {\n        @Path(\"/test\")\n        @POST\n        @Operation(\n                operationId = \"subscribe\",\n                description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                        \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n                parameters = {\n                        @Parameter(in = ParameterIn.QUERY, name = \"arrayParameter\", required = true, explode = Explode.TRUE,\n                                array = @ArraySchema(maxItems = 10, minItems = 1,\n                                        schema = @Schema(implementation = ParametersTest.SubscriptionResponse.class),\n                                        uniqueItems = true\n                                )\n                        ),\n                },\n                responses = {\n                        @ApiResponse(\n                                description = \"test description\", content = @Content(\n                                mediaType = \"*/*\",\n                                schema =\n                                @Schema(\n                                        implementation = ParametersTest.SubscriptionResponse.class)\n                        ))\n                })\n        @Consumes({\"application/json\", \"application/xml\"})\n        public ParametersTest.SubscriptionResponse subscribe() {\n            return null;\n        }\n    }\n\n    static class RepeatableParametersOperations {\n        @Path(\"/test\")\n        @POST\n        @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n                schema = @Schema(implementation = ParametersTest.SubscriptionResponse.class), style = ParameterStyle.SIMPLE)\n        @Parameter(in = ParameterIn.QUERY, name = \"formId\", required = true,\n                example = \"Example\")\n        @Parameter(in = ParameterIn.QUERY, name = \"explodeFalse\", required = true, explode = Explode.FALSE,\n                schema = @Schema(implementation = ParametersTest.SubscriptionResponse.class))\n        @Parameter(in = ParameterIn.QUERY, name = \"explodeTrue\", required = true, explode = Explode.TRUE,\n                schema = @Schema(implementation = ParametersTest.SubscriptionResponse.class))\n        @Parameter(in = ParameterIn.QUERY, name = \"explodeAvoiding\", required = true, explode = Explode.TRUE,\n                schema = @Schema(\n                        type = \"int\",\n                        format = \"id\",\n                        description = \"the generated id\",\n                        accessMode = Schema.AccessMode.READ_ONLY\n                ))\n        @Parameter(in = ParameterIn.QUERY, name = \"arrayParameter\", required = true, explode = Explode.TRUE,\n                array = @ArraySchema(maxItems = 10, minItems = 1,\n                        schema = @Schema(implementation = ParametersTest.SubscriptionResponse.class),\n                        uniqueItems = true\n                )\n                ,\n                schema = @Schema(\n                        type = \"int\",\n                        format = \"id\",\n                        description = \"the generated id\",\n                        accessMode = Schema.AccessMode.READ_ONLY),\n                content = @Content(schema = @Schema(type = \"number\",\n                        description = \"the generated id\",\n                        accessMode = Schema.AccessMode.READ_ONLY))\n        )\n        @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation\", required = true, explode = Explode.TRUE,\n                array = @ArraySchema(maxItems = 10, minItems = 1,\n                        schema = @Schema(implementation = ParametersTest.SubscriptionResponse.class),\n                        uniqueItems = true\n                )\n        )\n        @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation2\", required = true, explode = Explode.TRUE,\n                schema = @Schema(implementation = ParametersTest.SubscriptionResponse.class))\n        @Operation(\n                operationId = \"subscribe\",\n                description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                        \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n                responses = {\n                        @ApiResponse(\n                                description = \"test description\", content = @Content(\n                                mediaType = \"*/*\",\n                                schema =\n                                @Schema(\n                                        implementation = ParametersTest.SubscriptionResponse.class)\n                        ))\n                })\n        @Consumes({\"application/json\", \"application/xml\"})\n        public ParametersTest.SubscriptionResponse subscribe() {\n            return null;\n        }\n    }\n\n    static class SubscriptionResponse {\n        public String subscriptionId;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/pathItems/OperationsWithLinksTest.java",
    "content": "package io.swagger.v3.jaxrs2.annotations.pathItems;\n\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.links.Link;\nimport io.swagger.v3.oas.annotations.links.LinkParameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport org.testng.annotations.Test;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport java.io.IOException;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class OperationsWithLinksTest extends AbstractAnnotationTest {\n\n    @Test(description = \"Shows creating simple links\")\n    public void createOperationWithLinks() throws IOException {\n\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /users:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getUser\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: userId\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: test description\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"          links:\\n\" +\n                \"            address:\\n\" +\n                \"              operationId: getAddress\\n\" +\n                \"              parameters:\\n\" +\n                \"                userId: $request.query.userId\\n\" +\n                \"  /addresses:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getAddress\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: userId\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: test description\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Address\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    User:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: string\\n\" +\n                \"        username:\\n\" +\n                \"          type: string\\n\" +\n                \"    Address:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        street:\\n\" +\n                \"          type: string\\n\" +\n                \"        zip:\\n\" +\n                \"          type: string\";\n\n        compareAsYaml(ClassWithOperationAndLinks.class, expectedYAML);\n    }\n\n    @Test(description = \"Shows creating simple links with request body\")\n    public void createOperationWithLinksAndRequestBody() throws IOException {\n\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /users:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getUser\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: userId\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: test description\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"          links:\\n\" +\n                \"            address:\\n\" +\n                \"              operationId: addAddress\\n\" +\n                \"              requestBody: $request.query.userId\\n\" +\n                \"  /addresses:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: addAddress\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: userId\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              type: string\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: test description\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/Address\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    User:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: string\\n\" +\n                \"        username:\\n\" +\n                \"          type: string\\n\" +\n                \"    Address:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        street:\\n\" +\n                \"          type: string\\n\" +\n                \"        zip:\\n\" +\n                \"          type: string\";\n\n        compareAsYaml(ClassWithOperationAndLinksWithRequestBody.class, expectedYAML);\n    }\n\n    @Test(description = \"Shows creating operation response without annotation\")\n    public void createOperationWithResponseNoAnnotation() throws IOException {\n\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /users:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getUser\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: userId\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    User:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: string\\n\" +\n                \"        username:\\n\" +\n                \"          type: string\";\n\n        compareAsYaml(ClassWithResponseNoAnnotation.class, expectedYAML);\n    }\n\n    static class ClassWithOperationAndLinks {\n        @Path(\"/users\")\n        @Operation(operationId = \"getUser\",\n                responses = {\n                        @ApiResponse(description = \"test description\",\n                                content = @Content(mediaType = \"*/*\", schema = @Schema(ref = \"#/components/schemas/User\")),\n                                links = {\n                                        @Link(\n                                                name = \"address\",\n                                                operationId = \"getAddress\",\n                                                parameters = @LinkParameter(\n                                                        name = \"userId\",\n                                                        expression = \"$request.query.userId\"))\n                                })}\n        )\n        @GET\n        public User getUser(@QueryParam(\"userId\") String userId) {\n            return null;\n        }\n\n        @Path(\"/addresses\")\n        @Operation(operationId = \"getAddress\",\n\n                responses = {\n                        @ApiResponse(content = @Content(mediaType = \"*/*\",\n                                schema = @Schema(ref = \"#/components/schemas/Address\")),\n                                description = \"test description\")\n                })\n        @GET\n        public Address getAddress(@QueryParam(\"userId\") String userId) {\n            return null;\n        }\n    }\n\n    static class ClassWithOperationAndLinksWithRequestBody {\n        @Path(\"/users\")\n        @Operation(operationId = \"getUser\",\n                responses = {\n                        @ApiResponse(description = \"test description\",\n                                content = @Content(mediaType = \"*/*\", schema = @Schema(ref = \"#/components/schemas/User\")),\n                                links = {\n                                        @Link(\n                                                name = \"address\",\n                                                operationId = \"addAddress\",\n                                                requestBody = \"$request.query.userId\")\n                                })}\n        )\n        @GET\n        public User getUser(@QueryParam(\"userId\") String userId) {\n            return null;\n        }\n\n        @Path(\"/addresses\")\n        @Operation(operationId = \"addAddress\",\n\n                responses = {\n                        @ApiResponse(content = @Content(mediaType = \"*/*\",\n                                schema = @Schema(ref = \"#/components/schemas/Address\")),\n                                description = \"test description\")\n                })\n        @POST\n        public Address addAddress(@RequestBody(description = \"userId\", required = true) String userId) {\n            return null;\n        }\n    }\n\n    static class ClassWithResponseNoAnnotation {\n        @Path(\"/users\")\n        @Operation(operationId = \"getUser\")\n        @GET\n        public User getUser(@QueryParam(\"userId\") String userId) {\n            return null;\n        }\n    }\n\n    static class User {\n        private String id;\n        private String username;\n\n        public String getId() {\n            return id;\n        }\n\n        public void setId(String id) {\n            this.id = id;\n        }\n\n        public String getUsername() {\n            return username;\n        }\n\n        public void setUsername(String username) {\n            this.username = username;\n        }\n    }\n\n    static class Address {\n        private String street;\n        private String zip;\n\n        public String getStreet() {\n            return street;\n        }\n\n        public void setStreet(String street) {\n            this.street = street;\n        }\n\n        public String getZip() {\n            return zip;\n        }\n\n        public void setZip(String zip) {\n            this.zip = zip;\n        }\n    }\n\n    @Test(description = \"Shows creating simple links\")\n    public void createOperationWithLinkReferences() {\n        String openApiYAML = readIntoYaml(ClassWithOperationAndLinkReferences.class);\n        int start = openApiYAML.indexOf(\"/users:\");\n        int end = openApiYAML.length() - 1;\n\n        String expectedYaml = \"/users:\\n\" +\n                \"    get:\\n\" +\n                \"      operationId: getUser\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: userId\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: test description\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*':\\n\" +\n                \"              schema:\\n\" +\n                \"                $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"          links:\\n\" +\n                \"            user:\\n\" +\n                \"              operationId: getUser\\n\" +\n                \"              parameters:\\n\" +\n                \"                userId: $request.query.userId\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    User:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: string\\n\" +\n                \"        username:\\n\" +\n                \"          type: string\";\n        String extractedYAML = openApiYAML.substring(start, end);\n        assertEquals(extractedYAML, expectedYaml);\n    }\n\n    static class ClassWithOperationAndLinkReferences {\n        @Path(\"/users\")\n        @Operation(operationId = \"getUser\",\n                responses = {\n                        @ApiResponse(description = \"test description\",\n                                links = {\n                                        @Link(\n                                                name = \"user\",\n                                                operationId = \"getUser\",\n                                                operationRef = \"#/components/links/MyLink\",\n                                                parameters = @LinkParameter(\n                                                        name = \"userId\",\n                                                        expression = \"$request.query.userId\"))\n                                })}\n        )\n        @GET\n        public User getUser(@QueryParam(\"userId\") String userId) {\n            return null;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/readerListener/ReaderListenerTest.java",
    "content": "package io.swagger.v3.jaxrs2.annotations.readerListener;\n\nimport io.swagger.v3.jaxrs2.Reader;\nimport io.swagger.v3.jaxrs2.resources.ReaderListenerResource;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.testng.annotations.Test;\n\nimport java.util.Collections;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\n\npublic class ReaderListenerTest {\n\n    @Test(description = \"test a readerListener resource\")\n    public void testReaderListener() throws Exception {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(Collections.singleton(ReaderListenerResource.class));\n        assertNotNull(openAPI);\n        assertEquals(openAPI.getTags().get(0).getName(), \"Tag-added-before-read\");\n        assertEquals(openAPI.getTags().get(1).getName(), \"Tag-added-after-read\");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/requests/RequestBodyTest.java",
    "content": "package io.swagger.v3.jaxrs2.annotations.requests;\n\nimport io.swagger.v3.jaxrs2.Reader;\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport io.swagger.v3.jaxrs2.it.resources.MultiPartFileResource;\nimport io.swagger.v3.jaxrs2.it.resources.OctetStreamResource;\nimport io.swagger.v3.jaxrs2.it.resources.UrlEncodedResource;\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.PathItem;\nimport org.testng.annotations.Test;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.DELETE;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.PATCH;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\nimport java.io.IOException;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\n\npublic class RequestBodyTest extends AbstractAnnotationTest {\n\n    private static final String REQUEST_BODY_IN_METHOD = \"RequestBody in Method\";\n    private static final String REQUEST_BODY_IN_PARAMETER = \"Request Body in Param\";\n    private static final String NO_IN_PARAMETER = \"Parameter with no IN\";\n    private static final String REQUEST_BODY_IN_ANNOTATION = \"RequestBody in Annotation\";\n    private static final String USER_PATH = \"/user\";\n\n    @Test(description = \"Returns a request with one RequestBody and multiple parameters\")\n    public void oneRequestBodyMultipleParameters() throws IOException {\n\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /user:\\n\" +\n                \"    put:\\n\" +\n                \"      summary: Modify user\\n\" +\n                \"      description: Modifying user.\\n\" +\n                \"      operationId: methodWithRequestBodyWithoutAnnotation\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Create user\\n\" +\n                \"      description: This can only be done by the logged in user.\\n\" +\n                \"      operationId: methodWithRequestBodyAndTwoParameters\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: name\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      - name: code\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      requestBody:\\n\" +\n                \"        description: Created user object\\n\" +\n                \"        content:\\n\" +\n                \"          '*/*':\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"        required: true\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"    delete:\\n\" +\n                \"      summary: Delete user\\n\" +\n                \"      description: This can only be done by the logged in user.\\n\" +\n                \"      operationId: methodWithoutRequestBodyAndTwoParameters\\n\" +\n                \"      parameters:\\n\" +\n                \"      - name: name\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      - name: code\\n\" +\n                \"        in: query\\n\" +\n                \"        schema:\\n\" +\n                \"          type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"  /pet:\\n\" +\n                \"    put:\\n\" +\n                \"      summary: Modify pet\\n\" +\n                \"      description: Modifying pet.\\n\" +\n                \"      operationId: methodWithRequestBodyWithoutAnnotationAndTwoConsumes\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/User\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"    post:\\n\" +\n                \"      summary: Create pet\\n\" +\n                \"      description: Creating pet.\\n\" +\n                \"      operationId: methodWithTwoRequestBodyWithoutAnnotationAndTwoConsumes\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/json:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"          application/xml:\\n\" +\n                \"            schema:\\n\" +\n                \"              $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"    delete:\\n\" +\n                \"        summary: Delete pet\\n\" +\n                \"        description: Deleting pet.\\n\" +\n                \"        operationId: methodWithOneSimpleRequestBody\\n\" +\n                \"        requestBody:\\n\" +\n                \"          content:\\n\" +\n                \"            application/json:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: integer\\n\" +\n                \"                format: int32\\n\" +\n                \"            application/xml:\\n\" +\n                \"              schema:\\n\" +\n                \"                type: integer\\n\" +\n                \"                format: int32\\n\" +\n                \"        responses:\\n\" +\n                \"          default:\\n\" +\n                \"            description: default response\\n\" +\n                \"            content:\\n\" +\n                \"              '*/*': {}\\n\" +\n                \"components:\\n\" +\n                \"  schemas:\\n\" +\n                \"    User:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        username:\\n\" +\n                \"          type: string\\n\" +\n                \"        firstName:\\n\" +\n                \"          type: string\\n\" +\n                \"        lastName:\\n\" +\n                \"          type: string\\n\" +\n                \"        email:\\n\" +\n                \"          type: string\\n\" +\n                \"        password:\\n\" +\n                \"          type: string\\n\" +\n                \"        phone:\\n\" +\n                \"          type: string\\n\" +\n                \"        userStatus:\\n\" +\n                \"          type: integer\\n\" +\n                \"          description: User Status\\n\" +\n                \"          format: int32\\n\" +\n                \"      xml:\\n\" +\n                \"        name: User\\n\" +\n                \"    Category:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"      xml:\\n\" +\n                \"        name: Category\\n\" +\n                \"    Tag:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"      xml:\\n\" +\n                \"        name: Tag\\n\" +\n                \"    Pet:\\n\" +\n                \"      type: object\\n\" +\n                \"      properties:\\n\" +\n                \"        id:\\n\" +\n                \"          type: integer\\n\" +\n                \"          format: int64\\n\" +\n                \"        category:\\n\" +\n                \"          $ref: \\\"#/components/schemas/Category\\\"\\n\" +\n                \"        name:\\n\" +\n                \"          type: string\\n\" +\n                \"        photoUrls:\\n\" +\n                \"          type: array\\n\" +\n                \"          xml:\\n\" +\n                \"            wrapped: true\\n\" +\n                \"          items:\\n\" +\n                \"            type: string\\n\" +\n                \"            xml:\\n\" +\n                \"              name: photoUrl\\n\" +\n                \"        tags:\\n\" +\n                \"          type: array\\n\" +\n                \"          xml:\\n\" +\n                \"            wrapped: true\\n\" +\n                \"          items:\\n\" +\n                \"            $ref: \\\"#/components/schemas/Tag\\\"\\n\" +\n                \"        status:\\n\" +\n                \"          type: string\\n\" +\n                \"          description: pet status in the store\\n\" +\n                \"          enum:\\n\" +\n                \"          - available,pending,sold\\n\" +\n                \"      xml:\\n\" +\n                \"        name: Pet\";\n\n        compareAsYaml(RequestBodyTest.UserResource.class, expectedYAML);\n    }\n\n    static class UserResource {\n        @POST\n        @Path(\"/user\")\n        @Operation(summary = \"Create user\",\n                description = \"This can only be done by the logged in user.\")\n        public Response methodWithRequestBodyAndTwoParameters(\n                @RequestBody(description = \"Created user object\", required = true,\n                        content = @Content(\n                                schema = @Schema(implementation = User.class))) User user,\n                @QueryParam(\"name\") String name, @QueryParam(\"code\") String code) {\n            return Response.ok().entity(\"\").build();\n        }\n\n        @PUT\n        @Path(\"/user\")\n        @Operation(summary = \"Modify user\",\n                description = \"Modifying user.\")\n        public Response methodWithRequestBodyWithoutAnnotation(\n                User user) {\n            return Response.ok().entity(\"\").build();\n        }\n\n        @DELETE\n        @Path(\"/user\")\n        @Operation(summary = \"Delete user\",\n                description = \"This can only be done by the logged in user.\")\n        public Response methodWithoutRequestBodyAndTwoParameters(\n                @QueryParam(\"name\") String name, @QueryParam(\"code\") String code) {\n            return Response.ok().entity(\"\").build();\n        }\n\n        @PUT\n        @Path(\"/pet\")\n        @Operation(summary = \"Modify pet\",\n                description = \"Modifying pet.\")\n        @Consumes({\"application/json\", \"application/xml\"})\n        public Response methodWithRequestBodyWithoutAnnotationAndTwoConsumes(\n                User user) {\n            return Response.ok().entity(\"\").build();\n        }\n\n        @POST\n        @Path(\"/pet\")\n        @Operation(summary = \"Create pet\",\n                description = \"Creating pet.\")\n        @Consumes({\"application/json\", \"application/xml\"})\n        public Response methodWithTwoRequestBodyWithoutAnnotationAndTwoConsumes(\n                Pet pet, User user) {\n            return Response.ok().entity(\"\").build();\n        }\n\n        @DELETE\n        @Path(\"/pet\")\n        @Operation(summary = \"Delete pet\",\n                description = \"Deleting pet.\")\n        @Consumes({\"application/json\", \"application/xml\"})\n        public Response methodWithOneSimpleRequestBody(int id) {\n            return Response.ok().entity(\"\").build();\n        }\n    }\n\n    @Test(description = \"scan class with requesbody annotation\")\n    public void testRequestBodyAnnotationPriority() {\n        Reader reader = new Reader(new OpenAPI());\n        OpenAPI openAPI = reader.read(RequestBodyResource.class);\n        PathItem userPathItem = openAPI.getPaths().get(USER_PATH);\n        io.swagger.v3.oas.models.parameters.RequestBody getRequestBody = userPathItem.getGet().getRequestBody();\n        assertNotNull(getRequestBody);\n        assertEquals(getRequestBody.getDescription(), REQUEST_BODY_IN_ANNOTATION);\n        io.swagger.v3.oas.models.parameters.RequestBody postRequestBody = userPathItem.getPost().getRequestBody();\n        assertNotNull(postRequestBody);\n        assertEquals(postRequestBody.getDescription(), REQUEST_BODY_IN_ANNOTATION);\n        io.swagger.v3.oas.models.parameters.RequestBody putRequestBody = userPathItem.getPut().getRequestBody();\n        assertNotNull(putRequestBody);\n        assertEquals(putRequestBody.getDescription(), REQUEST_BODY_IN_METHOD);\n        io.swagger.v3.oas.models.parameters.RequestBody deleteRequestBody = userPathItem.getDelete().getRequestBody();\n        assertNotNull(deleteRequestBody);\n        assertEquals(deleteRequestBody.getDescription(), REQUEST_BODY_IN_METHOD);\n        io.swagger.v3.oas.models.parameters.RequestBody patchRequestBody = userPathItem.getPatch().getRequestBody();\n        assertNotNull(patchRequestBody);\n        assertEquals(patchRequestBody.getDescription(), REQUEST_BODY_IN_METHOD);\n\n        userPathItem = openAPI.getPaths().get(USER_PATH + \"/deleteUserMethod_Param_RequestBody\");\n        deleteRequestBody = userPathItem.getDelete().getRequestBody();\n        assertNotNull(deleteRequestBody);\n        assertEquals(deleteRequestBody.getDescription(), REQUEST_BODY_IN_PARAMETER);\n\n        userPathItem = openAPI.getPaths().get(USER_PATH + \"/deleteUserOperation_Method_Param_RequestBody\");\n        deleteRequestBody = userPathItem.getDelete().getRequestBody();\n        assertNotNull(deleteRequestBody);\n        assertEquals(deleteRequestBody.getDescription(), REQUEST_BODY_IN_PARAMETER);\n\n        userPathItem = openAPI.getPaths().get(USER_PATH + \"/deleteUserOperation_RequestBody\");\n        deleteRequestBody = userPathItem.getDelete().getRequestBody();\n        assertNotNull(deleteRequestBody);\n        assertEquals(deleteRequestBody.getDescription(), REQUEST_BODY_IN_PARAMETER);\n\n        userPathItem = openAPI.getPaths().get(USER_PATH + \"/deleteUserOperation_Method_Param\");\n        deleteRequestBody = userPathItem.getDelete().getRequestBody();\n        assertNotNull(deleteRequestBody);\n        assertEquals(deleteRequestBody.getDescription(), REQUEST_BODY_IN_METHOD);\n\n    }\n\n    @Path(\"/user\")\n    static class RequestBodyResource {\n        @GET\n        @Operation(requestBody = @RequestBody(description = \"RequestBody in Annotation\", required = true,\n                content = @Content(schema = @Schema(implementation = User.class))))\n        public User getUser() {\n            return new User();\n        }\n\n        @POST\n        @Operation(summary = \"Create user\",\n                description = \"This can only be done by the logged in user.\",\n                requestBody = @RequestBody(description = \"RequestBody in Annotation\", required = true,\n                        content = @Content(schema = @Schema(implementation = User.class))))\n        public Response createUser(\n                @Parameter(description = \"Parameter with no IN\", required = true) User user) {\n            return Response.ok().entity(\"\").build();\n        }\n\n        @PUT\n        @Operation(summary = \"Update user\",\n                description = \"This can only be done by the logged in user.\")\n        @RequestBody(description = \"RequestBody in Method\", required = true,\n                content = @Content(schema = @Schema(implementation = User.class)))\n        public Response updateUser() {\n            return Response.ok().entity(\"\").build();\n        }\n\n        @DELETE\n        @Operation(summary = \"Delete user\",\n                description = \"This can only be done by the logged in user.\")\n        @RequestBody(description = \"RequestBody in Method\", required = true,\n                content = @Content(schema = @Schema(implementation = User.class)))\n        public Response deleteUser(@Parameter(description = \"Parameter with no IN\", required = true) User user) {\n            return Response.ok().entity(\"\").build();\n        }\n\n        @DELETE\n        @Path(\"/deleteUserMethod_Param_RequestBody\")\n        @Operation(summary = \"Delete user\",\n                description = \"This can only be done by the logged in user.\")\n        @RequestBody(description = \"RequestBody in Method\", required = true,\n                content = @Content(schema = @Schema(implementation = User.class)))\n        public Response deleteUserMethod_Param_RequestBody(\n                @Parameter(description = \"Parameter with no IN\", required = true)\n                @RequestBody(description = \"Request Body in Param\") User user) {\n            return Response.ok().entity(\"\").build();\n        }\n\n        @DELETE\n        @Path(\"/deleteUserOperation_Method_Param_RequestBody\")\n        @Operation(summary = \"Delete user\",\n                description = \"This can only be done by the logged in user.\",\n                requestBody = @RequestBody(description = \"RequestBody in Annotation\", required = true,\n                        content = @Content(schema = @Schema(implementation = User.class))))\n        @RequestBody(description = \"RequestBody in Method\", required = true,\n                content = @Content(schema = @Schema(implementation = User.class)))\n        public Response deleteUserOperation_Method_Param_RequestBody(\n                @Parameter(description = \"Parameter with no IN\", required = true)\n                @RequestBody(description = \"Request Body in Param\") User user) {\n            return Response.ok().entity(\"\").build();\n        }\n\n        @DELETE\n        @Path(\"/deleteUserOperation_Method_Param\")\n        @Operation(summary = \"Delete user\",\n                description = \"This can only be done by the logged in user.\",\n                requestBody = @RequestBody(description = \"RequestBody in Annotation\", required = true,\n                        content = @Content(schema = @Schema(implementation = User.class))))\n        @RequestBody(description = \"RequestBody in Method\", required = true,\n                content = @Content(schema = @Schema(implementation = User.class)))\n        public Response deleteUserOperation_Method_Param(\n                @Parameter(description = \"Parameter with no IN\", required = true) User user) {\n            return Response.ok().entity(\"\").build();\n        }\n\n        @DELETE\n        @Path(\"/deleteUserOperation_RequestBody\")\n        @Operation(summary = \"Delete user\",\n                description = \"This can only be done by the logged in user.\",\n                requestBody = @RequestBody(description = \"RequestBody in Annotation\", required = true,\n                        content = @Content(schema = @Schema(implementation = User.class))))\n        public Response deleteUserOperation_RequestBody(\n                @RequestBody(description = \"Request Body in Param\") User user) {\n            return Response.ok().entity(\"\").build();\n        }\n\n        @PATCH\n        @Operation(summary = \"Modify user\",\n                description = \"This can only be done by the logged in user.\",\n                requestBody = @RequestBody(description = \"RequestBody in Annotation\", required = true,\n                        content = @Content(schema = @Schema(implementation = User.class))))\n        @RequestBody(description = \"RequestBody in Method\", required = true,\n                content = @Content(schema = @Schema(implementation = User.class)))\n        public Response modifyUser() {\n            return Response.ok().entity(\"\").build();\n        }\n\n    }\n\n    @Test(description = \"Test file upload\")\n    public void testFileUploadOctetStream() throws IOException {\n\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /files/attach:\\n\" +\n                \"    put:\\n\" +\n                \"      operationId: putFile\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/octet-stream:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: string\\n\" +\n                \"              format: binary\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json: {}\";\n\n        compareAsYaml(OctetStreamResource.class, expectedYAML);\n    }\n\n    @Test(description = \"Test urlencoded\")\n    public void testUrlEncoded() throws IOException {\n\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /users/add:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: addUser\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          application/x-www-form-urlencoded:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                id:\\n\" +\n                \"                  type: string\\n\" +\n                \"                name:\\n\" +\n                \"                  type: string\\n\" +\n                \"                gender:\\n\" +\n                \"                  type: string\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json: {}\";\n\n        compareAsYaml(UrlEncodedResource.class, expectedYAML);\n    }\n\n    @Test(description = \"Test multipart\")\n    public void testMultiPart() throws IOException {\n\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /files/upload:\\n\" +\n                \"    post:\\n\" +\n                \"      operationId: uploadFile\\n\" +\n                \"      requestBody:\\n\" +\n                \"        content:\\n\" +\n                \"          multipart/form-data:\\n\" +\n                \"            schema:\\n\" +\n                \"              type: object\\n\" +\n                \"              properties:\\n\" +\n                \"                fileIdRenamed:\\n\" +\n                \"                  type: string\\n\" +\n                \"                fileRenamed:\\n\" +\n                \"                  type: string\\n\" +\n                \"                  format: binary\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            application/json: {}\\n\";\n\n        compareAsYaml(MultiPartFileResource.class, expectedYAML);\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/security/SecurityTest.java",
    "content": "package io.swagger.v3.jaxrs2.annotations.security;\n\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport io.swagger.v3.jaxrs2.resources.SecurityResource;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeType;\nimport io.swagger.v3.oas.annotations.info.Info;\nimport io.swagger.v3.oas.annotations.security.OAuthFlow;\nimport io.swagger.v3.oas.annotations.security.OAuthFlows;\nimport io.swagger.v3.oas.annotations.security.OAuthScope;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirementEntry;\nimport io.swagger.v3.oas.annotations.security.SecurityScheme;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class SecurityTest extends AbstractAnnotationTest {\n    @Test\n    public void testSecurityScheme() {\n        String openApiYAML = readIntoYaml(SecurityTest.OAuth2SchemeOnClass.class);\n        int start = openApiYAML.indexOf(\"components:\");\n        String extractedYAML = openApiYAML.substring(start, openApiYAML.length() - 1);\n        String expectedYAML = \"components:\\n\" +\n                \"  securitySchemes:\\n\" +\n                \"    myOauth2Security:\\n\" +\n                \"      type: oauth2\\n\" +\n                \"      in: header\\n\" +\n                \"      flows:\\n\" +\n                \"        implicit:\\n\" +\n                \"          authorizationUrl: http://url.com/auth\\n\" +\n                \"          scopes:\\n\" +\n                \"            write:pets: modify pets in your account\";\n        assertEquals(extractedYAML, expectedYAML);\n\n    }\n\n    @Test\n    public void testSecurityRequirement() throws IOException {\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"paths:\\n\" +\n                \"  /2:\\n\" +\n                \"    get:\\n\" +\n                \"      description: description 2\\n\" +\n                \"      operationId: Operation Id 2\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"      security:\\n\" +\n                \"      - security_key:\\n\" +\n                \"        - write:pets\\n\" +\n                \"        - read:pets\\n\" +\n                \"      - myOauth2Security:\\n\" +\n                \"        - write:pets\\n\" +\n                \"      - security_key2:\\n\" +\n                \"        - write:pets\\n\" +\n                \"        - read:pets\\n\" +\n                \"  /:\\n\" +\n                \"    get:\\n\" +\n                \"      description: description\\n\" +\n                \"      operationId: Operation Id\\n\" +\n                \"      responses:\\n\" +\n                \"        default:\\n\" +\n                \"          description: default response\\n\" +\n                \"          content:\\n\" +\n                \"            '*/*': {}\\n\" +\n                \"      security:\\n\" +\n                \"      - security_key:\\n\" +\n                \"        - write:pets\\n\" +\n                \"        - read:pets\\n\" +\n                \"      - myOauth2Security:\\n\" +\n                \"        - write:pets\\n\" +\n                \"components:\\n\" +\n                \"  securitySchemes:\\n\" +\n                \"    myOauth2Security:\\n\" +\n                \"      type: oauth2\\n\" +\n                \"      description: myOauthSecurity Description\\n\" +\n                \"      in: header\\n\" +\n                \"      flows:\\n\" +\n                \"        implicit:\\n\" +\n                \"          authorizationUrl: http://x.com\\n\" +\n                \"          scopes:\\n\" +\n                \"            write:pets: modify pets in your account\";\n        compareAsYaml(SecurityResource.class, expectedYAML);\n\n    }\n\n    @Test\n    public void testMultipleSecuritySchemes() {\n        String openApiYAML = readIntoYaml(SecurityTest.MultipleSchemesOnClass.class);\n        int start = openApiYAML.indexOf(\"components:\");\n        String extractedYAML = openApiYAML.substring(start, openApiYAML.length() - 1);\n        String expectedYAML = \"components:\\n\" +\n                \"  securitySchemes:\\n\" +\n                \"    apiKey:\\n\" +\n                \"      type: apiKey\\n\" +\n                \"      name: API_KEY\\n\" +\n                \"      in: header\\n\" +\n                \"    myOauth2Security:\\n\" +\n                \"      type: oauth2\\n\" +\n                \"      in: header\\n\" +\n                \"      flows:\\n\" +\n                \"        implicit:\\n\" +\n                \"          authorizationUrl: http://url.com/auth\\n\" +\n                \"          scopes:\\n\" +\n                \"            write:pets: modify pets in your account\";\n        assertEquals(extractedYAML, expectedYAML);\n\n    }\n\n    @Test\n    public void testCombinedSecurityRequirements() {\n        String openApiYAML = readIntoYaml(SecurityTest.CombinedSecurityRequirementsOnClass.class);\n        int start = openApiYAML.indexOf(\"security:\");\n        int end = openApiYAML.indexOf(\"components:\");\n        String extractedYAML = openApiYAML.substring(start, end);\n        String expectedYAML = \"security:\\n\" +\n            \"- api_key: []\\n\" +\n            \"  myOauth2Security: []\\n\";\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    @Test\n    public void testSecurityRequirementAlternatives() {\n        String openApiYAML = readIntoYaml(SecurityRequirementAlternativesOnClass.class);\n        int start = openApiYAML.indexOf(\"security:\");\n        int end = openApiYAML.indexOf(\"components:\");\n        String extractedYAML = openApiYAML.substring(start, end);\n        String expectedYAML = \"security:\\n\" +\n            \"- api_key: []\\n\" +\n            \"- myOauth2Security: []\\n\";\n        assertEquals(extractedYAML, expectedYAML);\n    }\n\n    @Test\n    public void testTicket2767() {\n        String openApiYAML = readIntoYaml(SecurityTest.Ticket2767.class);\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  title: Test\\n\" +\n                \"  version: 1.0-SNAPSHOT\\n\" +\n                \"security:\\n\" +\n                \"- basicAuth: []\\n\" +\n                \"components:\\n\" +\n                \"  securitySchemes:\\n\" +\n                \"    basicAuth:\\n\" +\n                \"      type: http\\n\" +\n                \"      scheme: basic\\n\";\n        assertEquals(openApiYAML, expectedYAML);\n\n    }\n\n    @Test\n    public void testTicket2767_2() {\n        String openApiYAML = readIntoYaml(SecurityTest.Ticket2767_2.class);\n        String expectedYAML = \"openapi: 3.0.1\\n\" +\n                \"info:\\n\" +\n                \"  title: Test\\n\" +\n                \"  version: 1.0-SNAPSHOT\\n\" +\n                \"security:\\n\" +\n                \"- api_key: []\\n\" +\n                \"components:\\n\" +\n                \"  securitySchemes:\\n\" +\n                \"    api_key:\\n\" +\n                \"      type: apiKey\\n\" +\n                \"      name: API_KEY\\n\";\n        assertEquals(openApiYAML, expectedYAML);\n\n    }\n\n    @SecurityScheme(name = \"myOauth2Security\",\n            type = SecuritySchemeType.OAUTH2,\n            in = SecuritySchemeIn.HEADER,\n            flows = @OAuthFlows(\n                    implicit = @OAuthFlow(authorizationUrl = \"http://url.com/auth\",\n                            scopes = @OAuthScope(name = \"write:pets\", description = \"modify pets in your account\"))))\n    static class OAuth2SchemeOnClass {\n\n    }\n\n    @SecurityScheme(name = \"myOauth2Security\",\n            type = SecuritySchemeType.OAUTH2,\n            in = SecuritySchemeIn.HEADER,\n            flows = @OAuthFlows(\n                    implicit = @OAuthFlow(authorizationUrl = \"http://url.com/auth\",\n                            scopes = @OAuthScope(name = \"write:pets\", description = \"modify pets in your account\"))))\n    @SecurityScheme(name = \"apiKey\", type = SecuritySchemeType.APIKEY, in = SecuritySchemeIn.HEADER, paramName = \"API_KEY\")\n    static class MultipleSchemesOnClass {\n\n    }\n\n    @OpenAPIDefinition(\n        security = {@SecurityRequirement(combine = { @SecurityRequirementEntry(name = \"api_key\"), @SecurityRequirementEntry(name = \"myOauth2Security\") })}\n    )\n    @SecurityScheme(name = \"api_key\", type = SecuritySchemeType.APIKEY, paramName = \"API_KEY\")\n    @SecurityScheme(name = \"myOauth2Security\",\n        type = SecuritySchemeType.OAUTH2,\n        in = SecuritySchemeIn.HEADER,\n        flows = @OAuthFlows(\n            implicit = @OAuthFlow(authorizationUrl = \"http://url.com/auth\",\n                scopes = @OAuthScope(name = \"write:pets\", description = \"modify pets in your account\"))))\n    static class CombinedSecurityRequirementsOnClass {\n\n    }\n\n    @OpenAPIDefinition(\n        security = {@SecurityRequirement(name = \"api_key\"), @SecurityRequirement(name = \"myOauth2Security\")}\n    )\n    @SecurityScheme(name = \"api_key\", type = SecuritySchemeType.APIKEY, paramName = \"API_KEY\")\n    @SecurityScheme(name = \"myOauth2Security\",\n        type = SecuritySchemeType.OAUTH2,\n        in = SecuritySchemeIn.HEADER,\n        flows = @OAuthFlows(\n            implicit = @OAuthFlow(authorizationUrl = \"http://url.com/auth\",\n                scopes = @OAuthScope(name = \"write:pets\", description = \"modify pets in your account\"))))\n    static class SecurityRequirementAlternativesOnClass {\n\n    }\n\n\n    @OpenAPIDefinition(\n            security = {@SecurityRequirement(name = \"basicAuth\")},\n            info = @Info( title = \"Test\", description = \"\", version = \"1.0-SNAPSHOT\"))\n    @SecurityScheme(name=\"basicAuth\", type = SecuritySchemeType.HTTP, scheme = \"basic\")\n    static class Ticket2767 {\n\n    }\n\n    @OpenAPIDefinition(\n            security = {@SecurityRequirement(name = \"api_key\")},\n            info = @Info( title = \"Test\", description = \"\", version = \"1.0-SNAPSHOT\"))\n    @SecurityScheme(name=\"api_key\", type = SecuritySchemeType.APIKEY, paramName = \"API_KEY\")\n    static class Ticket2767_2 {\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/cdi2/CDIAutodiscoveryTest.java",
    "content": "package io.swagger.v3.jaxrs2.cdi2;\n\nimport org.jboss.arquillian.container.test.api.Deployment;\nimport org.jboss.arquillian.testng.Arquillian;\nimport org.jboss.shrinkwrap.api.ShrinkWrap;\nimport org.jboss.shrinkwrap.api.spec.JavaArchive;\nimport org.testng.AssertJUnit;\nimport org.testng.annotations.Test;\n\nimport io.swagger.v3.jaxrs2.SwaggerSerializers;\nimport io.swagger.v3.jaxrs2.integration.resources.OpenApiResource;\n\nimport javax.enterprise.inject.spi.Extension;\nimport javax.inject.Inject;\n\npublic class CDIAutodiscoveryTest extends Arquillian {\n\n    @Inject\n    DiscoveryTestExtension ext;\n\n    @Deployment\n    public static JavaArchive createDeployment() {\n        return ShrinkWrap.create(JavaArchive.class)\n                .addClasses(SwaggerSerializers.class)\n                .addPackage(OpenApiResource.class.getPackage())\n                .addAsServiceProviderAndClasses(Extension.class, DiscoveryTestExtension.class)\n                .addAsManifestResource(\"META-INF/beans.xml\");\n    }\n\n    @Test\n    void confirmPathClassesWereDiscovered() {\n        String[] expected = {\n                \"io.swagger.v3.jaxrs2.integration.resources.AcceptHeaderOpenApiResource\",\n                \"io.swagger.v3.jaxrs2.integration.resources.OpenApiResource\"\n                };\n        Object[] found = ext.getResources().stream()\n                .map(resource -> resource.getName())\n                .sorted()\n                .toArray();\n        AssertJUnit.assertArrayEquals(expected, found);\n    }\n\n    @Test\n    void confirmProviderClassesWereDiscovered() {\n        String[] expected = {\n                \"io.swagger.v3.jaxrs2.SwaggerSerializers\"\n                };\n        Object[] found = ext.getProviders().stream()\n                .map(resource -> resource.getName())\n                .toArray();\n        AssertJUnit.assertArrayEquals(expected, found);\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/cdi2/DiscoveryTestExtension.java",
    "content": "package io.swagger.v3.jaxrs2.cdi2;\n\nimport java.util.HashSet;\nimport java.util.Set;\n\nimport javax.enterprise.event.Observes;\nimport javax.enterprise.inject.spi.AnnotatedType;\nimport javax.enterprise.inject.spi.Extension;\nimport javax.enterprise.inject.spi.ProcessAnnotatedType;\nimport javax.enterprise.inject.spi.WithAnnotations;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.ext.Provider;\n\npublic class DiscoveryTestExtension implements Extension {\n\n    private final Set<Class<?>> providers = new HashSet<>();\n    private final Set<Class<?>> resources = new HashSet<>();\n\n    public Set<Class<?>> getProviders() {\n        return providers;\n    }\n\n    public Set<Class<?>> getResources() {\n        return resources;\n    }\n\n    public <T> void observeResources(@WithAnnotations({ Path.class }) @Observes ProcessAnnotatedType<T> event) {\n        AnnotatedType<T> annotatedType = event.getAnnotatedType();\n\n        if (!annotatedType.getJavaClass().isInterface()) {\n            this.resources.add(annotatedType.getJavaClass());\n        }\n    }\n\n    public <T> void observeProviders(@WithAnnotations({ Provider.class }) @Observes ProcessAnnotatedType<T> event) {\n        AnnotatedType<T> annotatedType = event.getAnnotatedType();\n\n        if (!annotatedType.getJavaClass().isInterface()) {\n            this.providers.add(annotatedType.getJavaClass());\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/integration/JaxrsApplicationAndAnnotationScannerTest.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Set;\nimport java.util.stream.Collectors;\nimport java.util.stream.Stream;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Application;\n\nimport org.my.project.resources.ResourceInPackageB;\nimport org.testng.annotations.BeforeMethod;\nimport org.testng.annotations.Test;\n\nimport com.my.project.resources.ResourceInPackageA;\n\nimport io.swagger.v3.jaxrs2.Reader;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.integration.GenericOpenApiContext;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.info.Info;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertTrue;\n\npublic class JaxrsApplicationAndAnnotationScannerTest {\n    private JaxrsApplicationAndAnnotationScanner scanner;\n\n    @Path(\"/app\")\n    protected static class ResourceInApplication {\n        @Operation(operationId = \"test.\")\n        @GET\n        public void getTest(@Parameter(name = \"test\") ArrayList<String> tenantId) {\n            return;\n        }\n    }\n\n    @BeforeMethod\n    public void setUp() {\n        scanner = new JaxrsApplicationAndAnnotationScanner();\n        \n        scanner.setApplication(new Application() {\n            @Override\n            public Set<Class<?>> getClasses() {\n                return Collections.singleton(ResourceInApplication.class);\n            }\n        });\n    }\n    \n    @Test(description = \"scan classes from all packages and Application\")\n    public void shouldScanClassesFromAllPackagesAndApplication() throws Exception {\n        assertTrue(scanner.classes().contains(ResourceInPackageA.class));\n        assertTrue(scanner.classes().contains(ResourceInPackageB.class));\n        assertTrue(scanner.classes().contains(ResourceInApplication.class));\n    }\n    \n    @Test(description = \"scan classes from the packages and Application\")\n    public void shouldScanClassesFromPackagesAndApplication() throws Exception {\n        SwaggerConfiguration openApiConfiguration = new SwaggerConfiguration();\n        openApiConfiguration.setResourcePackages(Collections.singleton(\"com.my.project.resources\"));\n        scanner.setConfiguration(openApiConfiguration);\n        \n        assertEquals(scanner.classes().size(), 2);\n        assertTrue(scanner.classes().contains(ResourceInPackageA.class));\n        assertTrue(scanner.classes().contains(ResourceInApplication.class));\n    }\n    \n    @Test(description = \"scan a simple resource from packages\")\n    public void shouldScanClassesFromPackages() throws Exception {\n        SwaggerConfiguration config = new SwaggerConfiguration()\n                .resourcePackages(Stream.of(\"com.my.project.resources\", \"org.my.project.resources\").collect(Collectors.toSet()))\n                .openAPI(new OpenAPI().info(new Info().description(\"TEST INFO DESC\")));\n\n        OpenApiContext ctx = new GenericOpenApiContext<>()\n                .openApiConfiguration(config)\n                .openApiReader(new Reader(config))\n                .openApiScanner(scanner.application(null).openApiConfiguration(config))\n                .init();\n\n        OpenAPI openApi = ctx.read();\n\n        assertNotNull(openApi);\n        assertEquals(openApi.getPaths().keySet(), Arrays.asList(\"/packageA\", \"/packageB\"));\n\n    }\n    \n    @Test(description = \"scan a simple resource from packages using configuration file\")\n    public void shouldScanClassesFromPackagesUsingConfigurationFile() throws Exception {\n        String configPath = \"/integration/openapi-configuration.json\";\n        OpenApiContext ctx = new XmlWebOpenApiContext<>().configLocation(configPath).init();\n        OpenAPI openApi = ctx.read();\n\n        assertNotNull(openApi);\n        assertEquals(openApi.getPaths().keySet(), Arrays.asList(\"/packageA\", \"/packageB\"));\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/integration/JaxrsApplicationAndResourcePackagesAnnotationScannerTest.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport io.swagger.v3.jaxrs2.Reader;\nimport io.swagger.v3.oas.integration.GenericOpenApiContext;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.info.Info;\n\nimport org.testng.annotations.BeforeMethod;\nimport org.testng.annotations.Test;\n\nimport com.my.project.resources.ResourceInPackageA;\n\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Set;\nimport java.util.stream.Collectors;\nimport java.util.stream.Stream;\n\nimport javax.ws.rs.core.Application;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotNull;\nimport static org.testng.Assert.assertNull;\n\npublic class JaxrsApplicationAndResourcePackagesAnnotationScannerTest {\n\n    private JaxrsApplicationAndResourcePackagesAnnotationScanner scanner;\n\n    @BeforeMethod\n    public void setUp() {\n        scanner = new JaxrsApplicationAndResourcePackagesAnnotationScanner();\n    }\n\n    @Test(description = \"scan classes from resource packages only\")\n    public void shouldScanOnlyResourcePackagesClasses() throws Exception {\n        SwaggerConfiguration config = new SwaggerConfiguration()\n                .resourcePackages(Stream.of(\"com.my.project.resources\", \"org.my.project.resources\").collect(Collectors.toSet()))\n                .openAPI(new OpenAPI().info(new Info().description(\"TEST INFO DESC\")));\n\n        OpenApiContext ctx = new GenericOpenApiContext<>()\n                .openApiConfiguration(config)\n                .openApiReader(new Reader(config))\n                .openApiScanner(new JaxrsApplicationAndResourcePackagesAnnotationScanner().openApiConfiguration(config))\n                .init();\n\n        OpenAPI openApi = ctx.read();\n        assertNotNull(openApi);\n        assertEquals(openApi.getPaths().keySet(), Arrays.asList(\"/packageA\", \"/packageB\"));\n    }\n    \n    @Test(description = \"scan classes from Application when it is not set\")\n    public void shouldScanForClassesWhenApplicationIsNotSet() throws Exception {\n        SwaggerConfiguration config = new SwaggerConfiguration()\n                .openAPI(new OpenAPI().info(new Info().description(\"TEST INFO DESC\")));\n        \n        OpenApiContext ctx = new GenericOpenApiContext<>()\n                .openApiConfiguration(config)\n                .openApiReader(new Reader(config))\n                .openApiScanner(scanner.openApiConfiguration(config))\n                .init();\n\n        OpenAPI openApi = ctx.read();\n\n        assertNotNull(openApi);\n        assertNull(openApi.getPaths());\n    }\n    \n    @Test(description = \"scan classes from Application\")\n    public void shouldScanOnlyApplicationClasses() throws Exception {\n        SwaggerConfiguration config = new SwaggerConfiguration()\n                .openAPI(new OpenAPI().info(new Info().description(\"TEST INFO DESC\")));\n        \n        Application application = new Application() {\n            @Override\n            public Set<Class<?>> getClasses() {\n                return Collections.singleton(ResourceInPackageA.class);\n            }\n        };\n        \n        OpenApiContext ctx = new GenericOpenApiContext<>()\n                .openApiConfiguration(config)\n                .openApiReader(new Reader(config))\n                .openApiScanner(scanner.application(application).openApiConfiguration(config))\n                .init();\n\n        OpenAPI openApi = ctx.read();\n        assertNotNull(openApi);\n        assertEquals(openApi.getPaths().keySet(), Arrays.asList(\"/packageA\"));\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/integration/JaxrsApplicationScannerTest.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport java.util.Collections;\nimport java.util.Set;\n\nimport javax.ws.rs.core.Application;\n\nimport org.testng.annotations.BeforeMethod;\nimport org.testng.annotations.Test;\n\nimport com.my.project.resources.ResourceInPackageA;\n\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertTrue;\n\npublic class JaxrsApplicationScannerTest {\n    private JaxrsApplicationScanner scanner;\n\n    @BeforeMethod\n    public void setUp() {\n        scanner = new JaxrsApplicationScanner();\n        \n        scanner.setApplication(new Application() {\n            @Override\n            public Set<Class<?>> getClasses() {\n                return Collections.singleton(ResourceInPackageA.class);\n            }\n        });\n    }\n    \n    @Test(description = \"scan classes from Application only\")\n    public void shouldScanClassesApplicationOnly() throws Exception {\n        assertEquals(scanner.classes().size(), 1);\n        assertTrue(scanner.classes().contains(ResourceInPackageA.class));\n    }\n    \n    @Test(description = \"scan classes from the Application only, ignoring resource packages\")\n    public void shouldScanClassesFromApplicationOnlyIgnoringResourcePackages() throws Exception {\n        SwaggerConfiguration openApiConfiguration = new SwaggerConfiguration();\n        openApiConfiguration.setResourcePackages(Collections.singleton(\"com.my.project.resources\"));\n        scanner.setConfiguration(openApiConfiguration);\n        \n        assertEquals(scanner.classes().size(), 1);\n        assertTrue(scanner.classes().contains(ResourceInPackageA.class));\n    }\n    \n    @Test(description = \"scan classes from Application when is not set\")\n    public void shouldScanForClassesWhenApplicationNotSet() throws Exception {\n        scanner.application(null);\n        assertTrue(scanner.classes().isEmpty());\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/integration/SortedOutputTest.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport com.fasterxml.jackson.annotation.JsonAnyGetter;\nimport com.fasterxml.jackson.annotation.JsonAnySetter;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport com.fasterxml.jackson.annotation.JsonPropertyOrder;\nimport com.fasterxml.jackson.core.util.DefaultPrettyPrinter;\nimport com.fasterxml.jackson.databind.MapperFeature;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.SerializationFeature;\nimport com.fasterxml.jackson.databind.annotation.JsonSerialize;\nimport io.swagger.v3.core.jackson.PathsSerializer;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.integration.api.ObjectMapperProcessor;\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Paths;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.testng.annotations.BeforeMethod;\nimport org.testng.annotations.Test;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Application;\nimport java.math.BigDecimal;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.Map;\nimport java.util.Set;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class SortedOutputTest {\n    private JaxrsApplicationAndAnnotationScanner scanner;\n\n    @Path(\"/app\")\n    protected static class ResourceInApplication {\n        @Operation(operationId = \"test.\")\n        @GET\n        public void getTest(@Parameter(name = \"test\") ArrayList<String> tenantId) {\n            return;\n        }\n    }\n\n    @BeforeMethod\n    public void setUp() {\n        scanner = new JaxrsApplicationAndAnnotationScanner();\n\n        scanner.setApplication(new Application() {\n            @Override\n            public Set<Class<?>> getClasses() {\n                return Collections.singleton(ResourceInApplication.class);\n            }\n        });\n    }\n\n\n    @Test(description = \"sort output test\")\n    public void sortOutputTest() throws Exception {\n\n\n        SwaggerConfiguration openApiConfiguration = new SwaggerConfiguration()\n                .sortOutput(true)\n                .resourcePackages(Collections.singleton(\"com.my.sorted.resources\"));\n\n        OpenApiContext ctx = new JaxrsOpenApiContext<>()\n                .openApiConfiguration(openApiConfiguration)\n                .init();\n\n        OpenAPI openApi = ctx.read();\n        String sorted = ctx.getOutputYamlMapper().writer(new DefaultPrettyPrinter()).writeValueAsString(openApi);\n\n        openApiConfiguration = new SwaggerConfiguration()\n                .resourcePackages(Collections.singleton(\"com.my.sorted.resources\"));\n\n        ctx = new JaxrsOpenApiContext<>()\n                .openApiConfiguration(openApiConfiguration)\n                .init();\n\n        String notSorted = ctx.getOutputYamlMapper().writer(new DefaultPrettyPrinter()).writeValueAsString(openApi);\n\n        assertEquals(sorted, expectedSorted);\n        assertEquals(notSorted, expectedNotSorted);\n\n    }\n\n    @JsonPropertyOrder(value = {\"openapi\", \"info\", \"externalDocs\", \"servers\", \"security\", \"tags\", \"paths\", \"components\"}, alphabetic = true)\n    public static abstract class SortedOpenAPIMixin {\n\n        @JsonAnyGetter\n        @JsonPropertyOrder(alphabetic = true)\n        public abstract Map<String, Object> getExtensions();\n\n        @JsonAnySetter\n        public abstract void addExtension(String name, Object value);\n\n        @JsonSerialize(using = PathsSerializer.class)\n        public abstract Paths getPaths();\n    }\n\n    @JsonPropertyOrder(value = {\"type\", \"format\"}, alphabetic = true)\n    public static abstract class SortedSchemaMixin {\n\n        @JsonAnyGetter\n        @JsonPropertyOrder(alphabetic = true)\n        public abstract Map<String, Object> getExtensions();\n\n        @JsonAnySetter\n        public abstract void addExtension(String name, Object value);\n\n        @JsonIgnore\n        public abstract boolean getExampleSetFlag();\n\n        @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)\n        public abstract Object getExample();\n\n        @JsonIgnore\n        public abstract Map<String, Object> getJsonSchema();\n\n        @JsonIgnore\n        public abstract BigDecimal getExclusiveMinimumValue();\n\n        @JsonIgnore\n        public abstract BigDecimal getExclusiveMaximumValue();\n\n        @JsonIgnore\n        public abstract Map<String, Schema> getPatternProperties();\n\n        @JsonIgnore\n        public abstract Schema getContains();\n        @JsonIgnore\n        public abstract String get$id();\n        @JsonIgnore\n        public abstract String get$anchor();\n        @JsonIgnore\n        public abstract String get$schema();\n        @JsonIgnore\n        public abstract Set<String> getTypes();\n\n        @JsonIgnore\n        public abstract Object getJsonSchemaImpl();\n\n\n    }\n\n    public static class SortedProcessor implements ObjectMapperProcessor {\n\n        @Override\n        public void processOutputJsonObjectMapper(ObjectMapper mapper) {\n            mapper.configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true);\n            mapper.configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true);\n            mapper.addMixIn(OpenAPI.class, SortedOpenAPIMixin.class);\n            mapper.addMixIn(Schema.class, SortedSchemaMixin.class);\n        }\n\n        @Override\n        public void processOutputYamlObjectMapper(ObjectMapper mapper) {\n            mapper.configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true);\n            mapper.configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true);\n            mapper.addMixIn(OpenAPI.class, SortedOpenAPIMixin.class);\n            mapper.addMixIn(Schema.class, SortedSchemaMixin.class);\n        }\n    }\n\n    @Test(description = \"config output test\")\n    public void configOutputTest() throws Exception {\n        SwaggerConfiguration openApiConfiguration = new SwaggerConfiguration()\n                .objectMapperProcessorClass(SortedProcessor.class.getName())\n                .resourcePackages(Collections.singleton(\"com.my.sorted.resources\"));\n\n        OpenApiContext ctx = new JaxrsOpenApiContext<>()\n                .openApiConfiguration(openApiConfiguration)\n                .init();\n\n        OpenAPI openApi = ctx.read();\n        String sorted = ctx.getOutputYamlMapper().writer(new DefaultPrettyPrinter()).writeValueAsString(openApi);\n\n        openApiConfiguration = new SwaggerConfiguration()\n                .resourcePackages(Collections.singleton(\"com.my.sorted.resources\"));\n\n        ctx = new JaxrsOpenApiContext<>()\n                .openApiConfiguration(openApiConfiguration)\n                .init();\n\n        String notSorted = ctx.getOutputYamlMapper().writer(new DefaultPrettyPrinter()).writeValueAsString(openApi);\n\n        assertEquals(sorted, expectedSorted);\n        assertEquals(notSorted, expectedNotSorted);\n\n    }\n    String expectedSorted = \"openapi: 3.0.1\\n\" +\n            \"paths:\\n\" +\n            \"  /sorted/pet:\\n\" +\n            \"    get:\\n\" +\n            \"      operationId: foo\\n\" +\n            \"      responses:\\n\" +\n            \"        default:\\n\" +\n            \"          content:\\n\" +\n            \"            '*/*':\\n\" +\n            \"              schema:\\n\" +\n            \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n            \"          description: default response\\n\" +\n            \"components:\\n\" +\n            \"  schemas:\\n\" +\n            \"    Category:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        id:\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int64\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"      xml:\\n\" +\n            \"        name: Category\\n\" +\n            \"    Pet:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        category:\\n\" +\n            \"          $ref: \\\"#/components/schemas/Category\\\"\\n\" +\n            \"        id:\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int64\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"        photoUrls:\\n\" +\n            \"          type: array\\n\" +\n            \"          items:\\n\" +\n            \"            type: string\\n\" +\n            \"            xml:\\n\" +\n            \"              name: photoUrl\\n\" +\n            \"          xml:\\n\" +\n            \"            wrapped: true\\n\" +\n            \"        status:\\n\" +\n            \"          type: string\\n\" +\n            \"          description: pet status in the store\\n\" +\n            \"          enum:\\n\" +\n            \"          - \\\"available,pending,sold\\\"\\n\" +\n            \"        tags:\\n\" +\n            \"          type: array\\n\" +\n            \"          items:\\n\" +\n            \"            $ref: \\\"#/components/schemas/Tag\\\"\\n\" +\n            \"          xml:\\n\" +\n            \"            wrapped: true\\n\" +\n            \"      xml:\\n\" +\n            \"        name: Pet\\n\" +\n            \"    Tag:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        id:\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int64\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"      xml:\\n\" +\n            \"        name: Tag\\n\";\n\n    String expectedNotSorted = \"openapi: 3.0.1\\n\" +\n            \"paths:\\n\" +\n            \"  /sorted/pet:\\n\" +\n            \"    get:\\n\" +\n            \"      operationId: foo\\n\" +\n            \"      responses:\\n\" +\n            \"        default:\\n\" +\n            \"          description: default response\\n\" +\n            \"          content:\\n\" +\n            \"            '*/*':\\n\" +\n            \"              schema:\\n\" +\n            \"                $ref: \\\"#/components/schemas/Pet\\\"\\n\" +\n            \"components:\\n\" +\n            \"  schemas:\\n\" +\n            \"    Category:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        id:\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int64\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"      xml:\\n\" +\n            \"        name: Category\\n\" +\n            \"    Pet:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        id:\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int64\\n\" +\n            \"        category:\\n\" +\n            \"          $ref: \\\"#/components/schemas/Category\\\"\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"        photoUrls:\\n\" +\n            \"          type: array\\n\" +\n            \"          xml:\\n\" +\n            \"            wrapped: true\\n\" +\n            \"          items:\\n\" +\n            \"            type: string\\n\" +\n            \"            xml:\\n\" +\n            \"              name: photoUrl\\n\" +\n            \"        tags:\\n\" +\n            \"          type: array\\n\" +\n            \"          xml:\\n\" +\n            \"            wrapped: true\\n\" +\n            \"          items:\\n\" +\n            \"            $ref: \\\"#/components/schemas/Tag\\\"\\n\" +\n            \"        status:\\n\" +\n            \"          type: string\\n\" +\n            \"          description: pet status in the store\\n\" +\n            \"          enum:\\n\" +\n            \"          - \\\"available,pending,sold\\\"\\n\" +\n            \"      xml:\\n\" +\n            \"        name: Pet\\n\" +\n            \"    Tag:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        id:\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int64\\n\" +\n            \"        name:\\n\" +\n            \"          type: string\\n\" +\n            \"      xml:\\n\" +\n            \"        name: Tag\\n\";\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/it/OpenApiResourceIT.java",
    "content": "package io.swagger.v3.jaxrs2.it;\n\nimport com.fasterxml.jackson.databind.SerializationFeature;\n\nimport io.restassured.http.ContentType;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.jaxrs2.annotations.AbstractAnnotationTest;\nimport org.testng.SkipException;\nimport org.testng.annotations.BeforeMethod;\nimport org.testng.annotations.Test;\n\nimport java.io.IOException;\n\nimport static io.restassured.RestAssured.given;\nimport static org.testng.Assert.assertTrue;\n\n/**\n * <p>\n * An functional integration test that runs during maven's integration-test phase,\n * uses RestAssured to define REST API tests, and Jetty's Maven plugin to serve a simple\n * sample app just prior to the integration-test phase starting.\n */\npublic class OpenApiResourceIT extends AbstractAnnotationTest {\n    private static final String EXPECTED_JSON = \"{\\n\" +\n            \"    \\\"openapi\\\": \\\"3.0.1\\\",\\n\" +\n            \"    \\\"paths\\\": {\\n\" +\n            \"        \\\"/cars/all\\\": {\\n\" +\n            \"            \\\"get\\\": {\\n\" +\n            \"                \\\"tags\\\": [\\n\" +\n            \"                    \\\"cars\\\"\\n\" +\n            \"                ],\\n\" +\n            \"                \\\"description\\\": \\\"Return whole car\\\",\\n\" +\n            \"                \\\"operationId\\\": \\\"getAll\\\",\\n\" +\n            \"                \\\"responses\\\": {\\n\" +\n            \"                    \\\"200\\\": {\\n\" +\n            \"                        \\\"content\\\": {\\n\" +\n            \"                            \\\"application/json\\\": {\\n\" +\n            \"                                \\\"schema\\\": {\\n\" +\n            \"                                    \\\"type\\\": \\\"array\\\",\\n\" +\n            \"                                    \\\"items\\\": {\\n\" +\n            \"                                        \\\"$ref\\\": \\\"#/components/schemas/Car\\\"\\n\" +\n            \"                                    }\\n\" +\n            \"                                }\\n\" +\n            \"                            }\\n\" +\n            \"                        }\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            }\\n\" +\n            \"        },\\n\" +\n            \"        \\\"/cars/summary\\\": {\\n\" +\n            \"            \\\"get\\\": {\\n\" +\n            \"                \\\"tags\\\": [\\n\" +\n            \"                    \\\"cars\\\"\\n\" +\n            \"                ],\\n\" +\n            \"                \\\"description\\\": \\\"Return car summaries\\\",\\n\" +\n            \"                \\\"operationId\\\": \\\"getSummaries\\\",\\n\" +\n            \"                \\\"responses\\\": {\\n\" +\n            \"                    \\\"200\\\": {\\n\" +\n            \"                        \\\"content\\\": {\\n\" +\n            \"                            \\\"application/json\\\": {\\n\" +\n            \"                                \\\"schema\\\": {\\n\" +\n            \"                                    \\\"type\\\": \\\"array\\\",\\n\" +\n            \"                                    \\\"items\\\": {\\n\" +\n            \"                                        \\\"$ref\\\": \\\"#/components/schemas/Car_Summary\\\"\\n\" +\n            \"                                    }\\n\" +\n            \"                                }\\n\" +\n            \"                            }\\n\" +\n            \"                        }\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            }\\n\" +\n            \"        },\\n\" +\n            \"        \\\"/cars/detail\\\": {\\n\" +\n            \"            \\\"get\\\": {\\n\" +\n            \"                \\\"tags\\\": [\\n\" +\n            \"                    \\\"cars\\\"\\n\" +\n            \"                ],\\n\" +\n            \"                \\\"description\\\": \\\"Return car detail\\\",\\n\" +\n            \"                \\\"operationId\\\": \\\"getDetails\\\",\\n\" +\n            \"                \\\"responses\\\": {\\n\" +\n            \"                    \\\"200\\\": {\\n\" +\n            \"                        \\\"content\\\": {\\n\" +\n            \"                            \\\"application/json\\\": {\\n\" +\n            \"                                \\\"schema\\\": {\\n\" +\n            \"                                    \\\"type\\\": \\\"array\\\",\\n\" +\n            \"                                    \\\"items\\\": {\\n\" +\n            \"                                        \\\"$ref\\\": \\\"#/components/schemas/Car_Detail\\\"\\n\" +\n            \"                                    }\\n\" +\n            \"                                }\\n\" +\n            \"                            }\\n\" +\n            \"                        }\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            }\\n\" +\n            \"        },\\n\" +\n            \"        \\\"/cars/sale\\\": {\\n\" +\n            \"            \\\"get\\\": {\\n\" +\n            \"                \\\"tags\\\": [\\n\" +\n            \"                    \\\"cars\\\"\\n\" +\n            \"                ],\\n\" +\n            \"                \\\"operationId\\\": \\\"getSaleSummaries\\\",\\n\" +\n            \"                \\\"responses\\\": {\\n\" +\n            \"                    \\\"default\\\": {\\n\" +\n            \"                        \\\"description\\\": \\\"default response\\\",\\n\" +\n            \"                        \\\"content\\\": {\\n\" +\n            \"                            \\\"application/json\\\": {\\n\" +\n            \"                                \\\"schema\\\": {\\n\" +\n            \"                                    \\\"type\\\": \\\"array\\\",\\n\" +\n            \"                                    \\\"items\\\": {\\n\" +\n            \"                                        \\\"$ref\\\": \\\"#/components/schemas/Car_Summary-or-Sale\\\"\\n\" +\n            \"                                    }\\n\" +\n            \"                                }\\n\" +\n            \"                            }\\n\" +\n            \"                        }\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            }\\n\" +\n            \"        },\\n\" +\n            \"        \\\"/files/upload\\\": {\\n\" +\n            \"            \\\"post\\\": {\\n\" +\n            \"                \\\"operationId\\\": \\\"uploadFile\\\",\\n\" +\n            \"                \\\"requestBody\\\": {\\n\" +\n            \"                    \\\"content\\\": {\\n\" +\n            \"                        \\\"multipart/form-data\\\": {\\n\" +\n            \"                            \\\"schema\\\": {\\n\" +\n            \"                                \\\"type\\\": \\\"object\\\",\\n\" +\n            \"                                \\\"properties\\\": {\\n\" +\n            \"                                    \\\"fileIdRenamed\\\": {\\n\" +\n            \"                                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                                    },\\n\" +\n            \"                                    \\\"fileRenamed\\\": {\\n\" +\n            \"                                        \\\"type\\\": \\\"string\\\",\\n\" +\n            \"                                        \\\"format\\\": \\\"binary\\\"\\n\" +\n            \"                                    }\\n\" +\n            \"                                }\\n\" +\n            \"                            }\\n\" +\n            \"                        }\\n\" +\n            \"                    }\\n\" +\n            \"                },\\n\" +\n            \"                \\\"responses\\\": {\\n\" +\n            \"                    \\\"default\\\": {\\n\" +\n            \"                        \\\"description\\\": \\\"default response\\\",\\n\" +\n            \"                        \\\"content\\\": {\\n\" +\n            \"                            \\\"application/json\\\": {\\n\" +\n            \"                                \\n\" +\n            \"                            }\\n\" +\n            \"                        }\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            }\\n\" +\n            \"        },\\n\" +\n            \"        \\\"/files/attach\\\": {\\n\" +\n            \"            \\\"put\\\": {\\n\" +\n            \"                \\\"operationId\\\": \\\"putFile\\\",\\n\" +\n            \"                \\\"requestBody\\\": {\\n\" +\n            \"                    \\\"content\\\": {\\n\" +\n            \"                        \\\"application/octet-stream\\\": {\\n\" +\n            \"                            \\\"schema\\\": {\\n\" +\n            \"                                \\\"type\\\": \\\"string\\\",\\n\" +\n            \"                                \\\"format\\\": \\\"binary\\\"\\n\" +\n            \"                            }\\n\" +\n            \"                        }\\n\" +\n            \"                    }\\n\" +\n            \"                },\\n\" +\n            \"                \\\"responses\\\": {\\n\" +\n            \"                    \\\"default\\\": {\\n\" +\n            \"                        \\\"description\\\": \\\"default response\\\",\\n\" +\n            \"                        \\\"content\\\": {\\n\" +\n            \"                            \\\"application/json\\\": {\\n\" +\n            \"                                \\n\" +\n            \"                            }\\n\" +\n            \"                        }\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            }\\n\" +\n            \"        },\\n\" +\n            \"        \\\"/users/add\\\": {\\n\" +\n            \"            \\\"post\\\": {\\n\" +\n            \"                \\\"operationId\\\": \\\"addUser\\\",\\n\" +\n            \"                \\\"requestBody\\\": {\\n\" +\n            \"                    \\\"content\\\": {\\n\" +\n            \"                        \\\"application/x-www-form-urlencoded\\\": {\\n\" +\n            \"                            \\\"schema\\\": {\\n\" +\n            \"                                \\\"type\\\": \\\"object\\\",\\n\" +\n            \"                                \\\"properties\\\": {\\n\" +\n            \"                                    \\\"id\\\": {\\n\" +\n            \"                                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                                    },\\n\" +\n            \"                                    \\\"name\\\": {\\n\" +\n            \"                                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                                    },\\n\" +\n            \"                                    \\\"gender\\\": {\\n\" +\n            \"                                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                                    }\\n\" +\n            \"                                }\\n\" +\n            \"                            }\\n\" +\n            \"                        }\\n\" +\n            \"                    }\\n\" +\n            \"                },\\n\" +\n            \"                \\\"responses\\\": {\\n\" +\n            \"                    \\\"default\\\": {\\n\" +\n            \"                        \\\"description\\\": \\\"default response\\\",\\n\" +\n            \"                        \\\"content\\\": {\\n\" +\n            \"                            \\\"application/json\\\": {\\n\" +\n            \"                                \\n\" +\n            \"                            }\\n\" +\n            \"                        }\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            }\\n\" +\n            \"        },\\n\" +\n            \"        \\\"/widgets/{widgetId}\\\": {\\n\" +\n            \"            \\\"get\\\": {\\n\" +\n            \"                \\\"tags\\\": [\\n\" +\n            \"                    \\\"widgets\\\"\\n\" +\n            \"                ],\\n\" +\n            \"                \\\"summary\\\": \\\"Find pet by ID\\\",\\n\" +\n            \"                \\\"description\\\": \\\"Returns a pet when ID <= 10.  ID > 10 or nonintegers will simulate API error conditions\\\",\\n\" +\n            \"                \\\"operationId\\\": \\\"getWidget\\\",\\n\" +\n            \"                \\\"parameters\\\": [\\n\" +\n            \"                    {\\n\" +\n            \"                        \\\"name\\\": \\\"widgetId\\\",\\n\" +\n            \"                        \\\"in\\\": \\\"path\\\",\\n\" +\n            \"                        \\\"required\\\": true,\\n\" +\n            \"                        \\\"schema\\\": {\\n\" +\n            \"                            \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                        }\\n\" +\n            \"                    }\\n\" +\n            \"                ],\\n\" +\n            \"                \\\"responses\\\": {\\n\" +\n            \"                    \\\"200\\\": {\\n\" +\n            \"                        \\\"description\\\": \\\"Returns widget with matching id\\\",\\n\" +\n            \"                        \\\"content\\\": {\\n\" +\n            \"                            \\\"application/json\\\": {\\n\" +\n            \"                                \\\"schema\\\": {\\n\" +\n            \"                                    \\\"$ref\\\": \\\"#/components/schemas/Widget\\\"\\n\" +\n            \"                                }\\n\" +\n            \"                            }\\n\" +\n            \"                        }\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            }\\n\" +\n            \"        }\\n\" +\n            \"    },\\n\" +\n            \"    \\\"components\\\": {\\n\" +\n            \"        \\\"schemas\\\": {\\n\" +\n            \"            \\\"Tire_Detail\\\": {\\n\" +\n            \"                \\\"type\\\": \\\"object\\\",\\n\" +\n            \"                \\\"properties\\\": {\\n\" +\n            \"                    \\\"condition\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"brand\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            },\\n\" +\n            \"            \\\"Car\\\": {\\n\" +\n            \"                \\\"type\\\": \\\"object\\\",\\n\" +\n            \"                \\\"properties\\\": {\\n\" +\n            \"                    \\\"model\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"tires\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"array\\\",\\n\" +\n            \"                        \\\"items\\\": {\\n\" +\n            \"                            \\\"$ref\\\": \\\"#/components/schemas/Tire\\\"\\n\" +\n            \"                        }\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"price\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"integer\\\",\\n\" +\n            \"                        \\\"format\\\": \\\"int32\\\"\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"color\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"manufacture\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            },\\n\" +\n            \"            \\\"Car_Summary-or-Sale\\\": {\\n\" +\n            \"                \\\"type\\\": \\\"object\\\",\\n\" +\n            \"                \\\"properties\\\": {\\n\" +\n            \"                    \\\"model\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"price\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"integer\\\",\\n\" +\n            \"                        \\\"format\\\": \\\"int32\\\"\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"color\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"manufacture\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            },\\n\" +\n            \"            \\\"Car_Detail\\\": {\\n\" +\n            \"                \\\"type\\\": \\\"object\\\",\\n\" +\n            \"                \\\"properties\\\": {\\n\" +\n            \"                    \\\"model\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"tires\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"array\\\",\\n\" +\n            \"                        \\\"items\\\": {\\n\" +\n            \"                            \\\"$ref\\\": \\\"#/components/schemas/Tire_Detail\\\"\\n\" +\n            \"                        }\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"color\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"manufacture\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            },\\n\" +\n            \"            \\\"Widget\\\": {\\n\" +\n            \"                \\\"type\\\": \\\"object\\\",\\n\" +\n            \"                \\\"properties\\\": {\\n\" +\n            \"                    \\\"a\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"b\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"id\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            },\\n\" +\n            \"            \\\"Car_Summary\\\": {\\n\" +\n            \"                \\\"type\\\": \\\"object\\\",\\n\" +\n            \"                \\\"properties\\\": {\\n\" +\n            \"                    \\\"model\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"color\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"manufacture\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            },\\n\" +\n            \"            \\\"Tire\\\": {\\n\" +\n            \"                \\\"type\\\": \\\"object\\\",\\n\" +\n            \"                \\\"properties\\\": {\\n\" +\n            \"                    \\\"condition\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    },\\n\" +\n            \"                    \\\"brand\\\": {\\n\" +\n            \"                        \\\"type\\\": \\\"string\\\"\\n\" +\n            \"                    }\\n\" +\n            \"                }\\n\" +\n            \"            }\\n\" +\n            \"        }\\n\" +\n            \"    }\\n\" +\n            \"}\";\n    private static final String EXPECTED_YAML = \"openapi: 3.0.1\\n\" +\n            \"paths:\\n\" +\n            \"  /cars/all:\\n\" +\n            \"    get:\\n\" +\n            \"      tags:\\n\" +\n            \"      - cars\\n\" +\n            \"      description: Return whole car\\n\" +\n            \"      operationId: getAll\\n\" +\n            \"      responses:\\n\" +\n            \"        \\\"200\\\":\\n\" +\n            \"          content:\\n\" +\n            \"            application/json:\\n\" +\n            \"              schema:\\n\" +\n            \"                type: array\\n\" +\n            \"                items:\\n\" +\n            \"                  $ref: \\\"#/components/schemas/Car\\\"\\n\" +\n            \"  /cars/detail:\\n\" +\n            \"    get:\\n\" +\n            \"      tags:\\n\" +\n            \"      - cars\\n\" +\n            \"      description: Return car detail\\n\" +\n            \"      operationId: getDetails\\n\" +\n            \"      responses:\\n\" +\n            \"        \\\"200\\\":\\n\" +\n            \"          content:\\n\" +\n            \"            application/json:\\n\" +\n            \"              schema:\\n\" +\n            \"                type: array\\n\" +\n            \"                items:\\n\" +\n            \"                  $ref: \\\"#/components/schemas/Car_Detail\\\"\\n\" +\n            \"  /cars/sale:\\n\" +\n            \"    get:\\n\" +\n            \"      tags:\\n\" +\n            \"      - cars\\n\" +\n            \"      operationId: getSaleSummaries\\n\" +\n            \"      responses:\\n\" +\n            \"        default:\\n\" +\n            \"          description: default response\\n\" +\n            \"          content:\\n\" +\n            \"            application/json:\\n\" +\n            \"              schema:\\n\" +\n            \"                type: array\\n\" +\n            \"                items:\\n\" +\n            \"                  $ref: \\\"#/components/schemas/Car_Summary-or-Sale\\\"\\n\" +\n            \"  /cars/summary:\\n\" +\n            \"    get:\\n\" +\n            \"      tags:\\n\" +\n            \"      - cars\\n\" +\n            \"      description: Return car summaries\\n\" +\n            \"      operationId: getSummaries\\n\" +\n            \"      responses:\\n\" +\n            \"        \\\"200\\\":\\n\" +\n            \"          content:\\n\" +\n            \"            application/json:\\n\" +\n            \"              schema:\\n\" +\n            \"                type: array\\n\" +\n            \"                items:\\n\" +\n            \"                  $ref: \\\"#/components/schemas/Car_Summary\\\"\\n\" +\n            \"  /files/attach:\\n\" +\n            \"    put:\\n\" +\n            \"      operationId: putFile\\n\" +\n            \"      requestBody:\\n\" +\n            \"        content:\\n\" +\n            \"          application/octet-stream:\\n\" +\n            \"            schema:\\n\" +\n            \"              type: string\\n\" +\n            \"              format: binary\\n\" +\n            \"      responses:\\n\" +\n            \"        default:\\n\" +\n            \"          description: default response\\n\" +\n            \"          content:\\n\" +\n            \"            application/json: {}\\n\" +\n            \"  /files/upload:\\n\" +\n            \"    post:\\n\" +\n            \"      operationId: uploadFile\\n\" +\n            \"      requestBody:\\n\" +\n            \"        content:\\n\" +\n            \"          multipart/form-data:\\n\" +\n            \"            schema:\\n\" +\n            \"              type: object\\n\" +\n            \"              properties:\\n\" +\n            \"                fileIdRenamed:\\n\" +\n            \"                  type: string\\n\" +\n            \"                fileRenamed:\\n\" +\n            \"                  type: string\\n\" +\n            \"                  format: binary\\n\" +\n            \"      responses:\\n\" +\n            \"        default:\\n\" +\n            \"          description: default response\\n\" +\n            \"          content:\\n\" +\n            \"            application/json: {}\\n\" +\n            \"  /users/add:\\n\" +\n            \"    post:\\n\" +\n            \"      operationId: addUser\\n\" +\n            \"      requestBody:\\n\" +\n            \"        content:\\n\" +\n            \"          application/x-www-form-urlencoded:\\n\" +\n            \"            schema:\\n\" +\n            \"              type: object\\n\" +\n            \"              properties:\\n\" +\n            \"                gender:\\n\" +\n            \"                  type: string\\n\" +\n            \"                id:\\n\" +\n            \"                  type: string\\n\" +\n            \"                name:\\n\" +\n            \"                  type: string\\n\" +\n            \"      responses:\\n\" +\n            \"        default:\\n\" +\n            \"          description: default response\\n\" +\n            \"          content:\\n\" +\n            \"            application/json: {}\\n\" +\n            \"  /widgets/{widgetId}:\\n\" +\n            \"    get:\\n\" +\n            \"      tags:\\n\" +\n            \"      - widgets\\n\" +\n            \"      summary: Find pet by ID\\n\" +\n            \"      description: Returns a pet when ID <= 10.  ID > 10 or nonintegers will simulate\\n\" +\n            \"        API error conditions\\n\" +\n            \"      operationId: getWidget\\n\" +\n            \"      parameters:\\n\" +\n            \"      - name: widgetId\\n\" +\n            \"        in: path\\n\" +\n            \"        required: true\\n\" +\n            \"        schema:\\n\" +\n            \"          type: string\\n\" +\n            \"      responses:\\n\" +\n            \"        \\\"200\\\":\\n\" +\n            \"          description: Returns widget with matching id\\n\" +\n            \"          content:\\n\" +\n            \"            application/json:\\n\" +\n            \"              schema:\\n\" +\n            \"                $ref: \\\"#/components/schemas/Widget\\\"\\n\" +\n            \"components:\\n\" +\n            \"  schemas:\\n\" +\n            \"    Car:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        color:\\n\" +\n            \"          type: string\\n\" +\n            \"        manufacture:\\n\" +\n            \"          type: string\\n\" +\n            \"        model:\\n\" +\n            \"          type: string\\n\" +\n            \"        price:\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int32\\n\" +\n            \"        tires:\\n\" +\n            \"          type: array\\n\" +\n            \"          items:\\n\" +\n            \"            $ref: \\\"#/components/schemas/Tire\\\"\\n\" +\n            \"    Car_Detail:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        color:\\n\" +\n            \"          type: string\\n\" +\n            \"        manufacture:\\n\" +\n            \"          type: string\\n\" +\n            \"        model:\\n\" +\n            \"          type: string\\n\" +\n            \"        tires:\\n\" +\n            \"          type: array\\n\" +\n            \"          items:\\n\" +\n            \"            $ref: \\\"#/components/schemas/Tire_Detail\\\"\\n\" +\n            \"    Car_Summary:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        color:\\n\" +\n            \"          type: string\\n\" +\n            \"        manufacture:\\n\" +\n            \"          type: string\\n\" +\n            \"        model:\\n\" +\n            \"          type: string\\n\" +\n            \"    Car_Summary-or-Sale:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        color:\\n\" +\n            \"          type: string\\n\" +\n            \"        manufacture:\\n\" +\n            \"          type: string\\n\" +\n            \"        model:\\n\" +\n            \"          type: string\\n\" +\n            \"        price:\\n\" +\n            \"          type: integer\\n\" +\n            \"          format: int32\\n\" +\n            \"    Tire:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        brand:\\n\" +\n            \"          type: string\\n\" +\n            \"        condition:\\n\" +\n            \"          type: string\\n\" +\n            \"    Tire_Detail:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        brand:\\n\" +\n            \"          type: string\\n\" +\n            \"        condition:\\n\" +\n            \"          type: string\\n\" +\n            \"    Widget:\\n\" +\n            \"      type: object\\n\" +\n            \"      properties:\\n\" +\n            \"        a:\\n\" +\n            \"          type: string\\n\" +\n            \"        b:\\n\" +\n            \"          type: string\\n\" +\n            \"        id:\\n\" +\n            \"          type: string\\n\";\n\n    private static final int jettyPort = System.getProperties().containsKey(\"jetty.port\") ? Integer.parseInt(System.getProperty(\"jetty.port\")): -1;\n\n    @BeforeMethod\n    public void checkJetty() {\n        if (jettyPort == -1) {\n            throw new SkipException(\"Jetty not configured\");\n        }\n    }\n\n    @Test\n    public void testSwaggerJson() throws Exception {\n\n        final String actualBody = given()\n                .port(jettyPort)\n                .log().all()\n                .when()\n                .get(\"/openapi.json\")\n                .then()\n                .log().all()\n                .assertThat()\n                .statusCode(200)\n                .contentType(ContentType.JSON)\n                .extract()\n                .response().body().asString();\n\n        compareAsJson(formatJson(actualBody), EXPECTED_JSON);\n    }\n\n    @Test\n    public void testSwaggerJsonUsingAcceptHeader() throws Exception {\n        final String actualBody = given()\n                .port(jettyPort)\n                .log().all()\n                .accept(ContentType.JSON)\n                .when()\n                .get(\"/openapi\")\n                .then()\n                .log().all()\n                .assertThat()\n                .statusCode(200)\n                .contentType(ContentType.JSON)\n                .extract().response().body().asString();\n\n        compareAsJson(formatJson(actualBody), EXPECTED_JSON);\n    }\n\n    @Test\n    public void testSwaggerYaml() throws Exception {\n        final String actualBody = given()\n                .port(jettyPort)\n                .log().all()\n                .when()\n                .get(\"/openapi.yaml\")\n                .then()\n                .log().all()\n                .assertThat()\n                .statusCode(200)\n                .contentType(\"application/yaml\")\n                .extract().response().body().asString();\n\n        compareAsYaml(formatYaml(actualBody), EXPECTED_YAML);\n    }\n\n    @Test\n    public void testSwaggerYamlUsingAcceptHeader() throws Exception {\n        final String actualBody = given()\n                .port(jettyPort)\n                .log().all()\n                .accept(\"application/yaml\")\n                .when()\n                .get(\"/openapi\")\n                .then()\n                .log().all()\n                .assertThat()\n                .statusCode(200)\n                .contentType(\"application/yaml\")\n                .extract().response().body().asString();\n\n        compareAsYaml(formatYaml(actualBody), EXPECTED_YAML);\n    }\n\n    @Test\n    public void testYamlOpenAPI31() throws Exception {\n        final String actualBody = given()\n                .port(jettyPort)\n                .log().all()\n                .accept(\"application/yaml\")\n                .when()\n                .get(\"/oas/openapi31\")\n                .then()\n                .log().all()\n                .assertThat()\n                .statusCode(200)\n                .contentType(\"application/yaml\")\n                .extract().response().body().asString();\n\n        assertTrue(actualBody.contains(\"openapi: 3.1.0\"));\n    }\n\n    @Test\n    public void testServletOpenAPI31() throws Exception {\n        final String actualBody = given()\n                .port(jettyPort)\n                .log().all()\n                .when()\n                .get(\"/oas/openapi.yaml\")\n                .then()\n                .log().all()\n                .assertThat()\n                .statusCode(200)\n                .contentType(\"application/yaml\")\n                .extract().response().body().asString();\n\n        assertTrue(actualBody.contains(\"openapi: 3.1.0\"));\n    }\n\n    @Test\n    public void testYamlOpenAPI31WithBootstrapServlet() throws Exception {\n        final String actualBody = given()\n                .port(jettyPort)\n                .log().all()\n                .when()\n                .get(\"/bootstrap\")\n                .then()\n                .log().all()\n                .assertThat()\n                .statusCode(200)\n                .extract().response().body().asString();\n        assertTrue(actualBody.contains(\"openapi: 3.1.0\"));\n    }\n\n    private String formatYaml(String source) throws IOException {\n        return Yaml.mapper().configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true)\n                .writerWithDefaultPrettyPrinter()\n                .writeValueAsString(Yaml.mapper().readValue(source, Object.class));\n    }\n\n    private String formatJson(String source) throws IOException {\n        return Json.mapper().configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true)\n                .writerWithDefaultPrettyPrinter()\n                .writeValueAsString(Json.mapper().readValue(source, Object.class));\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/it/model/Widget.java",
    "content": "package io.swagger.v3.jaxrs2.it.model;\n\npublic class Widget {\n\n    private String a;\n    private String b;\n    private String id;\n\n    public String getA() {\n        return a;\n    }\n\n    public Widget setA(String a) {\n        this.a = a;\n        return this;\n    }\n\n    public String getB() {\n        return b;\n    }\n\n    public Widget setB(String b) {\n        this.b = b;\n        return this;\n    }\n\n    public String getId() {\n        return id;\n    }\n\n    public Widget setId(String id) {\n        this.id = id;\n        return this;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/it/resources/CarResource.java",
    "content": "package io.swagger.v3.jaxrs2.it.resources;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.Path;\n\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonView;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.Response;\n\n@Path(\"/cars\")\n@Tag(name = \"cars\")\n@Produces(\"application/json\")\n@Consumes(\"application/json\")\npublic class CarResource {\n\n    private static class View {\n\n        interface Summary {\n        }\n\n        interface Detail extends View.Summary {\n        }\n\n        interface Sale {\n        }\n    }\n\n    private static class Car {\n\n        @JsonView(View.Summary.class)\n        @JsonProperty(\"manufacture\")\n        private String made = \"Honda\";\n\n        @JsonView({View.Summary.class, View.Detail.class})\n        private String model = \"Accord Hybrid\";\n\n        @JsonView({View.Detail.class})\n        @JsonProperty\n        private List<Tire> tires = Arrays.asList(new Tire());\n\n        @JsonView({View.Sale.class})\n        @JsonProperty\n        private int price = 40000;\n\n        // always in\n        private String color = \"White\";\n\n        public String getColor() {\n            return color;\n        }\n    }\n\n    private static class Tire {\n        @JsonView(View.Summary.class)\n        @JsonProperty(\"brand\")\n        private String made = \"Michelin\";\n\n        @JsonView(View.Detail.class)\n        @JsonProperty\n        private String condition = \"new\";\n    }\n\n    @GET\n    @Path(\"/summary\")\n    @JsonView({View.Summary.class})\n    @Operation(description = \"Return car summaries\",\n            responses = @ApiResponse(responseCode = \"200\", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Car.class)))))\n    public Response getSummaries() {\n        return Response.ok(Arrays.asList(new Car())).build();\n    }\n\n    @GET\n    @Path(\"/detail\")\n    @JsonView({View.Detail.class})\n    @Operation(description = \"Return car detail\",\n            responses = @ApiResponse(responseCode = \"200\", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Car.class)))))\n    public List<Car> getDetails() {\n        return Arrays.asList(new Car());\n    }\n\n    @GET\n    @Path(\"/sale\")\n    @JsonView({View.Summary.class, View.Sale.class})\n    public List<Car> getSaleSummaries() {\n        return Arrays.asList(new Car());\n    }\n\n    @GET\n    @Path(\"/all\")\n    @Operation(description = \"Return whole car\",\n            responses = @ApiResponse(responseCode = \"200\", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Car.class)))))\n    public List<Car> getAll() {\n        return Arrays.asList(new Car());\n    }\n\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/it/resources/MultiPartFileResource.java",
    "content": "package io.swagger.v3.jaxrs2.it.resources;\n\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport org.glassfish.jersey.media.multipart.FormDataParam;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\nimport java.io.InputStream;\n\n@Path(\"/files\")\n@Produces(\"application/json\")\npublic class MultiPartFileResource {\n    @POST\n    @Path(\"/upload\")\n    @Consumes(MediaType.MULTIPART_FORM_DATA)\n    public Response uploadFile(@FormDataParam(\"fileIdRenamed\") final String fileId,\n                               @Parameter(schema = @Schema(type = \"string\", format = \"binary\")) @FormDataParam(\"fileRenamed\") final InputStream file) {\n        return Response.status(200).entity(\"File  \" + fileId + \" has been uploaded\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/it/resources/OctetStreamResource.java",
    "content": "package io.swagger.v3.jaxrs2.it.resources;\n\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\nimport java.io.InputStream;\n\n@Path(\"/files\")\n@Produces(\"application/json\")\npublic class OctetStreamResource {\n    @PUT\n    @Path(\"/attach\")\n    @Consumes(MediaType.APPLICATION_OCTET_STREAM)\n    public Response putFile(@RequestBody(content = @Content(mediaType = MediaType.APPLICATION_OCTET_STREAM, schema = @Schema(type = \"string\", format = \"binary\"))) InputStream fileInputStream) {\n        return Response.status(200).entity(\"File has been attached\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/it/resources/UrlEncodedResource.java",
    "content": "package io.swagger.v3.jaxrs2.it.resources;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.FormParam;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\n\n@Path(\"/users\")\n@Produces(\"application/json\")\npublic class UrlEncodedResource {\n    @POST\n    @Path(\"/add\")\n    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n    public Response addUser(@FormParam(\"id\") final String id, @FormParam(\"name\") final String name,\n                            @FormParam(\"gender\") final String gender) {\n        return Response.status(200).entity(\"Adding user  \" + id + \" to the system.\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/it/resources/WidgetResource.java",
    "content": "package io.swagger.v3.jaxrs2.it.resources;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\n\nimport io.swagger.v3.jaxrs2.it.model.Widget;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport javax.ws.rs.core.Response;\n\n@Path(\"/widgets\")\n@Tag(name=\"widgets\")\n@Produces(\"application/json\")\n@Consumes(\"application/json\")\npublic class WidgetResource {\n\n    @Path(\"/{widgetId}\")\n    @GET\n    @Operation(summary = \"Find pet by ID\",\n             description = \"Returns a pet when ID <= 10.  ID > 10 or nonintegers will simulate API error conditions\",\n             responses = @ApiResponse(\n                     content =  @Content(schema = @Schema(implementation = Widget.class)),\n                     description = \"Returns widget with matching id\",\n                     responseCode = \"200\"\n             )\n    )\n    public Response getWidget(@PathParam(\"widgetId\") String widgetId) {\n        return Response.ok(new Widget().setA(\"foo\").setB(\"bar\")).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/matchers/SerializationMatchers.java",
    "content": "package io.swagger.v3.jaxrs2.matchers;\n\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.node.NumericNode;\nimport com.fasterxml.jackson.databind.node.ObjectNode;\n\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.core.util.Yaml31;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport java.io.IOException;\nimport java.util.Comparator;\n\nimport static org.testng.Assert.assertEquals;\n\npublic class SerializationMatchers {\n    private static final Logger LOGGER = LoggerFactory.getLogger(SerializationMatchers.class);\n\n    public static void assertEqualsToYaml(Object objectToSerialize, String yamlStr) {\n        apply(objectToSerialize, yamlStr, Yaml.mapper(), false);\n    }\n\n    public static void assertEqualsToYamlExact(Object objectToSerialize, String yamlStr) {\n        apply(objectToSerialize, yamlStr, Yaml.mapper(), true);\n    }\n\n    public static void assertEqualsToJson(Object objectToSerialize, String jsonStr) {\n        apply(objectToSerialize, jsonStr, Json.mapper(), false);\n    }\n\n    public static void assertEqualsToYaml31(Object objectToSerialize, String yamlStr) {\n        apply31(objectToSerialize, yamlStr, Yaml31.mapper());\n    }\n\n    public static void assertEqualsToJson31(Object objectToSerialize, String jsonStr) {\n        apply31(objectToSerialize, jsonStr, Json31.mapper());\n    }\n\n    private static void apply(Object objectToSerialize, String str, ObjectMapper mapper, boolean exactMatch) {\n        final ObjectNode lhs = mapper.convertValue(objectToSerialize, ObjectNode.class);\n        ObjectNode rhs = null;\n        try {\n            rhs = mapper.readValue(str, ObjectNode.class);\n        } catch (IOException e) {\n            LOGGER.error(\"Failed to read value\", e);\n        }\n        if (exactMatch || !lhs.equals(new ObjectNodeComparator(), rhs)) {\n            assertEquals(Yaml.pretty(lhs), Yaml.pretty(rhs));\n            //fail(String.format(\"Serialized object:\\n%s\\ndoes not equal to expected serialized string:\\n%s\", lhs, rhs));\n        }\n    }\n\n    private static void apply31(Object objectToSerialize, String str, ObjectMapper mapper) {\n        final ObjectNode lhs = mapper.convertValue(objectToSerialize, ObjectNode.class);\n        ObjectNode rhs = null;\n        try {\n            rhs = mapper.readValue(str, ObjectNode.class);\n        } catch (IOException e) {\n            LOGGER.error(\"Failed to read value\", e);\n        }\n        if (!lhs.equals(new ObjectNodeComparator(), rhs)) {\n            assertEquals(Yaml31.pretty(lhs), Yaml31.pretty(rhs));\n        }\n    }\n\n    static final class ObjectNodeComparator implements Comparator<JsonNode> {\n        @Override\n        public int compare(JsonNode o1, JsonNode o2) {\n            if (o1.equals(o2)) {\n                return 0;\n            }\n            if ((o1 instanceof NumericNode) && (o2 instanceof NumericNode)) {\n                double d1 = ((NumericNode) o1).asDouble();\n                double d2 = ((NumericNode) o2).asDouble();\n                return Double.compare(d1, d2);\n            }\n            int comp = o1.asText().compareTo(o2.asText());\n            if (comp == 0) {\n                return Integer.compare(o1.hashCode(), o2.hashCode());\n            }\n            return comp;\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/EmptyPetResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore;\n\n/**\n * An Empty PetResource Class\n */\npublic class EmptyPetResource {\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/PetResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore;\n\nimport io.swagger.v3.jaxrs2.resources.QueryResultBean;\nimport io.swagger.v3.jaxrs2.resources.data.PetData;\nimport io.swagger.v3.jaxrs2.resources.exception.NotFoundException;\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.BeanParam;\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n@Consumes(\"application/json\")\n@Path(\"/pet\")\n@Produces({\"application/json\", \"application/xml\"})\npublic class PetResource {\n    static PetData petData = new PetData();\n\n    @GET\n    @Path(\"/{petId}\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"Returns a pet when 0 < ID <= 10.  ID > 10 or nonintegers will simulate API error conditions\",\n            responses = {\n                    @ApiResponse(\n                            description = \"The pet\", content = @Content(\n                            schema = @Schema(implementation = Pet.class)\n                    )),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\")\n            })\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\"/*, _enum = \"range[1,10]\"*/, required = true)\n            @PathParam(\"petId\") final Long petId) throws NotFoundException {\n        Pet pet = petData.getPetById(petId);\n        if (null != pet) {\n            return Response.ok().entity(pet).build();\n        } else {\n            throw new NotFoundException(404, \"Pet not found\");\n        }\n    }\n\n    @POST\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPet(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) final Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodynoannotation\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Produces({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store no annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetNoAnnotation(final Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodyid\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store passing an integer with generic parameter annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetByInteger(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) final int petId) {\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodyidnoannotation\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store passing an integer without parameter annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetByIntegerNoAnnotation(final int petId) {\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @PUT\n    @Operation(summary = \"Update an existing pet\",\n            responses = {\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\"),\n                    @ApiResponse(responseCode = \"405\", description = \"Validation exception\")})\n    public Response updatePet(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) final Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @GET\n    @Path(\"/findByStatus\")\n    @Produces(\"application/xml\")\n    @Operation(summary = \"Finds Pets by status\",\n            description = \"Multiple status values can be provided with comma separated strings\",\n            responses = {\n                    @ApiResponse(\n                            content = @Content(mediaType = \"application/json\",\n                                    schema = @Schema(implementation = Pet.class))),\n                    @ApiResponse(\n                            responseCode = \"400\", description = \"Invalid status value\"\n                    )}\n    )\n    public Response findPetsByStatus(\n            @Parameter(description = \"Status values that need to be considered for filter\", required = true) @QueryParam(\"status\") final String status,\n            @BeanParam final QueryResultBean qr\n    ) {\n        return Response.ok(petData.findPetByStatus(status)).build();\n    }\n\n    @GET\n    @Path(\"/findByTags\")\n    @Produces(\"application/json\")\n    @Operation(summary = \"Finds Pets by tags\",\n            description = \"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\",\n            responses = {\n                    @ApiResponse(description = \"Pets matching criteria\",\n                            content = @Content(schema = @Schema(implementation = Pet.class))\n                    ),\n                    @ApiResponse(description = \"Invalid tag value\", responseCode = \"400\")\n            })\n    @Deprecated\n    public Response findPetsByTags(\n            @Parameter(description = \"Tags to filter by\", required = true) @QueryParam(\"tags\") final String tags) {\n        return Response.ok(petData.findPetByTags(tags)).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/WebHookResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore;\n\nimport io.swagger.v3.jaxrs2.petstore.parameter.Parameters31Resource;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.StringToClassMapItem;\nimport io.swagger.v3.oas.annotations.Webhook;\nimport io.swagger.v3.oas.annotations.Webhooks;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\n@Webhooks({\n        @Webhook(\n                name = \"webhook1\",\n                operation = @Operation(operationId = \"subscribe\",\n                        description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                                \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n                        parameters = {\n                                @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\",\n                                        required = true,\n                                        schema = @Schema(\n                                                $id = \"http://yourdomain.com/schemas/myschema.json\",\n                                                $comment = \"schema $comment\",\n                                                type = \"string\"\n                                        ),\n                                        style = ParameterStyle.SIMPLE),\n                                @Parameter(in = ParameterIn.QUERY, name = \"explodeFalse\",\n                                        required = true,\n                                        explode = Explode.FALSE,\n                                        schema = @Schema(\n                                                types = {\"string\", \"number\"},\n                                                exclusiveMaximumValue = 100,\n                                                $schema = \"parameter $schema\",\n                                                $anchor = \"parameter $anchor\",\n                                                _if = Parameters31Resource.SubscriptionResponse.class,\n                                                _else = Parameters31Resource.SubscriptionResponse.class,\n                                                then = Parameters31Resource.SubscriptionResponse.class\n                                        )\n                                )\n                        }\n                )\n        ),\n        @Webhook(\n                name = \"webhook2\",\n                operation = @Operation(\n                        operationId = \"getAllReviews\",\n                        summary = \"get all the reviews\",\n                        method = \"get\",\n                        responses = @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"successful operation\",\n                                content = @Content(\n                                        mediaType = \"application/json\",\n                                        schema = @Schema(\n                                                $id = \"http://yourdomain.com/schemas/myschema.json\",\n                                                $comment = \"random comment\",\n                                                types = { \"integer\", \"number\" },\n                                                dependentSchemas = {\n                                                        @StringToClassMapItem(\n                                                                key = \"pet\",\n                                                                value = Object.class\n                                                        )\n                                                },\n                                                patternProperties = {\n                                                        @StringToClassMapItem(\n                                                                key = \"user\",\n                                                                value = Object.class\n                                                        )\n                                                },\n                                                format = \"int32\"\n                                        )\n                                )\n                        )\n                )\n        )\n\n})\n\npublic class WebHookResource {\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/callback/ComplexCallback31Resource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.callback;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.StringToClassMapItem;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.callbacks.Callbacks;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\npublic class ComplexCallback31Resource {\n    @Callbacks({\n            @Callback(\n                    name = \"testCallback1\",\n                    operation = @Operation(\n                            operationId = \"getAllReviews\",\n                            summary = \"get all the reviews\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    $id = \"http://yourdomain.com/schemas/myschema.json\",\n                                                    $comment = \"random comment\",\n                                                    types = { \"integer\", \"number\" },\n                                                    dependentSchemas = {\n                                                            @StringToClassMapItem(\n                                                                    key = \"pet\",\n                                                                    value = Object.class\n                                                            )\n                                                    },\n                                                    patternProperties = {\n                                                            @StringToClassMapItem(\n                                                                    key = \"user\",\n                                                                    value = Object.class\n                                                            )\n                                                    },\n                                                    format = \"int32\")))),\n                    callbackUrlExpression = \"http://www.url.com\"),\n            @Callback(\n                    name = \"testCallback2\",\n                    operation = @Operation(\n                            operationId = \"getAnSpecificReviews\",\n                            summary = \"get a review\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    implementation = User.class)))),\n                    callbackUrlExpression = \"http://www.url2.com\")\n    })\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"getWithNoParameters\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\")\n            })\n    @GET\n    @Path(\"/complexcallback\")\n    public String simpleGet(@Parameter(description = \"idParam\", schema = @Schema(implementation = User.class))\n                            @QueryParam(\"id\") final String id) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/callback/ComplexCallbackResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.callback;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.callbacks.Callbacks;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\npublic class ComplexCallbackResource {\n    @Callbacks({\n            @Callback(\n                    name = \"testCallback1\",\n                    operation = @Operation(\n                            operationId = \"getAllReviews\",\n                            summary = \"get all the reviews\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    type = \"integer\",\n                                                    format = \"int32\")))),\n                    callbackUrlExpression = \"http://www.url.com\"),\n            @Callback(\n                    name = \"testCallback2\",\n                    operation = @Operation(\n                            operationId = \"getAnSpecificReviews\",\n                            summary = \"get a review\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    implementation = User.class)))),\n                    callbackUrlExpression = \"http://www.url2.com\")\n    })\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"getWithNoParameters\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\")\n            })\n    @GET\n    @Path(\"/complexcallback\")\n    public String simpleGet(@Parameter(description = \"idParam\", schema = @Schema(implementation = User.class))\n                            @QueryParam(\"id\") final String id) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/callback/MultipleCallbacksTestWithOperationResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.callback;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.callbacks.Callbacks;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class MultipleCallbacksTestWithOperationResource {\n    @Callbacks({\n            @Callback(\n                    name = \"testCallback1\",\n                    operation = @Operation(\n                            operationId = \"getAllReviews\",\n                            summary = \"get all the reviews\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    type = \"integer\",\n                                                    format = \"int32\")))),\n                    callbackUrlExpression = \"http://www.url.com\"),\n            @Callback(name = \"testCallback2\", operation = @Operation(), callbackUrlExpression = \"http://$request.query.url\")\n    })\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"getWithNoParameters\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\")\n            })\n    @GET\n    @Path(\"/multiplecallback\")\n    public String simpleGet() {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/callback/RepeatableCallbackResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.callback;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class RepeatableCallbackResource {\n    @Callback(name = \"testCallback\", operation =\n    @Operation(), callbackUrlExpression = \"http://$requests.query.url\")\n    @Callback(\n            name = \"testCallback1\",\n            operation = @Operation(\n                    operationId = \"getAllReviews\",\n                    summary = \"get all the reviews\",\n                    method = \"get\",\n                    responses = @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"successful operation\",\n                            content = @Content(\n                                    mediaType = \"application/json\",\n                                    schema = @Schema(\n                                            type = \"integer\",\n                                            format = \"int32\")))),\n            callbackUrlExpression = \"http://www.url.com\")\n    @Callback(name = \"testCallback2\", operation =\n    @Operation(),\n            callbackUrlExpression = \"http://$request.query.url\")\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"getWithNoParameters\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\")\n            })\n    @GET\n    @Path(\"/repeatablecallback\")\n    public String simpleGet() {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/callback/SimpleCallbackWithOperationResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.callback;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.callbacks.Callbacks;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class SimpleCallbackWithOperationResource {\n    @Callbacks({\n            @Callback(\n                    name = \"testCallback1\",\n                    operation = @Operation(\n                            operationId = \"getAllReviews\",\n                            summary = \"get all the reviews\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    type = \"integer\",\n                                                    format = \"int32\")))),\n                    callbackUrlExpression = \"http://www.url.com\")\n    })\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"getWithNoParameters\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\")\n            })\n    @GET\n    @Path(\"/simplecallback\")\n    public String simpleGet() {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/example/ExamplesResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.example;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\n/**\n * Examples Resource Scenario\n */\npublic class ExamplesResource {\n    @Path(\"/example\")\n    @POST\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account\",\n            parameters = {\n                    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n                            schema = @Schema(name = \"Schema\", description = \"Schema\", example = \"Subscription example\"),\n                            style = ParameterStyle.SIMPLE, example = \"example\",\n                            examples = {\n                                    @ExampleObject(name = \"subscriptionId_1\", value = \"12345\",\n                                            summary = \"Subscription number 12345\", externalValue = \"Subscription external value 1\"),\n                                    @ExampleObject(name = \"subscriptionId_2\", value = \"54321\",\n                                            summary = \"Subscription number 54321\", externalValue = \"Subscription external value 2\")\n                            })\n            },\n            responses = {\n                    @ApiResponse(\n                            description = \"test description\",\n                            content = @Content(\n                                    mediaType = \"*/*\",\n                                    schema = @Schema(\n                                            type = \"string\",\n                                            format = \"uuid\",\n                                            description = \"the generated UUID\",\n                                            accessMode = Schema.AccessMode.READ_ONLY,\n                                            example = \"Schema example\"\n                                    ),\n                                    examples = {\n                                            @ExampleObject(name = \"Default Response\", value = \"SubscriptionResponse\",\n                                                    summary = \"Subscription Response Example\", externalValue = \"Subscription Response value 1\")\n                                    }\n                            ))\n            })\n    public SubscriptionResponse subscribe(@RequestBody(description = \"Created user object\", required = true,\n            content = @Content(\n                    schema = @Schema(\n                            type = \"string\",\n                            format = \"uuid\",\n                            description = \"the generated UUID\",\n                            accessMode = Schema.AccessMode.READ_ONLY,\n                            example = \"Schema example\"),\n                    examples = {\n                            @ExampleObject(name = \"Default Request\", value = \"SubscriptionRequest\",\n                                    summary = \"Subscription Request Example\", externalValue = \"Subscription Request Value\")\n                    })) User user) {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/example/SubscriptionResponse.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.example;\n\npublic class SubscriptionResponse {\n    public String subscriptionId;\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/link/LinksAndContent31Resource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.link;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.StringToClassMapItem;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.extensions.ExtensionProperty;\nimport io.swagger.v3.oas.annotations.links.Link;\nimport io.swagger.v3.oas.annotations.links.LinkParameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.DependentSchema;\nimport io.swagger.v3.oas.annotations.media.DependentSchemas;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with Links\n */\npublic class LinksAndContent31Resource {\n    @Path(\"/links\")\n    @Operation(operationId = \"getUserWithAddress\",\n            responses = {\n                    @ApiResponse(description = \"test description\",\n                            content = @Content(\n                                    mediaType = \"*/*\",\n                                    schema = @Schema(\n                                            types = { \"object\" }\n                                    ),\n                                    dependentSchemas = {\n                                            @DependentSchema(\n                                                    name = \"value\",\n                                                    schema = @Schema(\n                                                            types = {\n                                                                    \"string\",\n                                                                    \"number\"\n                                                            }\n                                                    )\n                                            )\n                                    }\n                            ),\n                            links = {\n                                    @Link(\n                                            name = \"address\",\n                                            operationId = \"getAddress\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\")),\n                                    @Link(\n                                            name = \"user\",\n                                            operationId = \"getUser\",\n                                            operationRef = \"#/components/links/MyLink\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\"),\n                                            extensions = @Extension(\n                                                    name = \"x-one\",\n                                                    properties = {\n                                                            @ExtensionProperty(\n                                                                    name = \"x-sample-extension\",\n                                                                    value = \"true\"\n                                                            )\n                                                    }\n                                            )\n\n                                    )\n                            })}\n    )\n    @GET\n    public String getUser(@QueryParam(\"userId\")final String userId) {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/link/LinksResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.link;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.links.Link;\nimport io.swagger.v3.oas.annotations.links.LinkParameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with Links\n */\npublic class LinksResource {\n    @Path(\"/links\")\n    @Operation(operationId = \"getUserWithAddress\",\n            responses = {\n                    @ApiResponse(description = \"test description\",\n                            content = @Content(mediaType = \"*/*\", schema = @Schema(ref = \"#/components/schemas/User\")),\n                            links = {\n                                    @Link(\n                                            name = \"address\",\n                                            operationId = \"getAddress\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\")),\n                                    @Link(\n                                            name = \"user\",\n                                            operationId = \"getUser\",\n                                            operationRef = \"#/components/links/MyLink\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\"))\n                            })}\n    )\n    @GET\n    public String getUser(@QueryParam(\"userId\")final String userId) {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/openapidefintion/OpenAPI31DefinitionResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.openapidefintion;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.info.Contact;\nimport io.swagger.v3.oas.annotations.info.Info;\nimport io.swagger.v3.oas.annotations.info.License;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.servers.Server;\nimport io.swagger.v3.oas.annotations.servers.ServerVariable;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\n/**\n * OpenAPIDefinition Example\n */\n@OpenAPIDefinition(\n        info = @Info(\n                title = \"Pet Resource Example\",\n                version = \"2.0\",\n                description = \"API Definition\",\n                summary = \"API Summary\",\n                termsOfService = \"Terms of service\",\n                license = @License(name = \"Apache 2.0\", url = \"http://foo.bar\", identifier = \"Apache\"),\n                contact = @Contact(url = \"http://gigantic-server.com\", name = \"Fred\", email = \"Fred@gigagantic-server.com\")\n        )\n)\npublic class OpenAPI31DefinitionResource {\n    public void foo() {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/openapidefintion/OpenAPIDefinitionResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.openapidefintion;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.info.Contact;\nimport io.swagger.v3.oas.annotations.info.Info;\nimport io.swagger.v3.oas.annotations.info.License;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.servers.Server;\nimport io.swagger.v3.oas.annotations.servers.ServerVariable;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\n/**\n * OpenAPIDefinition Example\n */\n@OpenAPIDefinition(\n        info = @Info(\n                title = \"Pet Resource Example\",\n                version = \"2.0\",\n                description = \"API Definition\",\n                termsOfService = \"Terms of service\",\n                license = @License(name = \"Apache 2.0\", url = \"http://foo.bar\"),\n                contact = @Contact(url = \"http://gigantic-server.com\", name = \"Fred\", email = \"Fred@gigagantic-server.com\")\n        ),\n        tags = {\n                @Tag(name = \"Tag 1\", description = \"desc 1\", externalDocs = @ExternalDocumentation(description = \"docs desc\")),\n                @Tag(name = \"Tag 2\", description = \"desc 2\", externalDocs = @ExternalDocumentation(description = \"docs desc 2\")),\n                @Tag(name = \"Tag 3\")\n        },\n        externalDocs = @ExternalDocumentation(description = \"definition docs desc\"),\n        security = {\n                @SecurityRequirement(name = \"req 1\", scopes = {\"a\", \"b\"}),\n                @SecurityRequirement(name = \"req 2\", scopes = {\"b\", \"c\"})\n        },\n        servers = {\n                @Server(\n                        description = \"server 1\",\n                        url = \"http://foo\",\n                        variables = {\n                                @ServerVariable(name = \"var1\", description = \"var 1\", defaultValue = \"1\", allowableValues = {\"1\", \"2\"}),\n                                @ServerVariable(name = \"var2\", description = \"var 2\", defaultValue = \"1\", allowableValues = {\"1\", \"2\"})\n                        })\n        }\n)\npublic class OpenAPIDefinitionResource {\n    public void foo() {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/AnnotatedSameNameOperationResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.operation;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.DELETE;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Default Operation without Annotation\n */\npublic class AnnotatedSameNameOperationResource {\n    @Path(\"/sameOperationName\")\n    @GET\n    @Operation(description = \"Same Operation Name\")\n    public String getUser() {\n        return new String();\n    }\n\n    @Path(\"//sameOperationName\")\n    @DELETE\n    @Operation(description = \"Same Operation Name Duplicated\")\n    public String getUser(final String id) {\n        return new String();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/ExternalDocumentationResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.operation;\n\nimport io.swagger.v3.jaxrs2.resources.exception.NotFoundException;\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with Operations Examples\n */\npublic class ExternalDocumentationResource {\n    @GET\n    @Path(\"/{petId}\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"Returns a pet when 0 < ID <= 10.  ID > 10 or non integers will simulate API error conditions\",\n            operationId = \"petId\",\n            externalDocs = @ExternalDocumentation(description = \"External in Operation\", url = \"http://url.me\"))\n    @ExternalDocumentation(description = \"External Annotation Documentation\", url = \"http://url.me\")\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\", required = true)\n            @PathParam(\"petId\") Long petId) throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/FullyAnnotatedOperationResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.operation;\n\nimport io.swagger.v3.jaxrs2.resources.exception.NotFoundException;\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with Operations Examples\n */\npublic class FullyAnnotatedOperationResource {\n    @GET\n    @Path(\"/fullyannotatedoperation/{petId}\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"Returns a pet when 0 < ID <= 10.  ID > 10 or non integers will simulate API error conditions\",\n            operationId = \"petId\",\n            responses = {\n                    @ApiResponse(\n                            description = \"The pet\", content = @Content(\n                            schema = @Schema(implementation = Pet.class)\n                    )),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\")\n            })\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\", required = true)\n            @PathParam(\"petId\")final Long petId) throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/HiddenOperationResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.operation;\n\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Hidden;\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Hidden Operation\n */\npublic class HiddenOperationResource {\n    @Path(\"/hiddenbyflag\")\n    @GET\n    @Operation(operationId = \"Pets\", description = \"Pets Example\", hidden = true)\n    public Pet getPet() {\n        return new Pet();\n    }\n\n    @Path(\"/hiddenbyannotation\")\n    @GET\n    @Operation(operationId = \"Users\", description = \"Users Example\")\n    @Hidden\n    public User getUser() {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/InterfaceResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.operation;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Interface resource\n */\npublic interface InterfaceResource {\n    @GET\n    @Path(\"/interfaceoperation/{petId}\")\n    @Operation(summary = \"Find pet by ID Operation in Parent\",\n            description = \"Returns a pet in Parent\"\n    )\n    Response getPetById(@Parameter(description = \"ID of pet that needs to be fetched\", required = true)\n                        @PathParam(\"petId\")final Long petId);\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/NotAnnotatedSameNameOperationResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Default Operation without Annotation\n */\npublic class NotAnnotatedSameNameOperationResource {\n    @Path(\"/notannotatedoperation\")\n    @GET\n    public String getUser() {\n        return new String();\n    }\n\n    @Path(\"/notannotatedoperationduplicated\")\n    @GET\n    public String getUser(final String id) {\n        return new String();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/OperationResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.operation;\n\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.HEAD;\nimport javax.ws.rs.NotFoundException;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with Complete Operations Examples\n */\npublic class OperationResource implements InterfaceResource {\n    @Override\n    @Operation(summary = \"Find pet by ID Operation in SubResource\",\n            description = \"Returns a pet in SubResource\"\n    )\n    public Response getPetById(final Long petId) {\n        return Response.ok().entity(new Pet()).build();\n    }\n\n    @GET\n    @Path(\"/operationsresource\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"combinatedfullyannotatedoperation/{petId}\",\n            operationId = \"petId\",\n            responses = {\n                    @ApiResponse(\n                            description = \"The pet\", content = @Content(\n                            schema = @Schema(implementation = Pet.class)\n                    )),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\")\n            })\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\", required = true)\n            @QueryParam(\"petId\") final Long petId, final String message) throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n\n    @Path(\"/operationsresource\")\n    @POST\n    public String getUser(final String id) {\n        return new String();\n    }\n\n    @Path(\"/operationsresource\")\n    @PUT\n    @Operation(operationId = \"combinated sameOperationName\",\n            description = \"combinatedsameOperationName\")\n    public String getPerson() {\n        return new String();\n    }\n\n    @Path(\"/operationsresource\")\n    @HEAD\n    @Operation(operationId = \"combinatedsameOperationNameDuplicated\",\n            description = \"combinatedsameOperationNameDuplicated\")\n    public String getPerson(final String id) {\n        return new String();\n    }\n\n    @Path(\"/operationsresource2\")\n    @GET\n    public String getUser() {\n        return new String();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/OperationWithoutAnnotationResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Default Operation without Annotation\n */\npublic class OperationWithoutAnnotationResource {\n    @Path(\"/operationwithouannotation\")\n    @GET\n    public String getUser() {\n        return new String();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/ServerOperationResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.operation;\n\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.servers.Server;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Hidden Operation\n */\n@OpenAPIDefinition(\n        servers = {\n                @Server(description = \"server 1\", url = \"http://foo\")\n        }\n)\npublic class ServerOperationResource {\n    @Path(\"/serversoperation\")\n    @GET\n    @Operation(operationId = \"Pets\", description = \"Pets Example\",\n            servers = {\n                    @Server(description = \"server 2\", url = \"http://foo2\")\n            }\n    )\n    public Pet getPet() {\n        return new Pet();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/SubResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.operation;\n\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.core.Response;\n\n/**\n * SubResource\n */\n\npublic class SubResource implements InterfaceResource {\n    @Override\n    @Operation(summary = \"Find pet by ID Operation in SubResource\",\n            description = \"Returns a pet in SubResource\"\n    )\n    public Response getPetById(final Long petId) {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/ArraySchemaResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\npublic class ArraySchemaResource {\n    @Path(\"/arrayschema\")\n    @POST\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                    \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n            parameters = {\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameter\", required = true, explode = Explode.TRUE,\n                            array = @ArraySchema(maxItems = 10, minItems = 1,\n                                    schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class),\n                                    uniqueItems = true\n                            )\n                    ),\n            },\n            responses = {\n                    @ApiResponse(\n                            description = \"test description\", content = @Content(\n                            mediaType = \"*/*\",\n                            schema =\n                            @Schema(\n                                    implementation = ParametersResource.SubscriptionResponse.class)\n                    ))\n            })\n    @Consumes({\"application/json\", \"application/xml\"})\n    public ParametersResource.SubscriptionResponse subscribe() {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/ComplexParameterResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.parameter;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a multiple annotated.\n */\npublic class ComplexParameterResource {\n\n    @Parameter(description = \"Phone definied in Field\")\n    private String phone;\n\n    public ComplexParameterResource(@Parameter(description = \"phone Param\", name = \"phone\") final String phone) {\n        this.phone = phone;\n    }\n\n    @GET\n    @Path(\"/complexparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@Parameter(description = \"idParam\") @QueryParam(\"id\") final String id,\n                         final String name, @QueryParam(\"lastName\") final String lastName,\n                         @Parameter(description = \"address\", schema = @Schema(implementation = User.class))\n                         @QueryParam(\"address\") final String address) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/ComplexParameterWithOperationResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.parameter;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a multiple annotated.\n */\npublic class ComplexParameterWithOperationResource {\n\n    @Parameter(description = \"Phone definied in Field\")\n    private String phone;\n\n    public ComplexParameterWithOperationResource(@Parameter(description = \"phone Param\", name = \"phone\") final String phone) {\n        this.phone = phone;\n    }\n\n    @GET\n    @Path(\"/complexparameter\")\n    @Operation(operationId = \"create User\",\n            parameters = {\n                    @Parameter(description = \"Phone\", name = \"phone\", in = ParameterIn.PATH)\n            })\n    public User findUser(@Parameter(description = \"idParam\") @QueryParam(\"id\") final String id,\n                         final String name, @QueryParam(\"lastName\") final String lastName,\n                         @Parameter(description = \"address\", schema = @Schema(implementation = User.class))\n                         @QueryParam(\"address\") final String address) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/MultipleNotAnnotatedParameter.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\n/**\n * Class with a multiple not annotated parameter.\n */\npublic class MultipleNotAnnotatedParameter {\n    @POST\n    @Path(\"/multiplenoannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public void createUser(final String id, final String name) {\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/OpenAPIJaxRSAnnotatedParameter.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.parameter;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a single parameter annotated with jaxrs and open api annotation.\n */\npublic class OpenAPIJaxRSAnnotatedParameter {\n    @GET\n    @Path(\"/openapijaxrsannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@Parameter(description = \"idParam\") @QueryParam(\"id\") final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/OpenAPIWithContentJaxRSAnnotatedParameter.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.parameter;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a single parameter annotated with jaxrs and open api annotation.\n */\npublic class OpenAPIWithContentJaxRSAnnotatedParameter {\n    @GET\n    @Path(\"/openapiwithcontentjaxrsannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@Parameter(description = \"idParam\", content =\n    @Content(schema = @Schema(description = \"Id Schema Definition\", required = true, name = \"id\")))\n                         @QueryParam(\"id\") final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/OpenAPIWithImplementationJaxRSAnnotatedParameter.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.parameter;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a single parameter annotated with jaxrs and open api annotation.\n */\npublic class OpenAPIWithImplementationJaxRSAnnotatedParameter {\n    @GET\n    @Path(\"/openapiwithimplementationjaxrsannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@Parameter(description = \"idParam\", schema = @Schema(implementation = User.class))\n                         @QueryParam(\"id\") final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/Parameters31Resource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.parameter;\n\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.StringToClassMapItem;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Resource with some Parameters examples\n */\npublic class Parameters31Resource {\n    @Path(\"/parameters\")\n    @POST\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                    \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n            parameters = {\n                    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\",\n                            required = true,\n                            schema = @Schema(\n                                    $id = \"http://yourdomain.com/schemas/myschema.json\",\n                                    $comment = \"schema $comment\",\n                                    type = \"string\"\n                            ),\n                            style = ParameterStyle.SIMPLE),\n                    @Parameter(in = ParameterIn.QUERY, name = \"explodeFalse\",\n                            required = true,\n                            explode = Explode.FALSE,\n                            schema = @Schema(\n                                    types = { \"string\", \"number\" },\n                                    exclusiveMaximumValue = 100,\n                                    $schema = \"parameter $schema\",\n                                    $anchor = \"parameter $anchor\",\n                                    _if = Parameters31Resource.SubscriptionResponse.class,\n                                    _else = Parameters31Resource.SubscriptionResponse.class,\n                                    then = Parameters31Resource.SubscriptionResponse.class\n                            )),\n                    @Parameter(in = ParameterIn.QUERY, name = \"explodeAvoiding\", required = true, explode = Explode.TRUE,\n                            schema = @Schema(\n                                    type = \"int\",\n                                    format = \"id\",\n                                    exclusiveMaximumValue = 1000,\n                                    exclusiveMinimumValue = 10,\n                                    description = \"the generated id\",\n                                    accessMode = Schema.AccessMode.READ_ONLY\n                            )),\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameter\", required = true, explode = Explode.TRUE,\n                            array = @ArraySchema(maxItems = 10, minItems = 1,\n                                    schema = @Schema(implementation = Parameters31Resource.SubscriptionResponse.class),\n                                    uniqueItems = true\n                            )\n                            ,\n                            schema = @Schema(\n                                    type = \"int\",\n                                    format = \"id\",\n                                    description = \"the generated id\",\n                                    accessMode = Schema.AccessMode.READ_ONLY),\n                            content = @Content(schema = @Schema(type = \"number\",\n                                    description = \"the generated id\",\n                                    accessMode = Schema.AccessMode.READ_ONLY))\n                    ),\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation\", required = true, explode = Explode.TRUE,\n                            array = @ArraySchema(\n                                    maxItems = 10,\n                                    minItems = 1,\n                                    maxContains = 50,\n                                    minContains = 1,\n                                    contains = @Schema(implementation = Parameters31Resource.SubscriptionResponse.class),\n                                    unevaluatedItems = @Schema(implementation = Parameters31Resource.SubscriptionResponse.class),\n                                    schema = @Schema(implementation = Parameters31Resource.SubscriptionResponse.class),\n                                    uniqueItems = true\n                            )\n                    ),\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation2\", required = true, explode = Explode.TRUE,\n                            schema = @Schema(implementation = Parameters31Resource.SubscriptionResponse.class))\n\n            },\n            responses = {\n                    @ApiResponse(\n                            description = \"test description\", content = @Content(\n                            mediaType = \"*/*\",\n                            schema = @Schema(\n                                    $id = \"http://yourdomain.com/schemas/myschema.json\",\n                                    dependentSchemas = {\n                                            @StringToClassMapItem(\n                                                    key = \"pet\",\n                                                    value = Pet.class\n                                            )\n                                    },\n                                    patternProperties = {\n                                            @StringToClassMapItem(\n                                                    key = \"user\",\n                                                    value = User.class\n                                            )\n                                    },\n                                    properties = {\n                                            @StringToClassMapItem(\n                                                    key = \"extraObject\",\n                                                    value = Object.class\n                                            )\n                                    }\n                            )\n                    ))\n            })\n    @Consumes({\"application/json\", \"application/xml\"})\n    public Parameters31Resource.SubscriptionResponse subscribe(@Parameter(description = \"idParam\")\n                                                             @QueryParam(\"id\") final String id) {\n        return null;\n    }\n\n    public static class SubscriptionResponse {\n        public String subscriptionId;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/ParametersResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Resource with some Parameters examples\n */\npublic class ParametersResource {\n    @Path(\"/parameters\")\n    @POST\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                    \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n            parameters = {\n                    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n                            schema = @Schema(implementation = RepeatableParametersResource.SubscriptionResponse.class), style = ParameterStyle.SIMPLE),\n                    @Parameter(in = ParameterIn.QUERY, name = \"formId\", required = true,\n                            example = \"Example\"),\n                    @Parameter(in = ParameterIn.QUERY, name = \"explodeFalse\", required = true, explode = Explode.FALSE,\n                            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class)),\n                    @Parameter(in = ParameterIn.QUERY, name = \"explodeTrue\", required = true, explode = Explode.TRUE,\n                            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class)),\n                    @Parameter(in = ParameterIn.QUERY, name = \"explodeAvoiding\", required = true, explode = Explode.TRUE,\n                            schema = @Schema(\n                                    type = \"int\",\n                                    format = \"id\",\n                                    description = \"the generated id\",\n                                    accessMode = Schema.AccessMode.READ_ONLY\n                            )),\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameter\", required = true, explode = Explode.TRUE,\n                            array = @ArraySchema(maxItems = 10, minItems = 1,\n                                    schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class),\n                                    uniqueItems = true\n                            )\n                            ,\n                            schema = @Schema(\n                                    type = \"int\",\n                                    format = \"id\",\n                                    description = \"the generated id\",\n                                    accessMode = Schema.AccessMode.READ_ONLY),\n                            content = @Content(schema = @Schema(type = \"number\",\n                                    description = \"the generated id\",\n                                    accessMode = Schema.AccessMode.READ_ONLY))\n                    ),\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation\", required = true, explode = Explode.TRUE,\n                            array = @ArraySchema(maxItems = 10, minItems = 1,\n                                    schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class),\n                                    uniqueItems = true\n                            )\n                    ),\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation2\", required = true, explode = Explode.TRUE,\n                            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class))\n\n            },\n            responses = {\n                    @ApiResponse(\n                            description = \"test description\", content = @Content(\n                            mediaType = \"*/*\",\n                            schema =\n                            @Schema(\n                                    implementation = ParametersResource.SubscriptionResponse.class)\n                    ))\n            })\n    @Consumes({\"application/json\", \"application/xml\"})\n    public ParametersResource.SubscriptionResponse subscribe(@Parameter(description = \"idParam\")\n                                                             @QueryParam(\"id\") final String id) {\n        return null;\n    }\n\n    static class SubscriptionResponse {\n        public String subscriptionId;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/RepeatableParametersResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\npublic class RepeatableParametersResource {\n    @Path(\"/repeatableparameter\")\n    @POST\n    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class), style = ParameterStyle.SIMPLE)\n    @Parameter(in = ParameterIn.QUERY, name = \"formId\", required = true,\n            example = \"Example\")\n    @Parameter(in = ParameterIn.QUERY, name = \"explodeFalse\", required = true, explode = Explode.FALSE,\n            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class))\n    @Parameter(in = ParameterIn.QUERY, name = \"explodeTrue\", required = true, explode = Explode.TRUE,\n            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class))\n    @Parameter(in = ParameterIn.QUERY, name = \"explodeAvoiding\", required = true, explode = Explode.TRUE,\n            schema = @Schema(\n                    type = \"int\",\n                    format = \"id\",\n                    description = \"the generated id\",\n                    accessMode = Schema.AccessMode.READ_ONLY\n            ))\n    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameter\", required = true, explode = Explode.TRUE,\n            array = @ArraySchema(maxItems = 10, minItems = 1,\n                    schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class),\n                    uniqueItems = true\n            )\n            ,\n            schema = @Schema(\n                    type = \"int\",\n                    format = \"id\",\n                    description = \"the generated id\",\n                    accessMode = Schema.AccessMode.READ_ONLY),\n            content = @Content(schema = @Schema(type = \"number\",\n                    description = \"the generated id\",\n                    accessMode = Schema.AccessMode.READ_ONLY))\n    )\n    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation\", required = true, explode = Explode.TRUE,\n            array = @ArraySchema(maxItems = 10, minItems = 1,\n                    schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class),\n                    uniqueItems = true\n            )\n    )\n    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation2\", required = true, explode = Explode.TRUE,\n            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class))\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                    \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n            responses = {\n                    @ApiResponse(\n                            description = \"test description\", content = @Content(\n                            mediaType = \"*/*\",\n                            schema =\n                            @Schema(\n                                    implementation = ParametersResource.SubscriptionResponse.class)\n                    ))\n            })\n    @Consumes({\"application/json\", \"application/xml\"})\n    public ParametersResource.SubscriptionResponse subscribe() {\n        return null;\n    }\n\n    static class SubscriptionResponse {\n        public String subscriptionId;\n    }\n}\n\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/SingleJaxRSAnnotatedParameter.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.parameter;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a single parameter annotated with jaxrs.\n */\npublic class SingleJaxRSAnnotatedParameter {\n    @GET\n    @Path(\"/singlejaxrsannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@QueryParam(\"id\") final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/SingleNotAnnotatedParameter.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.parameter;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Class with a single not annotated parameter.\n */\npublic class SingleNotAnnotatedParameter {\n    @GET\n    @Path(\"/singlenoannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/requestbody/RequestBody31Resource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.requestbody;\n\nimport io.swagger.v3.jaxrs2.petstore.parameter.Parameters31Resource;\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with RequestBody examples\n */\npublic class RequestBody31Resource {\n\n    @GET\n    @Path(\"/methodWithRequestBodyWithoutContentWithoutImplementation\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response methodWithRequestBodyWithoutContentWithoutImplementation(\n            @RequestBody(description = \"Created user object\", required = true,\n                    content = @Content(\n                            schema = @Schema(name = \"User\",\n                                    description = \"User description\",\n                                    example = \"User Description\",\n                                    required = true,\n                                    types = { \"string\", \"number\", \"object\" },\n                                    exclusiveMaximumValue = 100,\n                                    exclusiveMinimumValue = 1,\n                                    $schema = \"parameter $schema\",\n                                    $anchor = \"parameter $anchor\",\n                                    _if = Object.class,\n                                    _else = Object.class,\n                                    then = Object.class,\n                                    unevaluatedProperties = Object.class\n                            )))\n            final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @POST\n    @Path(\"/methodWithRequestBodyAndTwoParameters\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response methodWithRequestBodyAndTwoParameters(\n            @RequestBody(description = \"Created user object\", required = true,\n                    content = @Content(\n                            schema = @Schema(implementation = User.class))) final User user,\n            @QueryParam(\"name\") final String name, @QueryParam(\"code\") final String code) {\n        return Response.ok().entity(\"\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/requestbody/RequestBodyMethodPriorityResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.requestbody;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with RequestBody inside Operation and another in Method\n */\npublic class RequestBodyMethodPriorityResource {\n    @POST\n    @Path(\"/requestbodymethodpriority\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\",\n            requestBody = @RequestBody(description = \"Inside Operation\"))\n    @RequestBody(description = \"Created user object on Method\", required = true,\n            content = @Content(\n                    schema = @Schema(implementation = User.class)))\n    public Response methodWithRequestBodyAndTwoParameters(final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/requestbody/RequestBodyParameterPriorityResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.requestbody;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with RequestBody inside Operation and another in Method\n */\npublic class RequestBodyParameterPriorityResource {\n    @POST\n    @Path(\"/requestbodyparameterpriority\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\",\n            requestBody = @RequestBody(description = \"Inside Operation\"))\n    @RequestBody(description = \"On method\")\n    public Response methodWithRequestBodyAndTwoParameters(\n            @RequestBody(description = \"Created user object inside Parameter\", required = true,\n                    content = @Content(\n                            schema = @Schema(implementation = User.class)))final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/requestbody/RequestBodyResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.requestbody;\n\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.DELETE;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with RequestBody examples\n */\npublic class RequestBodyResource {\n    @GET\n    @Path(\"/methodWithRequestBodyWithoutContent\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response methodWithRequestBodyWithoutContent(\n            @RequestBody(description = \"Created user object\", required = true) final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @GET\n    @Path(\"/methodWithRequestBodyWithoutContentWithoutImplementation\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response methodWithRequestBodyWithoutContentWithoutImplementation(\n            @RequestBody(description = \"Created user object\", required = true,\n                    content = @Content(\n                            schema = @Schema(name = \"User\", description = \"User description\",\n                                    example = \"User Description\", required = true))) final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @POST\n    @Path(\"/methodWithRequestBodyAndTwoParameters\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response methodWithRequestBodyAndTwoParameters(\n            @RequestBody(description = \"Created user object\", required = true,\n                    content = @Content(\n                            schema = @Schema(implementation = User.class))) final User user,\n            @QueryParam(\"name\") final String name, @QueryParam(\"code\") final String code) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @PUT\n    @Path(\"/methodWithRequestBodyWithoutAnnotation\")\n    @Operation(summary = \"Modify user\",\n            description = \"Modifying user.\")\n    public Response methodWithRequestBodyWithoutAnnotation(\n            final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @DELETE\n    @Path(\"/methodWithoutRequestBodyAndTwoParameters\")\n    @Operation(summary = \"Delete user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response methodWithoutRequestBodyAndTwoParameters(\n            @QueryParam(\"name\") final String name, @QueryParam(\"code\") final String code) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @PUT\n    @Path(\"/methodWithRequestBodyWithoutAnnotationAndTwoConsumes\")\n    @Operation(summary = \"Modify pet\",\n            description = \"Modifying pet.\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    public Response methodWithRequestBodyWithoutAnnotationAndTwoConsumes(\n            final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @POST\n    @Path(\"/methodWithTwoRequestBodyWithoutAnnotationAndTwoConsumes\")\n    @Operation(summary = \"Create pet\",\n            description = \"Creating pet.\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    public Response methodWithTwoRequestBodyWithoutAnnotationAndTwoConsumes(\n            final Pet pet, final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @POST\n    @Path(\"/methodWithTwoRequestBodyWithAnnotationAndTwoConsumes\")\n    @Operation(summary = \"Create pet\",\n            description = \"Creating pet.\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    public Response methodWithTwoRequestBodyWithAnnotationAndTwoConsumes(\n            final @RequestBody(description = \"Request Body Pet\") Pet pet,\n            @RequestBody(description = \"Request Body User\") final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @DELETE\n    @Path(\"/methodWithOneSimpleRequestBody\")\n    @Operation(summary = \"Delete pet\",\n            description = \"Deleting pet.\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    public Response methodWithOneSimpleRequestBody(final int id) {\n        return Response.ok().entity(\"\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/responses/ComplexResponseResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.responses;\n\nimport io.swagger.v3.jaxrs2.resources.exception.NotFoundException;\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource with some responses\n */\npublic class ComplexResponseResource {\n    @GET\n    @Path(\"/complexresponse\")\n    @Operation(summary = \"Find pets\",\n            description = \"Returns the Pets\",\n            responses = {\n                    @ApiResponse(description = \"Response inside Operation\", responseCode = \"200\",\n                            content = @Content(schema =\n                            @Schema(implementation = Pet.class))),\n                    @ApiResponse(description = \"Default Pet\",\n                            content = @Content(schema =\n                            @Schema(name = \"Default Pet\", description = \"Default Pet\",\n                            required = true, example = \"New Pet\")))\n            })\n    @ApiResponse(responseCode = \"404\", description = \"Couldn't find pet\")\n    public Pet getPets() throws NotFoundException {\n        return new Pet();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/responses/ImplementationResponseResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.responses;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource with a Response at Method Level\n */\npublic class ImplementationResponseResource {\n    @GET\n    @Path(\"/implementationresponse\")\n    @Operation(\n            summary = \"Simple get operation\",\n            description = \"Defines a simple get operation with no inputs and a complex output object\",\n            operationId = \"getWithPayloadResponse\",\n            deprecated = true,\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\",\n                            content = {\n                                    @Content(\n                                            mediaType = \"application/json\",\n                                            schema =\n                                            @Schema(\n                                                    implementation = ImplementationResponseResource.SampleResponseSchema.class)\n                                    ),\n                                    @Content(\n                                            mediaType = \"application/json\",\n                                            schema =\n                                            @Schema(\n                                                    implementation = ImplementationResponseResource.SecondSampleResponseSchema.class)\n                                    )\n                            }\n\n                    ),\n                    @ApiResponse(\n                            responseCode = \"400\",\n                            description = \"boo\",\n                            content = @Content(\n                                    mediaType = \"*/*\",\n                                    schema =\n                                    @Schema(implementation = ImplementationResponseResource.GenericError.class)\n                            )\n                    )\n            }\n    )\n\n    public void getResponses() {\n    }\n\n    static class SampleResponseSchema {\n        @Schema(description = \"the user id\")\n        private String id;\n    }\n\n    static class SecondSampleResponseSchema {\n        @Schema(description = \"the user id\")\n        private String id;\n    }\n\n    static class GenericError {\n        private int code;\n        private String message;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/responses/MethodArrayResponseResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.responses;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport java.util.List;\n\n/**\n * Resource with an Array Response at Method Level\n */\npublic class MethodArrayResponseResource {\n\n    @GET\n    @Path(\"/arrayresponseinmethod\")\n    @ApiResponse(content = @Content(\n            array =\n            @ArraySchema(\n                    arraySchema = @io.swagger.v3.oas.annotations.media.Schema(description = \"Array description\"),\n                    schema =\n                    @io.swagger.v3.oas.annotations.media.Schema(\n                            description = \"Item description\",\n                            implementation = PetInfo.class\n                    ))))\n    public List<PetInfo> arrayResponseWithTypeImplementation() {\n        return null;\n    }\n\n\n    public class PetInfo {\n        String name;\n\n        public String getName() {\n            return \"\";\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/responses/MethodResponseResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.responses;\n\nimport io.swagger.v3.jaxrs2.resources.exception.NotFoundException;\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with a Response at Method Level\n */\npublic class MethodResponseResource {\n    @GET\n    @Path(\"/responseinmethod\")\n    @Operation(summary = \"Find pets\",\n            description = \"Returns the Pets\")\n    @ApiResponse(responseCode = \"200\", description = \"Status OK\")\n    public Response getPets() throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/responses/NoImplementationResponseResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.responses;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.links.Link;\nimport io.swagger.v3.oas.annotations.links.LinkParameter;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Resource with a Response at Method Level\n */\npublic class NoImplementationResponseResource {\n    @Path(\"/noimplementationresponseresource\")\n    @Operation(operationId = \"getUser\",\n            responses = {\n                    @ApiResponse(description = \"test description\", responseCode = \"400\",\n                            links = {\n                                    @Link(\n                                            name = \"user\",\n                                            operationId = \"getUser\",\n                                            operationRef = \"#/components/links/MyLink\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\"))\n                            }),\n                    @ApiResponse(description = \"200 description\", responseCode = \"200\",\n                            links = {\n                                    @Link(\n                                            name = \"pet\",\n                                            operationId = \"getUser\",\n                                            operationRef = \"#/components/links/MyLink\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\"))\n                            })\n            }\n    )\n    @GET\n    public NoImplementationResponseResource.User getUser(@QueryParam(\"userId\") final String userId) {\n        return null;\n    }\n\n    static class User {\n        private String id;\n        private String username;\n\n        public String getId() {\n            return id;\n        }\n\n        public void setId(final String id) {\n            this.id = id;\n        }\n\n        public String getUsername() {\n            return username;\n        }\n\n        public void setUsername(final String username) {\n            this.username = username;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/responses/NoResponseResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.responses;\n\nimport io.swagger.v3.jaxrs2.resources.exception.NotFoundException;\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource with a Response at Method Level\n */\npublic class NoResponseResource {\n    @GET\n    @Path(\"/noresponse\")\n    @Operation(summary = \"Find pets\",\n            description = \"Returns the Pets\")\n    public User getPets() throws NotFoundException {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/responses/OperationResponseResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.responses;\n\nimport io.swagger.v3.jaxrs2.resources.exception.NotFoundException;\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with the response in the Operation Annotation\n */\npublic class OperationResponseResource {\n    @GET\n    @Path(\"/responseinoperation\")\n    @Operation(summary = \"Find Users\",\n            description = \"Returns the Users\",\n            responses = {@ApiResponse(responseCode = \"200\", description = \"Status OK\")})\n    public Response getUsers() throws NotFoundException {\n        return Response.ok().entity(new User()).build();\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/responses/PriorityResponseResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.responses;\n\nimport io.swagger.v3.jaxrs2.resources.exception.NotFoundException;\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with a Response at Method Level and Operation Level.\n */\npublic class PriorityResponseResource {\n    @GET\n    @Path(\"/priorityresponses\")\n    @Operation(summary = \"Find pets\",\n            description = \"Returns the Pets\",\n            responses = {@ApiResponse(responseCode = \"200\", description = \"Inside Operation Response\")})\n    @ApiResponse(responseCode = \"200\", description = \"Inside Method Operation\")\n    public Response getPets() throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/security/SecurityResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.security;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeType;\nimport io.swagger.v3.oas.annotations.security.OAuthFlow;\nimport io.swagger.v3.oas.annotations.security.OAuthFlows;\nimport io.swagger.v3.oas.annotations.security.OAuthScope;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.security.SecurityScheme;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.PATCH;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\n\n@SecurityScheme(name = \"myOauth2Security\",\n        type = SecuritySchemeType.OAUTH2,\n        in = SecuritySchemeIn.HEADER,\n        description = \"myOauthSecurity Description\",\n        flows = @OAuthFlows(implicit = @OAuthFlow(authorizationUrl = \"http://x.com\",\n                scopes = @OAuthScope(\n                        name = \"write:pets\",\n                        description = \"modify pets in your account\"))\n        )\n)\n@SecurityRequirement(name = \"security_key\",\n        scopes = {\"write:pets\", \"read:pets\"}\n)\n@SecurityRequirement(name = \"myOauth2Security\",\n        scopes = {\"write:pets\"}\n)\n@Path(\"/security\")\npublic class SecurityResource {\n    @GET\n    @Operation(operationId = \"Operation Id\",\n            description = \"description\")\n    @SecurityRequirement(name = \"security_key\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    )\n    public void getSecurity() {\n    }\n\n    @PATCH\n    @Operation(operationId = \"Operation Id 2\",\n            description = \"description 2\")\n    @SecurityRequirement(name = \"security_key2\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    )\n    public void getSecurity2() {\n    }\n\n    @PUT\n    @Operation(operationId = \"Operation Id 3\",\n            description = \"description 3\", security =\n    @SecurityRequirement(name = \"security_key3\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    ))\n    public void setSecurity(String security) {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/tags/CompleteTagResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n@OpenAPIDefinition(tags = {\n        @Tag(name = \"Definition First Tag\"),\n        @Tag(name = \"Definition Second Tag full\", description = \"desc definition\")\n})\n@Tag(name = \"Second Tag\")\n@Tag(name = \"Fourth Tag Full\", description = \"desc class\", externalDocs = @ExternalDocumentation(description = \"docs desc class\"))\n@Tag(name = \"Fifth Tag Full\", description = \"desc class\", externalDocs = @ExternalDocumentation(description = \"docs desc class\"))\n@Tag(name = \"Sixth Tag\")\npublic class CompleteTagResource {\n\n    @GET\n    @Path(\"/completetags\")\n    @Operation(tags = {\"Example Tag\", \"Second Tag\"})\n    @Tag(name = \"Third Tag\")\n    @Tag(name = \"Second Tag\")\n    @Tag(name = \"Fourth Tag Full\", description = \"desc\", externalDocs = @ExternalDocumentation(description = \"docs desc\"))\n    public Response getTags() {\n        return Response.ok().entity(\"ok\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/tags/TagClassResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\n/**\n * Class with Tag Annotations at Class level\n */\n@Tag(name = \"Second Tag\")\n@Tag(name = \"Fourth Tag Full\", description = \"desc class\", externalDocs = @ExternalDocumentation(description = \"docs desc class\"))\n@Tag(name = \"Fifth Tag Full\", description = \"desc class\", externalDocs = @ExternalDocumentation(description = \"docs desc class\"))\n@Tag(name = \"Sixth Tag\")\npublic class TagClassResource {\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/tags/TagMethodResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\npublic class TagMethodResource {\n    @GET\n    @Path(\"/tagsinmethod\")\n    @Tag(name = \"Third Tag\")\n    @Tag(name = \"Second Tag\")\n    @Tag(name = \"Fourth Tag Full\", description = \"desc\", externalDocs = @ExternalDocumentation(description = \"docs desc\"))\n    public Response getTags() {\n        return Response.ok().entity(\"ok\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/tags/TagOpenAPIDefinitionResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\n/**\n * Tag in the OpenAPIDefinition annotation\n */\n@OpenAPIDefinition(tags = {\n        @Tag(name = \"Definition First Tag\"),\n        @Tag(name = \"Definition Second Tag full\", description = \"desc definition\")\n})\npublic class TagOpenAPIDefinitionResource {\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/tags/TagOperationResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with a Tag at Operation Level\n */\npublic class TagOperationResource {\n\n    @GET\n    @Path(\"/tagoperation\")\n    @Operation(tags = {\"Example Tag\", \"Second Tag\"})\n    public Response getTags() {\n        return Response.ok().entity(\"ok\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore31/Category.java",
    "content": "package io.swagger.v3.jaxrs2.petstore31;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Category\")\npublic class Category {\n    private long id;\n    private String name;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public Category() {\n    }\n\n    public Category(String name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore31/Pet.java",
    "content": "package io.swagger.v3.jaxrs2.petstore31;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlElementWrapper;\nimport javax.xml.bind.annotation.XmlRootElement;\nimport java.util.ArrayList;\nimport java.util.List;\n\n@XmlRootElement(name = \"Pet\")\npublic class Pet {\n    private long id;\n    private Category category;\n    private String name;\n    private List<String> photoUrls = new ArrayList<String>();\n    private List<Tag> tags = new ArrayList<Tag>();\n    private String status;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"category\")\n    public Category getCategory() {\n        return category;\n    }\n\n    public void setCategory(Category category) {\n        this.category = category;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    @XmlElementWrapper(name = \"photoUrls\")\n    @XmlElement(name = \"photoUrl\")\n    public List<String> getPhotoUrls() {\n        return photoUrls;\n    }\n\n    public void setPhotoUrls(List<String> photoUrls) {\n        this.photoUrls = photoUrls;\n    }\n\n    @XmlElementWrapper(name = \"tags\")\n    @XmlElement(name = \"tag\")\n    public List<Tag> getTags() {\n        return tags;\n    }\n\n    public void setTags(List<Tag> tags) {\n        this.tags = tags;\n    }\n\n    @XmlElement(name = \"status\")\n    @Schema(\n            description = \"pet status in the store\",\n            allowableValues = \"available,pending,sold\",\n            $id = \"idtest\",\n            _if = IfSchema.class)\n    public String getStatus() {\n        return status;\n    }\n\n    public void setStatus(String status) {\n        this.status = status;\n    }\n\n    @Schema(description = \"if schema\", deprecated = true)\n    static class IfSchema {\n        @Schema(_const = \"foo\")\n        public String foo;\n        @Schema(exclusiveMaximumValue = 2)\n        public int bar;\n\n        @Schema(types = {\"string\", \"object\"})\n        public int foobar;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore31/PetData.java",
    "content": "package io.swagger.v3.jaxrs2.petstore31;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.stream.Collectors;\n\npublic class PetData {\n    static List<Pet> pets = new ArrayList<Pet>();\n    static List<Category> categories = new ArrayList<Category>();\n\n    static {\n        categories.add(createCategory(1, \"Dogs\"));\n        categories.add(createCategory(2, \"Cats\"));\n        categories.add(createCategory(3, \"Rabbits\"));\n        categories.add(createCategory(4, \"Lions\"));\n\n        pets.add(createPet(1, categories.get(1), \"Cat 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag1\", \"tag2\"}, \"available\"));\n        pets.add(createPet(2, categories.get(1), \"Cat 2\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag2\", \"tag3\"}, \"available\"));\n        pets.add(createPet(3, categories.get(1), \"Cat 3\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"pending\"));\n\n        pets.add(createPet(4, categories.get(0), \"Dog 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag1\", \"tag2\"}, \"available\"));\n        pets.add(createPet(5, categories.get(0), \"Dog 2\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag2\", \"tag3\"}, \"sold\"));\n        pets.add(createPet(6, categories.get(0), \"Dog 3\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"pending\"));\n\n        pets.add(createPet(7, categories.get(3), \"Lion 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag1\", \"tag2\"}, \"available\"));\n        pets.add(createPet(8, categories.get(3), \"Lion 2\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag2\", \"tag3\"}, \"available\"));\n        pets.add(createPet(9, categories.get(3), \"Lion 3\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"available\"));\n\n        pets.add(createPet(10, categories.get(2), \"Rabbit 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"available\"));\n    }\n\n    public Pet getPetById(long petId) {\n        for (Pet pet : pets) {\n            if (pet.getId() == petId) {\n                return pet;\n            }\n        }\n        return null;\n    }\n\n    public List<Pet> findPetByStatus(String status) {\n        String[] statues = status.split(\",\");\n        List<Pet> result = new ArrayList<Pet>();\n        for (Pet pet : pets) {\n            for (String s : statues) {\n                if (s.equals(pet.getStatus())) {\n                    result.add(pet);\n                }\n            }\n        }\n        return result;\n    }\n\n    public List<Pet> findPetByCategory(Category category) {\n        return pets.stream().filter(pet -> category.equals(pet.getCategory())).collect(Collectors.toList());\n    }\n\n    public List<Pet> findPetByTags(String tags) {\n        String[] tagList = tags.split(\",\");\n        List<Pet> result = new ArrayList<Pet>();\n        for (Pet pet : pets) {\n            if (null != pet.getTags()) {\n                for (Tag tag : pet.getTags()) {\n                    for (String tagListString : tagList) {\n                        if (tagListString.equals(tag.getName())) {\n                            result.add(pet);\n                        }\n                    }\n                }\n            }\n        }\n        return result;\n    }\n\n    public void addPet(Pet pet) {\n        if (pets.size() > 0) {\n            for (int i = pets.size() - 1; i >= 0; i--) {\n                if (pets.get(i).getId() == pet.getId()) {\n                    pets.remove(i);\n                }\n            }\n        }\n        pets.add(pet);\n    }\n\n    static Pet createPet(long id, Category cat, String name, String[] urls,\n                         String[] tags, String status) {\n        Pet pet = new Pet();\n        pet.setId(id);\n        pet.setCategory(cat);\n        pet.setName(name);\n        if (null != urls) {\n            List<String> urlObjs = new ArrayList<String>();\n            for (String urlString : urls) {\n                urlObjs.add(urlString);\n            }\n            pet.setPhotoUrls(urlObjs);\n        }\n        List<Tag> tagObjs = new ArrayList<Tag>();\n        int i = 0;\n        if (null != tags) {\n            for (String tagString : tags) {\n                i = i + 1;\n                Tag tag = new Tag();\n                tag.setId(i);\n                tag.setName(tagString);\n                tagObjs.add(tag);\n            }\n        }\n        pet.setTags(tagObjs);\n        pet.setStatus(status);\n        return pet;\n    }\n\n    static Category createCategory(long id, String name) {\n        Category category = new Category();\n        category.setId(id);\n        category.setName(name);\n        return category;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore31/PetResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore31;\n\nimport io.swagger.v3.jaxrs2.resources.QueryResultBean;\nimport io.swagger.v3.jaxrs2.resources.exception.NotFoundException;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.BeanParam;\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n@Consumes(\"application/json\")\n@Path(\"/pet\")\n@Produces({\"application/json\", \"application/xml\"})\npublic class PetResource {\n    static PetData petData = new PetData();\n\n    @GET\n    @Path(\"/{petId}\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"Returns a pet when 0 < ID <= 10.  ID > 10 or nonintegers will simulate API error conditions\",\n            responses = {\n                    @ApiResponse(\n                            description = \"The pet\", content = @Content(\n                            schema = @Schema(implementation = Pet.class)\n                    )),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\")\n            })\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\"/*, _enum = \"range[1,10]\"*/, required = true)\n            @PathParam(\"petId\") final Long petId) throws NotFoundException {\n        Pet pet = petData.getPetById(petId);\n        if (null != pet) {\n            return Response.ok().entity(pet).build();\n        } else {\n            throw new NotFoundException(404, \"Pet not found\");\n        }\n    }\n\n    @POST\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPet(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) final Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodynoannotation\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Produces({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store no annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetNoAnnotation(final Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodyid\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store passing an integer with generic parameter annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetByInteger(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) final int petId) {\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodyidnoannotation\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store passing an integer without parameter annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetByIntegerNoAnnotation(final int petId) {\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @PUT\n    @Operation(summary = \"Update an existing pet\",\n            responses = {\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\"),\n                    @ApiResponse(responseCode = \"405\", description = \"Validation exception\")})\n    public Response updatePet(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) final Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @GET\n    @Path(\"/findByStatus\")\n    @Produces(\"application/xml\")\n    @Operation(summary = \"Finds Pets by status\",\n            description = \"Multiple status values can be provided with comma separated strings\",\n            responses = {\n                    @ApiResponse(\n                            content = @Content(mediaType = \"application/json\",\n                                    schema = @Schema(implementation = Pet.class))),\n                    @ApiResponse(\n                            responseCode = \"400\", description = \"Invalid status value\"\n                    )}\n    )\n    public Response findPetsByStatus(\n            @Parameter(description = \"Status values that need to be considered for filter\", required = true) @QueryParam(\"status\") final String status,\n            @BeanParam final QueryResultBean qr\n    ) {\n        return Response.ok(petData.findPetByStatus(status)).build();\n    }\n\n    @GET\n    @Path(\"/findByTags\")\n    @Produces(\"application/json\")\n    @Operation(summary = \"Finds Pets by tags\",\n            description = \"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\",\n            responses = {\n                    @ApiResponse(description = \"Pets matching criteria\",\n                            content = @Content(schema = @Schema(implementation = Pet.class))\n                    ),\n                    @ApiResponse(description = \"Invalid tag value\", responseCode = \"400\")\n            })\n    @Deprecated\n    public Response findPetsByTags(\n            @Parameter(description = \"Tags to filter by\", required = true) @QueryParam(\"tags\") final String tags) {\n        return Response.ok(petData.findPetByTags(tags)).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore31/SimpleCategory.java",
    "content": "package io.swagger.v3.jaxrs2.petstore31;\npublic class SimpleCategory {}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore31/SimpleTag.java",
    "content": "package io.swagger.v3.jaxrs2.petstore31;\n\nimport io.swagger.v3.oas.annotations.StringToClassMapItem;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class SimpleTag {\n\n    @Schema(\n            properties = {\n                    @StringToClassMapItem(key = \"foo\", value =  Foo.class)\n            },\n            ref = \"#/components/schemas/SimpleCategory\",\n            description = \"child description\"\n    )\n    public Object annotated;\n\n    @Schema(description = \"Foo\", deprecated = true)\n    static class Foo {\n        @Schema(_const = \"foo\")\n        public String foo;\n        @Schema(exclusiveMaximumValue = 2)\n        public int bar;\n\n        @Schema(types = {\"string\", \"object\"})\n        public int foobar;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore31/Tag.java",
    "content": "package io.swagger.v3.jaxrs2.petstore31;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\nimport io.swagger.v3.oas.annotations.StringToClassMapItem;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@XmlRootElement(name = \"Tag\")\npublic class Tag {\n    private long id;\n    private String name;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    @Schema(\n            properties = {\n                    @StringToClassMapItem(key = \"foo\", value =  Foo.class),\n                    @StringToClassMapItem(key = \"bar\", value =  Bar.class)\n            },\n            ref = \"#/components/schemas/Category\",\n            description = \"child description\"\n    )\n    public Object annotated;\n\n    @Schema(description = \"Foo\", deprecated = true)\n    static class Foo {\n        @Schema(_const = \"foo\")\n        public String foo;\n        @Schema(exclusiveMaximumValue = 2)\n        public int bar;\n\n        @Schema(types = {\"string\", \"object\"})\n        public int foobar;\n    }\n\n    @Schema(description = \"Bar\", deprecated = true)\n    static class Bar {\n        @Schema(_const = \"bar\")\n        public String foo;\n        @Schema(exclusiveMaximumValue = 4)\n        public int bar;\n\n        @Schema(types = {\"string\", \"integer\"})\n        public int foobar;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore31/TagResource.java",
    "content": "package io.swagger.v3.jaxrs2.petstore31;\n\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@Path(\"/tag\")\npublic class TagResource {\n    @GET\n    @Path(\"/tag\")\n    public SimpleTag getTag(@RequestBody SimpleCategory category) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore31/User.java",
    "content": "package io.swagger.v3.jaxrs2.petstore31;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"User\")\npublic class User {\n    private long id;\n    private String username;\n    private String firstName;\n    private String lastName;\n    private String email;\n    private String password;\n    private String phone;\n    private int userStatus;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"firstName\")\n    public String getFirstName() {\n        return firstName;\n    }\n\n    public void setFirstName(String firstName) {\n        this.firstName = firstName;\n    }\n\n    @XmlElement(name = \"username\")\n    public String getUsername() {\n        return username;\n    }\n\n    public void setUsername(String username) {\n        this.username = username;\n    }\n\n    @XmlElement(name = \"lastName\")\n    public String getLastName() {\n        return lastName;\n    }\n\n    public void setLastName(String lastName) {\n        this.lastName = lastName;\n    }\n\n    @XmlElement(name = \"email\")\n    public String getEmail() {\n        return email;\n    }\n\n    public void setEmail(String email) {\n        this.email = email;\n    }\n\n    @XmlElement(name = \"password\")\n    public String getPassword() {\n        return password;\n    }\n\n    public void setPassword(String password) {\n        this.password = password;\n    }\n\n    @XmlElement(name = \"phone\")\n    public String getPhone() {\n        return phone;\n    }\n\n    public void setPhone(String phone) {\n        this.phone = phone;\n    }\n\n    @XmlElement(name = \"userStatus\")\n    @Schema(description = \"User Status\") //, allowableValues = {\"1\",\"2\",\"3\"})\n    public int getUserStatus() {\n        return userStatus;\n    }\n\n    public void setUserStatus(int userStatus) {\n        this.userStatus = userStatus;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Address.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.media.DependentRequired;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(\n        _if = Address.AnnotatedCountry.class,\n        then = PostalCodeNumberPattern.class,\n        _else = PostalCodePattern.class,\n        propertyNames = Address.PropertyNamesPattern.class,\n        dependentRequiredMap = {\n                @DependentRequired(\n                        name = \"street\",\n                        value = { \"country\" }\n                )\n        }\n)\npublic class Address {\n\n    private String street;\n    private CountryEnum country;\n\n    public enum CountryEnum {\n        UNITED_STATES_OF_AMERICA(\"United States of America\"),\n        CANADA(\"Canada\");\n\n        private String value;\n\n        CountryEnum(String value) {\n            this.value = value;\n        }\n\n        public String getValue() {\n            return value;\n        }\n\n        @Override\n        public String toString() {\n            return String.valueOf(value);\n        }\n\n        public static CountryEnum fromValue(String value) {\n            for (CountryEnum b : CountryEnum.values()) {\n                if (b.value.equals(value)) {\n                    return b;\n                }\n            }\n            return null;\n        }\n    }\n\n    public String getStreet() {\n        return street;\n    }\n\n    public void setStreet(String street) {\n        this.street = street;\n    }\n\n    public CountryEnum getCountry() {\n        return country;\n    }\n\n    public void setCountry(CountryEnum country) {\n        this.country = country;\n    }\n\n    class AnnotatedCountry {\n\n        private Object country;\n\n        @Schema(\n                _const = \"United States\"\n\n        )\n        public Object getCountry() {\n            return country;\n        }\n\n        public void setCountry(Object country) {\n            this.country = country;\n        }\n    }\n\n    @Schema(\n            pattern = \"^[A-Za-z_][A-Za-z0-9_]*$\"\n    )\n    class PropertyNamesPattern {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ArraySchemaImplementationResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport java.util.List;\n\npublic class ArraySchemaImplementationResource {\n\n    static class Pet {\n        @ArraySchema(schema = @Schema(implementation = Integer.class, description = \"A house in a street\"))\n        public List<Number> cars;\n    }\n\n    @GET\n    @Path(\"/test\")\n    public Pet test() {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/BasicClass.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\npublic class BasicClass {\n    public void emptyMethod() {\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/BasicFieldsResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.model.Category;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\npublic class BasicFieldsResource {\n\n    @GET\n    @Path(\"/1\")\n    @Operation(operationId = \"operationId\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\")\n    public Response getSummaryAndDescription(@QueryParam(\"subscriptionId\") @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\",\n            required = true, description = \"parameter description\",\n            allowEmptyValue = true, allowReserved = true,\n            schema = @Schema(\n                    description = \"the generated UUID\",\n                    type = \"string\",\n                    format = \"uuid\",\n                    accessMode = Schema.AccessMode.READ_ONLY)\n    ) String subscriptionId) {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    @GET\n    @Path(\"/2\")\n    @Operation(operationId = \"operationId\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\")\n    public Response getSummaryAndDescription2(@QueryParam(\"subscriptionId\") @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\",\n            required = true, description = \"parameter description\",\n            allowEmptyValue = true, allowReserved = true,\n            array = @ArraySchema(maxItems = 10, minItems = 1,\n                    schema = @Schema(implementation = Category.class, description = \"the generated UUID\"),\n                    uniqueItems = true)\n    ) String subscriptionId) {\n\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    @GET\n    @Path(\"/3\")\n    @Operation(operationId = \"operationId\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\")\n    public Response getSummaryAndDescription3(@QueryParam(\"subscriptionId\") @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\",\n            required = true, description = \"parameter description\",\n            allowEmptyValue = true, allowReserved = true,\n            schema = @Schema(\n                    implementation = Category.class,\n                    description = \"the generated UUID\",\n                    accessMode = Schema.AccessMode.READ_ONLY)\n    ) String subscriptionId) {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    @GET\n    @Path(\"/4\")\n    @Operation(operationId = \"operationId\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\")\n    public Response getSummaryAndDescription4(@QueryParam(\"subscriptionId\") @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\",\n            required = true, description = \"parameter description\",\n            allowEmptyValue = true, allowReserved = true,\n            array = @ArraySchema(maxItems = 10, minItems = 1,\n                    schema = @Schema(format = \"uuid\", description = \"the generated UUID\"),\n                    uniqueItems = true)\n    ) String subscriptionId) {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    @GET\n    @Path(\"/5\")\n    @Operation(operationId = \"operationId\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\")\n    public Response getSummaryAndDescription5(@QueryParam(\"subscriptionId\") @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\",\n            required = true, description = \"parameter description\",\n            allowEmptyValue = true, allowReserved = true, content = @Content(mediaType = \"application/json\")\n    ) String subscriptionId) {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    @GET\n    @Path(\"/6\")\n    @Operation(operationId = \"operationId\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\")\n    public Response getSummaryAndDescription6(\n            @Parameter(\n                    schema = @Schema(description = \"test\")\n            ) String subscriptionId) {\n\n        return Response.ok().entity(\"ok\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/BinaryParameterResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Context;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\nimport javax.ws.rs.core.UriInfo;\n\nimport io.swagger.v3.jaxrs2.resources.model.Item;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.headers.Header;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\n@Path(\"/\")\npublic class BinaryParameterResource {\n    @Consumes({ MediaType.APPLICATION_JSON })\n    @Path(\"/binary\")\n    @POST\n    @Operation(\n        summary = \"Create new item\",\n        description = \"Post operation with entity in a body\",\n        responses = {\n            @ApiResponse(\n                content = @Content(\n                    schema = @Schema(implementation = Item.class), \n                    mediaType = MediaType.APPLICATION_JSON\n                ),\n                headers = @Header(name = \"Location\"),\n                responseCode = \"201\"\n            )\n        }\n    )\n    public Response createItem(@Context final UriInfo uriInfo, @Parameter(required = true) final Item item) {\n        return Response\n            .created(uriInfo.getBaseUriBuilder().path(item.getName()).build())\n            .entity(item).build();\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/BookStoreTicket2646.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\n\nimport java.util.Arrays;\n\nimport javax.ws.rs.DELETE;\nimport javax.ws.rs.DefaultValue;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\n\n@Path(\"/bookstore\")\npublic class BookStoreTicket2646 {\n    @Produces({ MediaType.APPLICATION_JSON })\n    @GET\n    public Response getBooks(\n            @QueryParam(\"page\") @DefaultValue(\"1\") int page) {\n        return Response.ok(\n                Arrays.asList(\n                        new Book(),\n                        new Book()\n                )\n        ).build();\n    }\n\n    @Produces({ MediaType.APPLICATION_JSON })\n    @Path(\"/{id}\")\n    @GET\n    public Book getBook(@PathParam(\"id\") Long id) {\n        return new Book();\n    }\n\n    @Path(\"/{id}\")\n    @DELETE\n    public Response delete(@PathParam(\"id\") String id) {\n        return Response.ok().build();\n    }\n\n    public static class Book {\n        public String foo;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ClassPathParentResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport javax.ws.rs.Path;\n\n@Path(\"/v1\")\npublic class ClassPathParentResource {\n    @Path(\"parent\")\n    public ClassPathSubResource getSubResource() {\n        return new ClassPathSubResource();\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ClassPathSubResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.info.Info;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\n\n@OpenAPIDefinition(info = @Info(description = \"Subresource Class\"))\n@Path(\"subresource\")\npublic class ClassPathSubResource {\n\n    @GET\n    @Operation(operationId = \"get Code\")\n    public String getCode() {\n        return \"400\";\n    }\n\n    @GET\n    @Path(\"{id}\")\n    public String getWidget(@PathParam(\"id\") String id) {\n        return \"widget\";\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Client.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\npublic class Client {\n\n    private String name;\n    private int creditCard;\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public int getCreditCard() {\n        return creditCard;\n    }\n\n    public void setCreditCard(int creditCard) {\n        this.creditCard = creditCard;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/CompleteFieldsResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\npublic class CompleteFieldsResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(operationId = \"operationId\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\",\n            tags = {\"Example Tag\", \"Second Tag\"},\n            externalDocs =\n            @ExternalDocumentation(\n                    description = \"External documentation description\",\n                    url = \"http://url.com\"\n            ),\n            parameters = {\n                    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\",\n                            required = true, description = \"parameter description\",\n                            allowReserved = true,\n                            schema = @Schema(\n                                    type = \"string\",\n                                    format = \"uuid\",\n                                    description = \"the generated UUID\",\n                                    accessMode = Schema.AccessMode.READ_ONLY)\n                    )},\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\",\n                            content = @Content(\n                                    mediaType = \"application/json\",\n                                    schema = @Schema(implementation = ResponsesResource.SampleResponseSchema.class)\n                            )\n                    ),\n                    @ApiResponse(\n                            responseCode = \"default\",\n                            description = \"boo\",\n                            content = @Content(\n                                    mediaType = \"*/*\",\n                                    schema = @Schema(implementation = ResponsesResource.GenericError.class)\n                            )\n                    )\n            }\n    )\n    public Response getSummaryAndDescription() {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/CreditCard.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\npublic class CreditCard {\n\n    private String billingAddress;\n\n    public String getBillingAddress() {\n        return billingAddress;\n    }\n\n    public void setBillingAddress(String billingAddress) {\n        this.billingAddress = billingAddress;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/DefaultResponseResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class DefaultResponseResource {\n\n    @GET\n    @Path(\"/\")\n    public String test() {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/DeprecatedFieldsResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\npublic class DeprecatedFieldsResource {\n    @GET\n    @Path(\"/\")\n    @Operation(deprecated = true)\n    public Response deprecatedMethod() {\n        return Response.ok().entity(\"ok\").build();\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/DuplicatedOperationIdResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\npublic class DuplicatedOperationIdResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(operationId = \"operationId\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\")\n    public Response getSummaryAndDescription() {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    @POST\n    @Path(\"/\")\n    @Operation(operationId = \"operationId\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\")\n    public Response postSummaryAndDescription() {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    @GET\n    @Path(\"/path\")\n    @Operation(operationId = \"operationId\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\")\n    public Response getDuplicatedOperation() {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/DuplicatedOperationMethodNameResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\npublic class DuplicatedOperationMethodNameResource {\n\n    @GET\n    @Path(\"/1\")\n    @Operation(operationId = \"getSummaryAndDescription2\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\")\n    public Response getSummaryAndDescription1() {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    @GET\n    @Path(\"/2\")\n    public Response getSummaryAndDescription2() {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    @POST\n    @Path(\"/2\")\n    @Operation(operationId = \"postSummaryAndDescription3\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\")\n    public Response postSummaryAndDescription2() {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    @GET\n    @Path(\"/3\")\n    public Response getSummaryAndDescription3() {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    @POST\n    @Path(\"/3\")\n    public Response postSummaryAndDescription3() {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    @GET\n    @Path(\"/4\")\n    public Response getSummaryAndDescription3(String foo) {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/DuplicatedSecurityResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeType;\nimport io.swagger.v3.oas.annotations.security.OAuthFlow;\nimport io.swagger.v3.oas.annotations.security.OAuthFlows;\nimport io.swagger.v3.oas.annotations.security.OAuthScope;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.security.SecurityScheme;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@SecurityScheme(name = \"myOauth2Security\",\n        type = SecuritySchemeType.OAUTH2,\n        in = SecuritySchemeIn.HEADER,\n        description = \"myOauthSecurity Description\",\n        flows = @OAuthFlows(implicit = @OAuthFlow(authorizationUrl = \"http://x.com\",\n                scopes = @OAuthScope(\n                        name = \"write:pets\",\n                        description = \"modify pets in your account\"))\n        )\n)\n@SecurityScheme(name = \"myOauth2Security2\",\n        type = SecuritySchemeType.OAUTH2,\n        in = SecuritySchemeIn.HEADER,\n        description = \"myOauthSecurity Description2\",\n        flows = @OAuthFlows(implicit = @OAuthFlow(authorizationUrl = \"http://x.com\",\n                scopes = @OAuthScope(\n                        name = \"write:pets\",\n                        description = \"modify pets in your account\"))\n        )\n)\n@SecurityScheme(name = \"myOauth2Security\",\n        type = SecuritySchemeType.OAUTH2,\n        in = SecuritySchemeIn.HEADER,\n        description = \"myOauthSecurity Description3\",\n        flows = @OAuthFlows(implicit = @OAuthFlow(authorizationUrl = \"http://x.com\",\n                scopes = @OAuthScope(\n                        name = \"write:pets\",\n                        description = \"modify pets in your account\"))\n        )\n)\npublic class DuplicatedSecurityResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(operationId = \"Operation Id\",\n            description = \"description\")\n    @SecurityRequirement(name = \"security_key\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    )\n    public void getSecurity() {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/EnhancedResponsesResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class EnhancedResponsesResource implements ResponsesInterface{\n\n    @GET\n    @Path(\"/\")\n    @Operation(\n            summary = \"Simple get operation\",\n            description = \"Defines a simple get operation with no inputs and a complex output object\",\n            operationId = \"getWithPayloadResponse\",\n            deprecated = true,\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"404\",\n                            description = \"not found!\"\n                    )}\n    )\n    @ApiResponse(\n            responseCode = \"400\",\n            description = \"boo\",\n            content = @Content(\n                    mediaType = \"*/*\",\n                    schema = @Schema(implementation = GenericError.class)\n            )\n    )\n    public void getResponses() {\n    }\n\n    static class SampleResponseSchema {\n        @Schema(description = \"the user id\")\n        private String id;\n    }\n\n    static class GenericError {\n        private int code;\n        private String message;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/EnumParameterResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Context;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\nimport javax.ws.rs.core.SecurityContext;\n\npublic class EnumParameterResource {\n\n    @GET\n    @Path(\"/task\")\n    @Consumes(MediaType.APPLICATION_JSON)\n    @Produces(MediaType.APPLICATION_JSON)\n    @ApiResponse(responseCode = \"200\", content = {\n            @Content(mediaType = \"application/json\", array = @ArraySchema(schema = @Schema(type = \"array\", implementation = TaskDTO.class))) })\n    @ApiResponse(responseCode = \"404\", description = \"User not found\")\n    @Operation(parameters = { @Parameter(in = ParameterIn.QUERY, name = \"guid\", required = true), })\n    public Response getTasks(@QueryParam(\"tasktype\") TaskType taskType, @Context SecurityContext securityContext) {\n        return null;\n    }\n\n    public enum TaskType {\n        A,\n        B\n    }\n    public class TaskDTO {\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ExternalDocsReference.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@ExternalDocumentation(\n        description = \"External documentation description in class\",\n        url = \"http://url.com\"\n)\npublic class ExternalDocsReference {\n    @GET\n    @Path(\"/\")\n    @Operation(externalDocs =\n    @ExternalDocumentation(\n            description = \"External documentation description in @Operation\",\n            url = \"http://url.com\"\n    )\n    )\n    @ExternalDocumentation(\n            description = \"External documentation description in method\",\n            url = \"http://url.com\"\n    )\n    public void setRequestBody(@RequestBody ExternalDocsSchema schema) {\n    }\n\n    @Schema(externalDocs = @ExternalDocumentation(\n            description = \"External documentation description in schema\",\n            url = \"http://url.com\"\n    ))\n    public class ExternalDocsSchema {\n        public String foo;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/GenericResponsesResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class GenericResponsesResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(\n            operationId = \"getSomethings\",\n            summary = \"Returns a list of somethings\",\n            responses = {\n                    @ApiResponse(content = @Content(schema = @Schema(implementation = SomethingResponse.class)))\n            }\n    )\n    public void getResponses() {\n    }\n\n    @GET\n    @Path(\"/overridden\")\n    @Operation(\n            operationId = \"getSomethingsOverridden\",\n            summary = \"Returns a list of somethings\",\n            responses = {\n                    @ApiResponse(content = @Content(schema = @Schema(implementation = SomethingDTO.class)))\n            }\n    )\n    public void getResponsesWithOverriddenName() {\n    }\n\n    class SomethingResponse extends JsonResponse<SomethingDTO> {\n    }\n\n    public class JsonResponse<T> {\n        private DataWithCursor<T> data;\n\n        public JsonResponse() {\n        }\n\n        public JsonResponse(DataWithCursor<T> data) {\n            this.data = data;\n        }\n\n        public Data<T> getData() {\n            return data;\n        }\n    }\n\n    public class DataWithCursor<T> extends Data<T> {\n\n        private String previousCursor;\n        private String nextCursor;\n\n        public DataWithCursor(List<T> data, String previousCursor, String nextCursor) {\n            super(data);\n            this.previousCursor = previousCursor;\n            this.nextCursor = nextCursor;\n        }\n\n        public DataWithCursor(List<T> data) {\n            super(data);\n        }\n\n        public String getPreviousCursor() {\n            return previousCursor;\n        }\n\n        public String getNextCursor() {\n            return nextCursor;\n        }\n    }\n\n    public class Data<T> {\n\n        private List<T> items;\n\n        private Data() {\n        }\n\n        public Data(List<T> items) {\n            this.items = items;\n        }\n\n        public Data(T item) {\n            items = new ArrayList<>();\n            items.add(item);\n        }\n\n        public List<T> getItems() {\n            return items;\n        }\n    }\n\n    @Schema(name = \"Something\")\n    public class SomethingDTO {\n        private String id;\n\n        public SomethingDTO(SomethingAlt somethingAlt) {\n            id = somethingAlt.getId();\n        }\n\n        public String getId() {\n            return id;\n        }\n    }\n\n    public class SomethingAlt {\n        private String id;\n\n        public String getId() {\n            return id;\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/HiddenAnnotatedUserResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.data.UserData;\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Hidden;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.Response;\n\n@Path(\"/user\")\n@Produces({\"application/json\", \"application/xml\"})\n@Hidden\npublic class HiddenAnnotatedUserResource {\n    static UserData userData = new UserData();\n\n    @POST\n    @Operation(hidden = true, summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response createUser(\n            @Parameter(description = \"Created user object\", required = true) User user) {\n        userData.addUser(user);\n        return Response.ok().entity(\"\").build();\n    }\n\n    @Path(\"/user\")\n    @Produces({\"application/json\", \"application/xml\"})\n    public class HiddenAnnotatedUserResourceMethodAndData {\n        UserData userData = new UserData();\n\n        @POST\n        @Hidden\n        @Operation(summary = \"Create user\",\n                description = \"This can only be done by the logged in user.\")\n        @Path(\"/1\")\n        public Response createUser(\n                @Parameter(description = \"Created user object\", required = true) User user) {\n            userData.addUser(user);\n            return Response.ok().entity(\"\").build();\n        }\n\n        @POST\n        @Operation(summary = \"Create user\",\n                description = \"This can only be done by the logged in user.\")\n        @Path(\"/2\")\n        public Response createUserWithHiddenBeanProperty(\n                @Parameter(description = \"Created user object\", required = true) UserResourceBean user) {\n            return Response.ok().entity(\"\").build();\n        }\n    }\n\n    public class UserResourceBean {\n\n        @Hidden\n        public HiddenAnnotatedUserResourceBean id;\n        public String foo;\n    }\n\n\n    public class HiddenAnnotatedUserResourceBean {\n\n        public String id;\n        public String foo;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/HiddenUserResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.data.UserData;\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.Response;\n\n@Path(\"/user\")\n@Produces({\"application/json\", \"application/xml\"})\npublic class HiddenUserResource {\n    static UserData userData = new UserData();\n\n    @POST\n    @Operation(hidden = true, summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response createUser(\n            @Parameter(description = \"Created user object\", required = true) User user) {\n        userData.addUser(user);\n        return Response.ok().entity(\"\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/JsonIdentityCyclicResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.model.ModelWithJsonIdentityCyclic;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.Response;\n\n@Path(\"/pet\")\n@Produces({\"application/json\", \"application/xml\"})\npublic class JsonIdentityCyclicResource {\n\n    @POST\n    @Operation(description = \"Add a single object\")\n    public Response test(\n            @Parameter(required = true) ModelWithJsonIdentityCyclic model) {\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/JsonIdentityResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.model.ModelWithJsonIdentity;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.Response;\n\n@Path(\"/pet\")\n@Produces({\"application/json\", \"application/xml\"})\npublic class JsonIdentityResource {\n\n    @POST\n    @Operation(description = \"Add a single object\")\n    public Response test(\n            @Parameter(required = true) ModelWithJsonIdentity model) {\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Misc31Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\n\n@Path(\"/pet\")\n@Produces({\"application/json\", \"application/xml\"})\npublic class Misc31Resource {\n  @PUT\n  public ModelWithOAS31Stuff updatePet(){ return null;}\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ModelWithOAS31Stuff.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.model.MultipleBaseBean;\nimport io.swagger.v3.oas.annotations.StringToClassMapItem;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport java.util.List;\n\n@Schema(\n        $id = \"http://yourdomain.com/schemas/myschema.json\",\n        description = \"this is model for testing OAS 3.1 resolving\",\n        $comment = \"Random comment at schema level\",\n        types = {\"object\"}\n)\npublic class ModelWithOAS31Stuff {\n\n\n\n\n    private List<String> randomList;\n    private Object status;\n    private int intValue;\n    private String text;\n    private String encodedString;\n    private Address address;\n    private Client client;\n\n    @ArraySchema(\n            maxContains = 10,\n            minContains = 1,\n            contains = @Schema(\n                    types = \"string\"\n            ),\n            unevaluatedItems = @Schema(\n                    types = \"number\"\n            ),\n            prefixItems = {\n                    @Schema(\n                            types = \"string\"\n                    )\n            }\n    )\n    public List<String> getRandomList() {\n        return randomList;\n    }\n\n    public void setRandomList(List<String> randomList) {\n        this.randomList = randomList;\n    }\n\n    @Schema(types = {\n            \"string\",\n            \"number\"\n    })\n    public Object getStatus() {\n        return status;\n    }\n\n    public void setStatus(Object status) {\n        this.status = status;\n    }\n\n    @Schema(\n            $anchor = \"intValue\",\n            $comment = \"comment at schema property level\",\n            exclusiveMaximumValue = 100,\n            exclusiveMinimumValue = 1\n    )\n    public int getIntValue() {\n        return intValue;\n    }\n\n    public void setIntValue(int intValue) {\n        this.intValue = intValue;\n    }\n\n    @Schema(\n            contentEncoding = \"plan/text\",\n            contentMediaType = \"base64\"\n    )\n    public String getText() {\n        return text;\n    }\n\n    public void setText(String text) {\n        this.text = text;\n    }\n\n    @Schema(\n            contentMediaType = \"application/jwt\",\n            contentSchema = MultipleBaseBean.class\n    )\n    public String getEncodedString() {\n        return encodedString;\n    }\n\n    public void setEncodedString(String encodedString) {\n        this.encodedString = encodedString;\n    }\n\n    public Address getAddress() {\n        return address;\n    }\n\n    public void setAddress(Address address) {\n        this.address = address;\n    }\n\n\n    @Schema(\n            dependentSchemas = {\n                    @StringToClassMapItem(\n                            key = \"creditCard\",\n                            value = CreditCard.class\n                    )\n            }\n    )\n    public String getClient() {\n        return null;\n    }\n\n    public void setClient(String client) {\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/MyClass.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\n\npublic class MyClass extends MySuperClass {\n\n    public void populate(final String isotonicDrink, final String softDrink,\n                         final String isoDrink, final String isotonicDrinkOnlyXmlElement) {\n        this.isotonicDrink = isotonicDrink;\n        this.softDrink = softDrink;\n        this.isoDrink = isoDrink;\n        this.isotonicDrinkOnlyXmlElement = isotonicDrinkOnlyXmlElement;\n    }\n\n    @XmlElement(name = \"beerDrink\")\n    @JsonProperty(\"beerDrink\")\n    private String isotonicDrink;\n\n    @XmlElement(name = \"sugarDrink\")\n    private String softDrink;\n\n    @Schema(name = \"saltDrink\")\n    private String isoDrink;\n\n    @XmlElement(name = \"beerDrinkXmlElement\")\n    private String isotonicDrinkOnlyXmlElement;\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/MyOtherClass.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport javax.xml.bind.annotation.XmlAttribute;\nimport javax.xml.bind.annotation.XmlElement;\n\npublic class MyOtherClass extends MySuperClass {\n\n    public void populate(final String myPropertyName) {\n        this.myProperty = myPropertyName;\n    }\n\n    @XmlElement(name = \"MyPrOperTyName\")\n    @XmlAttribute(name = \"MyPrOperTyName\")\n    private String myProperty;\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/MySuperClass.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport javax.xml.bind.annotation.XmlAccessType;\nimport javax.xml.bind.annotation.XmlAccessorType;\n\n@XmlAccessorType(XmlAccessType.FIELD)\npublic class MySuperClass {\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/NoPathSubResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\n\n/**\n * The {@code NoPathSubResource} class defines test sub-resource without\n * {@link javax.ws.rs.Path} annotations.\n */\npublic class NoPathSubResource {\n\n    @Operation(description = \"Returns greeting\")\n    @GET\n    public String getGreeting() {\n        return \"Hello!\";\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ParameterMaximumValueResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\n\nimport javax.validation.constraints.Max;\nimport javax.validation.constraints.Min;\nimport javax.ws.rs.DefaultValue;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\nimport java.util.List;\n\n@Path(\"/test\")\npublic class ParameterMaximumValueResource {\n\n    @GET\n    @Path(\"/{petId}\")\n    public Response getPetById(\n            @Parameter(\n                    description = \"ID of pet that needs to be fetched\",\n                    schema = @Schema(\n                            type = \"integer\",\n                            format = \"int64\",\n                            exclusiveMinimumValue = 1,\n                            exclusiveMaximumValue = 10\n                    ),\n                    required = true)\n            @PathParam(\"petId\") Long petId) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ParametersResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\npublic class ParametersResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(parameters = {\n            @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\",\n                    required = true, description = \"parameter description\",\n                    allowReserved = true,\n                    schema = @Schema(\n                            type = \"string\",\n                            format = \"uuid\",\n                            description = \"the generated UUID\",\n                            accessMode = Schema.AccessMode.READ_ONLY)\n            )}\n    )\n    public void getParameters(@QueryParam(\"subscriptionId\") String subscriptionId) {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/PetResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.data.PetData;\nimport io.swagger.v3.jaxrs2.resources.exception.NotFoundException;\nimport io.swagger.v3.jaxrs2.resources.model.Category;\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.BeanParam;\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.MatrixParam;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n@Consumes(\"application/json\")\n@Path(\"/pet\")\n@Produces({\"application/json\", \"application/xml\"})\npublic class PetResource {\n    static PetData petData = new PetData();\n\n    @GET\n    @Path(\"/{petId}\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"Returns a pet when 0 < ID <= 10.  ID > 10 or nonintegers will simulate API error conditions\",\n            responses = {\n                    @ApiResponse(\n                            description = \"The pet\", content = @Content(\n                            schema = @Schema(implementation = Pet.class)\n                    )),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\")\n            })\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\"/*, _enum = \"range[1,10]\"*/, required = true)\n            @PathParam(\"petId\") Long petId) throws NotFoundException {\n        Pet pet = petData.getPetById(petId);\n        if (null != pet) {\n            return Response.ok().entity(pet).build();\n        } else {\n            throw new NotFoundException(404, \"Pet not found\");\n        }\n    }\n\n    @POST\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPet(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodynoannotation\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Produces({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store no annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetNoAnnotation(Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodyid\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store passing an integer with generic parameter annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetByInteger(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) int petId) {\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodyidnoannotation\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store passing an integer without parameter annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetByIntegerNoAnnotation(int petId) {\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @PUT\n    @Operation(summary = \"Update an existing pet\",\n            responses = {\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\"),\n                    @ApiResponse(responseCode = \"405\", description = \"Validation exception\")})\n    public Response updatePet(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @GET\n    @Path(\"/findByStatus\")\n    @Produces(\"application/xml\")\n    @Operation(summary = \"Finds Pets by status\",\n            description = \"Multiple status values can be provided with comma separated strings\",\n            responses = {\n                    @ApiResponse(\n                            content = @Content(mediaType = \"application/json\",\n                                    schema = @Schema(implementation = Pet.class))),\n                    @ApiResponse(\n                            responseCode = \"400\", description = \"Invalid status value\"\n                    )}\n    )\n    public Response findPetsByStatus(\n            @Parameter(description = \"Status values that need to be considered for filter\", required = true/*, defaultValue = \"available\", allowableValues = \"available,pending,sold\", allowMultiple = true*/) @QueryParam(\"status\") String status,\n            @BeanParam QueryResultBean qr\n    ) {\n        return Response.ok(petData.findPetByStatus(status)).build();\n    }\n\n    @GET\n    @Path(\"/findByCategory/{category}\")\n    @Produces(\"application/xml\")\n    @Operation(summary = \"Finds Pets by category\",\n            responses = {\n                    @ApiResponse(\n                            content = @Content(mediaType = \"application/json\",\n                                    schema = @Schema(implementation = Pet.class))),\n                    @ApiResponse(\n                            responseCode = \"400\", description = \"Invalid category value\"\n                    )}\n    )\n    public Response findPetsByCategory(\n            @Parameter(description = \"Category value that need to be considered for filter\", required = true) @MatrixParam(\"category\") Category category,\n            @BeanParam QueryResultBean qr\n    ) {\n        return Response.ok(petData.findPetByCategory(category)).build();\n    }\n\n    @GET\n    @Path(\"/findByTags\")\n    @Produces(\"application/json\")\n    @Operation(summary = \"Finds Pets by tags\",\n            description = \"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\",\n            responses = {\n                    @ApiResponse(description = \"Pets matching criteria\",\n                            content = @Content(schema = @Schema(implementation = Pet.class))\n                    ),\n                    @ApiResponse(description = \"Invalid tag value\", responseCode = \"400\")\n            })\n    @Deprecated\n    public Response findPetsByTags(\n            @Parameter(description = \"Tags to filter by\", required = true/*, allowMultiple = true*/) @QueryParam(\"tags\") String tags) {\n        return Response.ok(petData.findPetByTags(tags)).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/PetResourceSlashesinPath.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.data.PetData;\nimport io.swagger.v3.jaxrs2.resources.exception.NotFoundException;\nimport io.swagger.v3.jaxrs2.resources.model.Category;\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.BeanParam;\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.MatrixParam;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n@Consumes(\"application/json\")\n@Path(\"pet\")\n@Produces({\"application/json\", \"application/xml\"})\npublic class PetResourceSlashesinPath {\n    static PetData petData = new PetData();\n\n    @GET\n    @Path(\"/{petId}\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"Returns a pet when 0 < ID <= 10.  ID > 10 or nonintegers will simulate API error conditions\",\n            responses = {\n                    @ApiResponse(\n                            description = \"The pet\", content = @Content(\n                            schema = @Schema(implementation = Pet.class)\n                    )),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\")\n            })\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\"/*, _enum = \"range[1,10]\"*/, required = true)\n            @PathParam(\"petId\") Long petId) throws NotFoundException {\n        Pet pet = petData.getPetById(petId);\n        if (null != pet) {\n            return Response.ok().entity(pet).build();\n        } else {\n            throw new NotFoundException(404, \"Pet not found\");\n        }\n    }\n\n    @POST\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPet(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"bodynoannotation\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Produces({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store no annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetNoAnnotation(Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodyid/\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store passing an integer with generic parameter annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetByInteger(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) int petId) {\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"bodyidnoannotation/\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store passing an integer without parameter annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetByIntegerNoAnnotation(int petId) {\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @PUT\n    @Operation(summary = \"Update an existing pet\",\n            responses = {\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\"),\n                    @ApiResponse(responseCode = \"405\", description = \"Validation exception\")})\n    public Response updatePet(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @GET\n    @Path(\"/findByStatus\")\n    @Produces(\"application/xml\")\n    @Operation(summary = \"Finds Pets by status\",\n            description = \"Multiple status values can be provided with comma separated strings\",\n            responses = {\n                    @ApiResponse(\n                            content = @Content(mediaType = \"application/json\",\n                                    schema = @Schema(implementation = Pet.class))),\n                    @ApiResponse(\n                            responseCode = \"400\", description = \"Invalid status value\"\n                    )}\n    )\n    public Response findPetsByStatus(\n            @Parameter(description = \"Status values that need to be considered for filter\", required = true/*, defaultValue = \"available\", allowableValues = \"available,pending,sold\", allowMultiple = true*/) @QueryParam(\"status\") String status,\n            @BeanParam QueryResultBean qr\n    ) {\n        return Response.ok(petData.findPetByStatus(status)).build();\n    }\n\n    @GET\n    @Path(\"/findByTags\")\n    @Produces(\"application/json\")\n    @Operation(summary = \"Finds Pets by tags\",\n            description = \"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\",\n            responses = {\n                    @ApiResponse(description = \"Pets matching criteria\",\n                            content = @Content(schema = @Schema(implementation = Pet.class))\n                    ),\n                    @ApiResponse(description = \"Invalid tag value\", responseCode = \"400\")\n            })\n    @Deprecated\n    public Response findPetsByTags(\n            @Parameter(description = \"Tags to filter by\", required = true/*, allowMultiple = true*/) @QueryParam(\"tags\") String tags) {\n        return Response.ok(petData.findPetByTags(tags)).build();\n    }\n\n    @GET\n    @Path(\"/findByCategory/{category}\")\n    @Produces(\"application/xml\")\n    @Operation(summary = \"Finds Pets by category\",\n            responses = {\n                    @ApiResponse(\n                            content = @Content(mediaType = \"application/json\",\n                                    schema = @Schema(implementation = Pet.class))),\n                    @ApiResponse(\n                            responseCode = \"400\", description = \"Invalid category value\"\n                    )}\n    )\n    public Response findPetsByCategory(\n            @Parameter(description = \"Category value that need to be considered for filter\", required = true) @MatrixParam(\"category\") Category category,\n            @BeanParam QueryResultBean qr\n    ) {\n        return Response.ok(petData.findPetByCategory(category)).build();\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/PostalCodeNumberPattern.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n\npublic class PostalCodeNumberPattern {\n\n    private Object postalCode;\n\n    @Schema(\n            pattern = \"[0-9]{5}(-[0-9]{4})?\"\n    )\n    public Object getPostalCode() {\n        return postalCode;\n    }\n\n    public void setPostalCode(Object postalCode) {\n        this.postalCode = postalCode;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/PostalCodePattern.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class PostalCodePattern {\n\n    private Object postalCode;\n\n    @Schema(\n            pattern = \"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]\"\n    )\n    public Object getPostalCode() {\n        return postalCode;\n    }\n\n    public void setPostalCode(Object postalCode) {\n        this.postalCode = postalCode;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/QueryResultBean.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport javax.ws.rs.QueryParam;\n\npublic class QueryResultBean {\n    @QueryParam(\"skip\")\n    private Integer skip;\n\n    @QueryParam(\"limit\")\n    private Integer limit;\n\n    public Integer getSkip() {\n        return skip;\n    }\n\n    public void setSkip(Integer skip) {\n        this.skip = skip;\n    }\n\n    public Integer getLimit() {\n        return limit;\n    }\n\n    public void setLimit(Integer limit) {\n        this.limit = limit;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ReaderListenerResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.ReaderListener;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.integration.api.OpenApiReader;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.tags.Tag;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\npublic class ReaderListenerResource implements ReaderListener {\n\n    @GET\n    @Path(\"/\")\n    @Operation(operationId = \"operationId\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\")\n    public Response getSummaryAndDescription(@QueryParam(\"subscriptionId\") @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\",\n            required = true, description = \"parameter description\",\n            allowEmptyValue = true, allowReserved = true,\n            schema = @Schema(\n                    type = \"string\",\n                    format = \"uuid\",\n                    description = \"the generated UUID\",\n                    accessMode = Schema.AccessMode.READ_ONLY)\n    ) String subscriptionId,\n                                             @QueryParam(\"description\") String description) {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    @Override\n    public void beforeScan(OpenApiReader reader, OpenAPI openAPI) {\n        openAPI.addTagsItem(new Tag().name(\"Tag-added-before-read\"));\n    }\n\n    @Override\n    public void afterScan(OpenApiReader reader, OpenAPI openAPI) {\n        openAPI.addTagsItem(new Tag().name(\"Tag-added-after-read\"));\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/RefCallbackResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.callbacks.Callbacks;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class RefCallbackResource {\n    @Callbacks({\n            @Callback(\n                    name = \"testCallback1\",\n                    ref = \"Callback\",\n                    operation = @Operation(\n                            operationId = \"getAllReviews\",\n                            summary = \"get all the reviews\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    type = \"integer\",\n                                                    format = \"int32\")))),\n                    callbackUrlExpression = \"http://www.url.com\")\n    })\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"getWithNoParameters\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\")\n            })\n    @GET\n    @Path(\"/simplecallback\")\n    public String simpleGet() {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/RefExamplesResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.petstore.example.SubscriptionResponse;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\n/**\n * Examples Resource Scenario\n */\npublic class RefExamplesResource {\n    @Path(\"/example\")\n    @POST\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account\",\n            parameters = {\n                    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n                            schema = @Schema(name = \"Schema\", description = \"Schema\", example = \"Subscription example\"),\n                            style = ParameterStyle.SIMPLE, example = \"example\",\n                            examples = {\n                                    @ExampleObject(name = \"subscriptionId_1\", value = \"12345\",\n                                            summary = \"Subscription number 12345\", externalValue = \"Subscription external value 1\"\n                                    , ref = \"Id\")\n                            })\n            })\n    public SubscriptionResponse subscribe(final int subscriptionId) {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/RefHeaderResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.headers.Header;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Class with Links\n */\npublic class RefHeaderResource {\n    @Operation(\n            summary = \"Simple get operation\",\n            description = \"Defines a simple get operation with no inputs and a complex output\",\n            operationId = \"getWithPayloadResponse\",\n            deprecated = true,\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\",\n                            headers = {@Header(\n                                    name = \"Rate-Limit-Limit\",\n                                    description = \"The number of allowed requests in the current period\",\n                                    ref = \"Header\",\n                                    schema = @Schema(type = \"integer\"))})\n            })\n    @GET\n    @Path(\"/path\")\n    public void simpleGet() {\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/RefLinksResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.links.Link;\nimport io.swagger.v3.oas.annotations.links.LinkParameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with Links\n */\npublic class RefLinksResource {\n    @Path(\"/links\")\n    @Operation(operationId = \"getUserWithAddress\",\n            responses = {\n                    @ApiResponse(description = \"test description\",\n                             content = @Content(mediaType = \"*/*\", schema = @Schema(ref = \"#/components/schemas/User\")),\n                            links = {\n                                    @Link(\n                                            name = \"address\",\n                                            operationId = \"getAddress\",\n                                            ref = \"Link\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\"))\n                            })}\n    )\n    @GET\n    public String getUser(@QueryParam(\"userId\")final String userId) {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/RefParameter3029Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class RefParameter3029Resource {\n\n    @GET\n    @Path(\"/1\")\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"sendPayload1\",\n            parameters = @Parameter(ref = \"id\"))\n    public void sendPayload1() {\n    }\n\n    @GET\n    @Path(\"/2\")\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"sendPayload2\")\n    @Parameter(ref = \"id\")\n    public void sendPayload2() {\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/RefParameter3074Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.responses.ApiResponses;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class RefParameter3074Resource {\n\n    public static final String EXPECTED_YAML_WITHOUT_WRAPPER =\n            \"openapi: 3.0.1\\n\" +\n            \"paths:\\n\" +\n            \"  /employee:\\n\" +\n            \"      get:\\n\" +\n            \"        summary: Get an employee\\n\" +\n            \"        operationId: getEmployee\\n\" +\n            \"        responses:\\n\" +\n            \"          \\\"200\\\":\\n\" +\n            \"            content:\\n\" +\n            \"              application/json:\\n\" +\n            \"                schema:\\n\" +\n            \"                   $ref: \\\"#/components/schemas/Employee\\\"\\n\" +\n            \"          \\\"500\\\":\\n\" +\n            \"            content:\\n\" +\n            \"              application/json:\\n\" +\n            \"                schema:\\n\" +\n            \"                  $ref: \\\"#/components/schemas/Error\\\"\\n\" +\n            \"components:\\n\" +\n            \"  schemas:\\n\" +\n            \"    Employee:\\n\" +\n            \"      type: object\\n\" +\n            \"    Error:\\n\" +\n            \"      type: object\";\n\n    public static final String EXPECTED_YAML_WITH_WRAPPER = EXPECTED_YAML_WITHOUT_WRAPPER +\n            \"\\n    Wrapper:\\n     type: object\";\n\n    class Wrapper<A> {\n        final A a;\n\n        Wrapper(A a) {\n            this.a = a;\n        }\n    }\n\n    class Employee {\n        int number;\n        String name;\n\n        Employee(int number, String name) {\n            this.number = number;\n            this.name = name;\n        }\n    }\n\n    class Error {\n        String message;\n    }\n\n    @GET\n    @Path(\"/employee\")\n    @Operation(summary = \"Get an employee\")\n    @ApiResponses({\n        @ApiResponse(\n            responseCode = \"200\",\n            content = @Content(schema = @Schema(implementation = Employee.class), mediaType = \"application/json\")\n        ),\n        @ApiResponse(\n            responseCode = \"500\",\n            content = @Content(schema = @Schema(implementation = Error.class), mediaType = \"application/json\")\n        ),\n    })\n    public Wrapper getEmployee() {\n        return new Wrapper<Employee>(new Employee(1, \"Michael Suyama\"));\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/RefParameterResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\npublic class RefParameterResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(\n            summary = \"Simple get operation\",\n            description = \"Defines a simple get operation with a payload complex input object\",\n            operationId = \"sendPayload\",\n            deprecated = true\n    )\n    public void sendPayload(@Parameter(ref = \"id\") @QueryParam(\"id\") final int id) {\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/RefRequestBodyResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class RefRequestBodyResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(\n            summary = \"Simple get operation\",\n            description = \"Defines a simple get operation with a payload complex input object\",\n            operationId = \"sendPayload\",\n            deprecated = true,\n            requestBody = @RequestBody(ref = \"User\")\n    )\n    public void sendPayload(final User user) {\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/RefResponsesResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class RefResponsesResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(\n            summary = \"Simple get operation\",\n            description = \"Defines a simple get operation with no inputs and a complex output object\",\n            operationId = \"getWithPayloadResponse\",\n            deprecated = true,\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\",\n                            content = @Content(\n                                    mediaType = \"application/json\",\n                                    schema = @Schema(implementation = SampleResponseSchema.class)\n                            )\n                    ),\n                    @ApiResponse(\n                            description = \"boo\",\n                            content = @Content(\n                                    mediaType = \"*/*\",\n                                    schema = @Schema(implementation = GenericError.class)\n                            )\n                    ),\n                    @ApiResponse(\n                            responseCode = \"401\",\n                            ref = \"invalidJWT\"\n                    )\n            }\n    )\n\n    public void getResponses() {\n    }\n\n    static class SampleResponseSchema {\n        @Schema(description = \"the user id\")\n        private String id;\n    }\n\n    static class GenericError {\n        private int code;\n        private String message;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/RefSecurityResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeType;\nimport io.swagger.v3.oas.annotations.security.*;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@SecurityScheme(name = \"myOauth2Security\",\n        type = SecuritySchemeType.OAUTH2,\n        in = SecuritySchemeIn.HEADER,\n        description = \"myOauthSecurity Description\",\n        ref = \"Security\",\n        flows = @OAuthFlows(implicit = @OAuthFlow(authorizationUrl = \"http://x.com\",\n                scopes = @OAuthScope(\n                        name = \"write:pets\",\n                        description = \"modify pets in your account\"))\n        )\n)\npublic class RefSecurityResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(operationId = \"Operation Id\",\n            description = \"description\")\n    @SecurityRequirement(name = \"security_key\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    )\n    public void getSecurity() {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ResourceWithJacksonBean.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.model.JacksonBean;\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\n\n@Path(\"test\")\n@Produces(\"application/json\")\npublic class ResourceWithJacksonBean {\n\n    @POST\n    @Path(\"/document/{documentName}.json\")\n    @Operation(operationId = \"uploadAttachAndParseUserDocument\", description = \"Uploads, parses, and attaches the document to the user's job application.\")\n    public String uploadDocument(JacksonBean bean) throws Exception {\n        return \"\";\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ResourceWithKnownInjections.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.servlet.ServletConfig;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Context;\n\n@Path(\"/resource/{id}\")\n@Produces({\"application/json\", \"application/xml\"})\npublic class ResourceWithKnownInjections {\n\n    private Integer constructorParam;\n    @QueryParam(\"fieldParam\")\n    private String fieldParam; // injection into a class field\n\n    @Parameter(hidden = true)\n    @QueryParam(\"hiddenParam\")\n    private String hiddenParam;\n\n    // injection into a constructor parameter\n    public ResourceWithKnownInjections(@PathParam(\"id\") Integer constructorParam,\n                                       @QueryParam(\"hiddenParam\") @Parameter(hidden = true) String hiddenParam,\n                                       @Context ServletConfig context) {\n        this.constructorParam = constructorParam;\n    }\n\n    private ResourceWithKnownInjections(@PathParam(\"id\") Integer constructorParam, @QueryParam(\"fakeParam\") String\n            fakeParam) {\n        this.constructorParam = constructorParam;\n    }\n\n    @GET\n    @Operation\n    public String get(@QueryParam(\"methodParam\") String methodParam) {\n        // injection into a resource method parameter\n        final StringBuilder sb = new StringBuilder();\n        sb.append(\"Constructor param: \").append(constructorParam).append(\"\\n\");\n        sb.append(\"Field param: \").append(fieldParam).append(\"\\n\");\n        sb.append(\"Method param: \").append(methodParam).append(\"\\n\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ResourceWithSubResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\n\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Path;\n\n@Path(\"/employees\")\npublic class ResourceWithSubResource {\n    @Operation(description = \"gets all employees\",\n            tags = \"Employees\")\n    @ApiResponse(description = \"200\", responseCode = \"200\",\n            content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class))))\n    @Path(\"/{id}\")\n    public SubResource getTest() {\n        return new SubResource();\n    }\n\n    @Path(\"noPath\")\n    @Operation(description = \"Returns sub-resource without @Path\")\n    public NoPathSubResource getNoPathTest() {\n        return new NoPathSubResource();\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ResponseContentWithArrayResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport java.util.List;\n\npublic class ResponseContentWithArrayResource {\n\n    @Operation(\n            summary = \"Get a list of users\",\n            description = \"Get a list of users registered in the system\",\n            responses = {@ApiResponse(\n                    responseCode = \"200\",\n                    description = \"The response for the user request\",\n                    content = {\n                            @Content(\n                                    mediaType = \"application/json\",\n                                    array = @ArraySchema(schema = @Schema(implementation = User.class))\n                            )\n                    })\n            }\n    )\n    @GET\n    @SecurityRequirement(name = \"JWT\")\n    @Path(\"/user\")\n    public List<User> getUsers() {\n        return null;\n    }\n\n    class User {\n        public String foo;\n\n        @ArraySchema(arraySchema = @Schema(required = true), schema = @Schema(type = \"string\"))\n        public List<String> issue3438;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ResponseReturnTypeResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\n\n@Consumes(MediaType.APPLICATION_JSON)\n@Produces(MediaType.APPLICATION_JSON)\n@Path(\"/sample\")\npublic interface ResponseReturnTypeResource {\n\n    @GET\n    @Path(\"/{id}\")\n    @Operation(summary = \"Find by id\", description = \"Find by id operation\")\n    @ApiResponse(responseCode = \"200\", description = \"Ok\", useReturnTypeSchema = true)\n    @ApiResponse(responseCode = \"201\",\n            description = \"201\",\n            useReturnTypeSchema = true,\n            content = @Content(mediaType = \"application/json\"))\n    @ApiResponse(responseCode = \"204\",\n            description = \"No Content\",\n            content = @Content(mediaType = \"application/json\", schema = @Schema(implementation = Void.class)))\n    TestDTO find(@Parameter(description = \"ID\") @PathParam(\"id\") Integer id);\n\n    @GET\n    @Path(\"/{id}/default\")\n    @Operation(summary = \"Find by id (default)\", description = \"Find by id operation (default)\")\n    TestDTO findDefault(@Parameter(description = \"ID\") @PathParam(\"id\") Integer id);\n\n    class TestDTO {\n        public String foo;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ResponsesInterface.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\n@ApiResponse(\n        responseCode = \"200\",\n        description = \"voila!\",\n        content = @Content(\n                mediaType = \"application/json\",\n                schema = @Schema(implementation = ResponsesInterface.SampleResponseSchema.class)\n        )\n)\npublic interface ResponsesInterface {\n\n    class SampleResponseSchema {\n        @Schema(description = \"the user id\")\n        private String id;\n    }\n\n    class GenericError {\n        private int code;\n        private String message;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ResponsesResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.model.MultipleBaseBean;\nimport io.swagger.v3.jaxrs2.resources.model.MultipleSub1Bean;\nimport io.swagger.v3.jaxrs2.resources.model.MultipleSub2Bean;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.servlet.http.HttpServletRequest;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Context;\nimport javax.ws.rs.core.MediaType;\n\npublic class ResponsesResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(\n            summary = \"Simple get operation\",\n            description = \"Defines a simple get operation with no inputs and a complex output object\",\n            operationId = \"getWithPayloadResponse\",\n            deprecated = true,\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\",\n                            content = @Content(\n                                    mediaType = \"application/json\",\n                                    schema = @Schema(implementation = SampleResponseSchema.class)\n                            )\n                    ),\n                    @ApiResponse(\n                            description = \"boo\",\n                            content = @Content(\n                                    mediaType = \"*/*\",\n                                    schema = @Schema(implementation = GenericError.class)\n                            )\n                    )\n            }\n    )\n\n    public void getResponses() {\n    }\n\n    @GET\n    @Path(\"/oneOf\")\n    @Operation(summary = \"Test inheritance / polymorphism\",\n            responses = {\n                    @ApiResponse(description = \"bean answer\",\n                            responseCode = \"200\",\n                            content = @Content(\n                                    mediaType = MediaType.APPLICATION_JSON,\n                                    schema = @Schema(\n                                            oneOf = { MultipleSub1Bean.class, MultipleSub2Bean.class }\n                                    )\n                            )\n                    )\n            })\n    @Produces({ MediaType.APPLICATION_JSON })\n    public MultipleBaseBean getOneOf(\n            @Context HttpServletRequest req,\n            @Parameter(description = \"Test inheritance / polymorphism\",\n                    required = true,\n                    example = \"1\")\n            @QueryParam(\"number\") final int beanNumber) {\n\n        return null;\n    }\n\n    @GET\n    @Path(\"/anyOf\")\n    @Operation(summary = \"Test inheritance / polymorphism\",\n            responses = {\n                    @ApiResponse(description = \"bean answer\",\n                            responseCode = \"200\",\n                            content = @Content(\n                                    mediaType = MediaType.APPLICATION_JSON,\n                                    schema = @Schema(\n                                            anyOf = { MultipleSub1Bean.class, MultipleSub2Bean.class }\n                                    )\n                            )\n                    )\n            })\n    @Produces({ MediaType.APPLICATION_JSON })\n    public MultipleBaseBean getAnyOf(\n            @Context HttpServletRequest req,\n            @Parameter(description = \"Test inheritance / polymorphism\",\n                    required = true,\n                    example = \"1\")\n            @QueryParam(\"number\") final int beanNumber) {\n\n        return null;\n    }\n\n    @GET\n    @Path(\"/allOf\")\n    @Operation(summary = \"Test inheritance / polymorphism\",\n            responses = {\n                    @ApiResponse(description = \"bean answer\",\n                            responseCode = \"200\",\n                            content = @Content(\n                                    mediaType = MediaType.APPLICATION_JSON,\n                                    schema = @Schema(\n                                            allOf = { MultipleSub1Bean.class, MultipleSub2Bean.class }\n                                    )\n                            )\n                    )\n            })\n    @Produces({ MediaType.APPLICATION_JSON })\n    public MultipleBaseBean getAllOf(\n            @Context HttpServletRequest req,\n            @Parameter(description = \"Test inheritance / polymorphism\",\n                    required = true,\n                    example = \"1\")\n            @QueryParam(\"number\") final int beanNumber) {\n\n        return null;\n    }\n\n    static class SampleResponseSchema {\n        @Schema(description = \"the user id\")\n        private String id;\n    }\n\n    static class GenericError {\n        private int code;\n        private String message;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SchemaAdditionalPropertiesBooleanResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n\npublic class SchemaAdditionalPropertiesBooleanResource {\n\n    @Schema(additionalProperties = Schema.AdditionalPropertiesValue.FALSE)\n    static class Pet {\n        @Schema(additionalPropertiesSchema = Bar.class)\n        public Bar bar;\n\n        @Schema(additionalProperties = Schema.AdditionalPropertiesValue.FALSE)\n        public Bar vbar;\n    }\n\n\n    static class Bar {\n        public String foo;\n    }\n\n    @Schema(description = \"A car\")\n    static class Car {\n        public String foo;\n    }\n\n    @GET\n    @Path(\"/test\")\n    public Pet test() {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SchemaAdditionalPropertiesResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\nimport java.util.List;\nimport java.util.Map;\n\npublic class SchemaAdditionalPropertiesResource {\n\n    static class Pet {\n        public String foo;\n    }\n    @GET\n    @Path(\"/fromtResponseType\")\n    public Map<String, List<Pet>> fromtResponseType() {\n        return null;\n    }\n\n    @GET\n    @Path(\"/schemaNotImpl\")\n    @Operation(\n            operationId = \"schemaNotImpl\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\",\n                            content = @Content(\n                                    mediaType = \"application/json\",\n                                    schema = @Schema(\n                                            type = \"object\"\n                                    ),\n                                    additionalPropertiesSchema = @Schema(\n                                            ref = \"#/components/schemas/Pet\"\n                                    )\n                            )\n                    )\n            }\n    )\n    public Response schemaNotImpl() {\n        return null;\n    }\n\n    @GET\n    @Path(\"/schemaImpl\")\n    @Operation(\n            operationId = \"schemaImpl\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\",\n                            content = @Content(\n                                    mediaType = \"application/json\",\n                                    schema = @Schema(\n                                            type = \"object\",\n                                            additionalPropertiesSchema = Pet.class\n                                    )\n                            )\n                    )\n            }\n    )\n    public Response schemaImpl() {\n        return null;\n    }\n\n    @GET\n    @Path(\"/arraySchemaImpl\")\n    @Operation(\n            operationId = \"arraySchemaImpl\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\",\n                            content = @Content(\n                                    mediaType = \"application/json\",\n                                    additionalPropertiesArraySchema = @ArraySchema(\n                                            schema = @Schema(\n                                                        implementation = Pet.class\n                                                    )\n                                    ),\n                                    schema = @Schema(\n                                            type = \"object\"\n                                    )\n                            )\n                    )\n            }\n    )\n    public Response arraySchemaImpl() {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SchemaPropertiesResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.model.MultipleBaseBean;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.media.SchemaProperty;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\n\npublic class SchemaPropertiesResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(\n            summary = \"Simple get operation\",\n            description = \"Defines a simple get operation with no inputs and a complex output object\",\n            operationId = \"getWithPayloadResponse\",\n            deprecated = true,\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\",\n                            content = @Content(\n                                    mediaType = \"application/json\",\n                                    schemaProperties = {\n                                            @SchemaProperty(\n                                                    name = \"foo\",\n                                                    schema = @Schema(\n                                                            type = \"integer\",\n                                                            maximum = \"1\"\n                                                    )\n                                            )\n                                    }\n                            )\n                    ),\n                    @ApiResponse(\n                            description = \"boo\",\n                            content = @Content(\n                                    schema = @Schema(\n                                            type = \"object\",\n                                            description = \"various properties\",\n                                            maxProperties = 3\n                                    ),\n                                    mediaType = \"application/json\",\n                                    schemaProperties = {\n                                            @SchemaProperty(\n                                                    name = \"foo\",\n                                                    schema = @Schema(\n                                                            type = \"integer\",\n                                                            maximum = \"1\"\n                                                    )\n                                            )\n                                    }\n                            )\n                    ),\n                    @ApiResponse(\n                            responseCode = \"400\",\n                            description = \"additionalProperties schema\",\n                            content = @Content(\n                                    mediaType = \"application/json\",\n                                    schema = @Schema(\n                                            type = \"object\",\n                                            maxProperties = 2\n                                    ),\n                                    additionalPropertiesSchema = @Schema(\n                                            type = \"string\"\n                                    )\n                            )\n                    ),\n                    @ApiResponse(\n                            responseCode = \"401\",\n                            description = \"additionalProperties boolean\",\n                            content = @Content(\n                                    mediaType = \"application/json\",\n                                    schema = @Schema(\n                                            type = \"object\",\n                                            maxProperties = 2,\n                                            additionalProperties = Schema.AdditionalPropertiesValue.FALSE\n                                    )\n                            )\n                    )\n            }\n    )\n    public void getResponses() {\n    }\n\n    @GET\n    @Path(\"/one\")\n    @Produces({MediaType.APPLICATION_JSON})\n    public MultipleBaseBean requestBodySchemaPropertyNoSchema(\n            @RequestBody(\n                    content = @Content(\n                            mediaType = \"application/yaml\",\n                            schemaProperties = {\n                                    @SchemaProperty(\n                                            name = \"foo\",\n                                            schema = @Schema(\n                                                    type = \"string\"\n                                            )\n                                    )\n                            }\n                    )\n            ) Object body) {\n        return null;\n    }\n\n    @GET\n    @Path(\"/two\")\n    @Produces({MediaType.APPLICATION_JSON})\n    public MultipleBaseBean requestBodySchemaPropertySchema(\n            @RequestBody(\n                    content = @Content(\n                            mediaType = \"application/yaml\",\n                            schema = @Schema(\n                                    type = \"object\",\n                                    requiredProperties = {\n                                            \"foo\"\n                                    }\n                            ),\n                            schemaProperties= {\n                                    @SchemaProperty(\n                                            name = \"foo\",\n                                            schema = @Schema(\n                                                    type = \"string\"\n                                            )\n                                    )\n                            }\n                    )\n            ) Object body) {\n        return null;\n    }\n\n    @GET\n    @Path(\"/three\")\n    @Produces({MediaType.APPLICATION_JSON})\n    public MultipleBaseBean requestBodySchemaPropertySchemaArray(\n            @RequestBody(\n                    content = @Content(\n                            mediaType = \"application/yaml\",\n                            array = @ArraySchema(\n                                    schema = @Schema(\n                                            type = \"object\",\n                                            requiredProperties = {\n                                                    \"foo\"\n                                            }\n                                    )\n                            ),\n                            schemaProperties = {\n                                    @SchemaProperty(\n                                            name = \"foo\",\n                                            schema = @Schema(\n                                                    type = \"string\"\n                                            )\n                                    )\n                            }\n                    )\n            ) Object body) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SecurityResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeType;\nimport io.swagger.v3.oas.annotations.security.OAuthFlow;\nimport io.swagger.v3.oas.annotations.security.OAuthFlows;\nimport io.swagger.v3.oas.annotations.security.OAuthScope;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.security.SecurityScheme;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@SecurityScheme(name = \"myOauth2Security\",\n        type = SecuritySchemeType.OAUTH2,\n        in = SecuritySchemeIn.HEADER,\n        description = \"myOauthSecurity Description\",\n        flows = @OAuthFlows(implicit = @OAuthFlow(authorizationUrl = \"http://x.com\",\n                scopes = @OAuthScope(\n                        name = \"write:pets\",\n                        description = \"modify pets in your account\"))\n        )\n)\n@SecurityRequirement(name = \"security_key\",\n        scopes = {\"write:pets\", \"read:pets\"}\n)\n@SecurityRequirement(name = \"myOauth2Security\",\n        scopes = {\"write:pets\"}\n)\npublic class SecurityResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(operationId = \"Operation Id\",\n            description = \"description\")\n    @SecurityRequirement(name = \"security_key\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    )\n    public void getSecurity() {\n    }\n\n    @GET\n    @Path(\"/2\")\n    @Operation(operationId = \"Operation Id 2\",\n            description = \"description 2\")\n    @SecurityRequirement(name = \"security_key2\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    )\n    public void getSecurity2() {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ServersResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.servers.Server;\nimport io.swagger.v3.oas.annotations.servers.ServerVariable;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n@OpenAPIDefinition(\n    servers = {\n        @Server(\n            description = \"definition server 1\",\n            url = \"http://definition1\",\n            variables = {\n                @ServerVariable(name = \"var1\", description = \"var 1\", defaultValue = \"1\", allowableValues = {\"1\", \"2\"}),\n                @ServerVariable(name = \"var2\", description = \"var 2\", defaultValue = \"1\", allowableValues = {\"1\", \"2\"})\n            })\n    }\n)\n@Server(\n        description = \"class server 1\",\n        url = \"http://class1\",\n        variables = {\n                @ServerVariable(name = \"var1\", description = \"var 1\", defaultValue = \"1\", allowableValues = {\"1\", \"2\"}),\n                @ServerVariable(name = \"var2\", description = \"var 2\", defaultValue = \"1\", allowableValues = {\"1\", \"2\"})\n        })\n@Server(\n        description = \"class server 2\",\n        url = \"http://class2\",\n        variables = {\n                @ServerVariable(name = \"var1\", description = \"var 1\", defaultValue = \"1\", allowableValues = {\"1\", \"2\"})\n        })\npublic class ServersResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(servers = {\n            @Server(\n                    description = \"operation server 1\",\n                    url = \"http://op1\",\n                    variables = {\n                            @ServerVariable(name = \"var1\", description = \"var 1\", defaultValue = \"1\", allowableValues = {\"1\", \"2\"})\n                    })\n    })\n    @Server(\n            description = \"method server 1\",\n            url = \"http://method1\",\n            variables = {\n                    @ServerVariable(name = \"var1\", description = \"var 1\", defaultValue = \"1\", allowableValues = {\"1\", \"2\"})\n            })\n    @Server(\n            description = \"method server 2\",\n            url = \"http://method2\"\n    )\n\n    public Response getServers() {\n        return Response.ok().entity(\"ok\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SiblingPropResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.siblings.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\n\n@Path(\"/pet\")\n@Produces({\"application/json\", \"application/xml\"})\npublic class SiblingPropResource {\n  @PUT\n  @Operation(summary = \"Update an existing pet\",\n          tags = {\"pet\"},\n          security = {\n                @SecurityRequirement(name = \"petstore_auth\", scopes = {\"write:pets\", \"read:pets\"}),\n                @SecurityRequirement(name = \"mutual_tls\", scopes = {})\n          },\n          responses = {\n                  @ApiResponse(\n                          responseCode = \"200\",\n                          description = \"Successful operation\",\n                          useReturnTypeSchema = true,\n                          content = {\n                                  @Content(\n                                    mediaType = \"application/xml\",\n                                    schema = @Schema(\n                                            accessMode = Schema.AccessMode.READ_ONLY,\n                                            description = \"A Pet in XML Format\"\n                                    )\n                                  ),\n                                  @Content(\n                                          mediaType = \"application/json\",\n                                          schema = @Schema(\n                                                  accessMode = Schema.AccessMode.READ_ONLY,\n                                                  description = \"A Pet in JSON Format\"\n                                          )\n                                  )\n                          }\n                  ),\n                  @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                  @ApiResponse(responseCode = \"404\", description = \"Pet not found\"),\n                  @ApiResponse(responseCode = \"405\", description = \"Validation exception\") })\n  @Consumes({\"application/json\", \"application/xml\"})\n  public Pet updatePet(\n      @RequestBody(\n              description = \"Pet object that needs to be updated in the store\",\n              required = true,\n              useParameterTypeSchema = true,\n              content = {\n                      @Content(\n                              mediaType = \"application/json\",\n                              schema = @Schema(\n                                      accessMode = Schema.AccessMode.WRITE_ONLY,\n                                      description = \"A Pet in JSON Format\",\n                                      requiredProperties = {\"id\"}\n                              )\n                      ),\n                      @Content(\n                              mediaType = \"application/xml\",\n                              schema = @Schema(\n                                      accessMode = Schema.AccessMode.WRITE_ONLY,\n                                      description = \"A Pet in XML Format\",\n                                      requiredProperties = {\"id\"}\n                              )\n                      )\n              }\n      ) Pet pet) {\n    return null;\n  }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SiblingsResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.siblings.Pet;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\nimport java.util.List;\n\n@Path(\"/test\")\npublic class SiblingsResource {\n    @GET\n    @Schema(description = \"Cart Pet\")\n    public Pet getCart() {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SiblingsResourceRequestBody.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.siblings.PetSimple;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n@Path(\"/test\")\npublic class SiblingsResourceRequestBody {\n    @Path(\"/bodyimpl\")\n    @GET\n    @Operation(\n            requestBody =\n                    @RequestBody(\n                            description = \"aaa\",\n                            content = {\n                                    @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    description = \"resource pet\",\n                                                    implementation = PetSimple.class,\n                                                    accessMode = Schema.AccessMode.WRITE_ONLY))\n                            }))\n    public Response getBodyImpl(Object body) {\n        return null;\n    }\n\n    @Path(\"/bodyimplparam\")\n    @GET\n    public Response getBodyImplParam(@RequestBody(\n            content = {\n                    @Content(\n                            mediaType = \"*/*\",\n                            schema = @Schema(\n                                    description = \"resource pet\",\n                                    implementation = PetSimple.class,\n                                    accessMode = Schema.AccessMode.WRITE_ONLY))\n            }) Object body) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SiblingsResourceRequestBodyMultiple.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.siblings.PetSimple;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n@Path(\"/test\")\npublic class SiblingsResourceRequestBodyMultiple {\n    @Path(\"/bodyimpl\")\n    @GET\n    @Operation(\n            requestBody =\n                    @RequestBody(\n                            description = \"aaa\",\n                            content = {\n                                    @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    description = \"resource pet\",\n                                                    implementation = PetSimple.class,\n                                                    accessMode = Schema.AccessMode.WRITE_ONLY)),\n                                    @Content(\n                                            mediaType = \"application/xml\",\n                                            schema = @Schema(\n                                                    description = \"resource pet xml\",\n                                                    implementation = PetSimple.class,\n                                                    accessMode = Schema.AccessMode.WRITE_ONLY))\n                            }))\n    public Response getBodyImpl(Object body) {\n        return null;\n    }\n\n    @Path(\"/bodyimplparam\")\n    @GET\n    public Response getBodyImplParam(@RequestBody(\n            content = {\n                    @Content(\n                            mediaType = \"application/json\",\n                            schema = @Schema(\n                                    description = \"resource pet\",\n                                    implementation = PetSimple.class,\n                                    accessMode = Schema.AccessMode.WRITE_ONLY)),\n                    @Content(\n                            mediaType = \"application/xml\",\n                            schema = @Schema(\n                                    description = \"resource pet xml\",\n                                    implementation = PetSimple.class,\n                                    accessMode = Schema.AccessMode.WRITE_ONLY))\n            }) Object body) {\n        return null;\n    }\n\n    @Path(\"/bodyparam\")\n    @GET\n    public Response getBodyParam(\n            @RequestBody(\n                    description = \"test\",\n                    useParameterTypeSchema = true,\n                    content = {\n                            @Content(\n                                    mediaType = \"application/json\",\n                                    schema = @Schema(\n                                            description = \"resource pet\",\n                                            accessMode = Schema.AccessMode.WRITE_ONLY)),\n                            @Content(\n                                    mediaType = \"application/xml\",\n                                    schema = @Schema(\n                                            description = \"resource pet xml\",\n                                            accessMode = Schema.AccessMode.WRITE_ONLY))\n                    }\n            ) PetSimple pet) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SiblingsResourceResponse.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.siblings.PetSimple;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@Path(\"/test\")\npublic class SiblingsResourceResponse {\n    @GET\n    @Operation(\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"300\",\n                            description = \"aaa\",\n                            useReturnTypeSchema = true,\n                            content = {\n                                    @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    description = \"resource pet\",\n                                                    accessMode = Schema.AccessMode.READ_ONLY)),\n                                    @Content(\n                                            mediaType = \"application/xml\",\n                                            schema = @Schema(\n                                                    description = \"resource pet xml\",\n                                                    accessMode = Schema.AccessMode.READ_ONLY))\n                            })})\n    public PetSimple getCart() {\n        return null;\n    }\n\n    @Path(\"/impl\")\n    @GET\n    @Operation(\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"300\",\n                            description = \"aaa\",\n                            content = {\n                                    @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    description = \"resource pet\",\n                                                    implementation = PetSimple.class,\n                                                    accessMode = Schema.AccessMode.READ_ONLY)),\n                                    @Content(\n                                            mediaType = \"application/xml\",\n                                            schema = @Schema(\n                                                    description = \"resource pet xml\",\n                                                    implementation = PetSimple.class,\n                                                    accessMode = Schema.AccessMode.READ_ONLY))\n                            })})\n    public PetSimple getCartImpl() {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SiblingsResourceSimple.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.siblings.PetSimple;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@Path(\"/test\")\npublic class SiblingsResourceSimple {\n    @GET\n    @Operation(\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"300\",\n                            description = \"aaa\",\n                            useReturnTypeSchema = true,\n                            content = {\n                                    @Content(\n                                            mediaType = \"*/*\",\n                                            schema = @Schema(\n                                                    description = \"resource pet\",\n                                                    accessMode = Schema.AccessMode.READ_ONLY))\n                            })})\n    public PetSimple getCart() {\n        return null;\n    }\n\n    @Path(\"/impl\")\n    @GET\n    @Operation(\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"300\",\n                            description = \"aaa\",\n                            content = {\n                                    @Content(\n                                            mediaType = \"*/*\",\n                                            schema = @Schema(\n                                                    description = \"resource pet\",\n                                                    implementation = PetSimple.class,\n                                                    accessMode = Schema.AccessMode.READ_ONLY))\n                            })})\n    public PetSimple getCartImpl() {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SimpleCallbackResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.HeaderParam;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\npublic class SimpleCallbackResource {\n    @Path(\"/test\")\n    @POST\n    @Callback(\n            callbackUrlExpression = \"http://$request.query.url\",\n            name = \"subscription\",\n            operation = {\n                    @Operation(\n                            method = \"post\",\n                            description = \"payload data will be sent\",\n                            parameters = {\n                                    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true, schema = @Schema(\n                                            type = \"string\",\n                                            format = \"uuid\",\n                                            description = \"the generated UUID\",\n                                            accessMode = Schema.AccessMode.READ_ONLY\n                                    ))\n                            },\n                            responses = {\n                                    @ApiResponse(\n                                            responseCode = \"200\",\n                                            description = \"Return this code if the callback was received and processed successfully\"\n                                    ),\n                                    @ApiResponse(\n                                            responseCode = \"205\",\n                                            description = \"Return this code to unsubscribe from future data updates\"\n                                    ),\n                                    @ApiResponse(\n                                            responseCode = \"default\",\n                                            description = \"All other response codes will disable this callback subscription\"\n                                    )\n                            }),\n                    @Operation(\n                            method = \"get\",\n                            description = \"payload data will be received\"\n                    ),\n                    @Operation(\n                            method = \"put\",\n                            description = \"payload data will be sent\"\n                    )})\n    @Operation(description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n            \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\")\n    public SubscriptionResponse subscribe(@Schema(required = true, description = \"the authentication token \" +\n            \"provided after initially authenticating to the application\") @HeaderParam(\"x-auth-token\") String token,\n                                          @Schema(required = true, description = \"the URL to call with response \" +\n                                                  \"data\") @QueryParam(\"url\") String url) {\n        return null;\n    }\n\n    static class SubscriptionResponse {\n        private String subscriptionUuid;\n    }\n}\n\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SimpleExamplesResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.petstore.example.SubscriptionResponse;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\n/**\n * Examples Resource Scenario\n */\npublic class SimpleExamplesResource {\n    @Path(\"/example\")\n    @POST\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account\",\n            parameters = {\n                    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n                            schema = @Schema(name = \"Schema\", description = \"Schema\", example = \"Subscription example\"),\n                            style = ParameterStyle.SIMPLE, example = \"example\",\n                            examples = {\n                                    @ExampleObject(name = \"subscriptionId_1\", value = \"12345\",\n                                            summary = \"Subscription number 12345\", externalValue = \"Subscription external value 1\")\n                            })\n            })\n    public SubscriptionResponse subscribe(final int subscriptionId) {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SimpleMethods.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\npublic class SimpleMethods {\n\n    @GET\n    @Path(\"/object\")\n    public TestBean getTestBean() {\n        return new TestBean();\n    }\n\n    @GET\n    @Path(\"/int\")\n    public int getInt() {\n        return 0;\n    }\n\n    @GET\n    @Path(\"/intArray\")\n    public int[] getIntArray() {\n        return new int[]{0};\n    }\n\n    @GET\n    @Path(\"/string\")\n    public String[] getStringArray() {\n        return new String[]{};\n    }\n\n    @GET\n    @Path(\"/stringArray\")\n    public void getWithIntArrayInput(@QueryParam(\"ids\") int[] inputs) {\n    }\n\n    static class TestBean {\n        public String foo;\n        public TestChild testChild;\n    }\n\n    static class TestChild {\n        public String foo;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SimpleParameterResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\npublic class SimpleParameterResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(\n            summary = \"Simple get operation\",\n            description = \"Defines a simple get operation with a payload complex input object\",\n            operationId = \"sendPayload\",\n            deprecated = true\n    )\n    public void sendPayload(@Parameter(description = \"Id Description\",\n            required = true,\n            example = \"1\") @QueryParam(\"id\") final int id) {\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SimpleRequestBodyResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class SimpleRequestBodyResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(\n            summary = \"Simple get operation\",\n            description = \"Defines a simple get operation with a payload complex input object\",\n            operationId = \"sendPayload\",\n            deprecated = true,\n            requestBody = @RequestBody(description = \"Test RequestBody\")\n    )\n    public void sendPayload(final User user) {\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SimpleResourceWithVendorAnnotation.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.model.NotFoundModel;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.responses.ApiResponses;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.WebApplicationException;\nimport javax.ws.rs.core.Response;\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n@Path(\"/\")\n@Produces({ \"application/xml\" })\npublic class SimpleResourceWithVendorAnnotation {\n\n    @VendorFunnyAnnotation\n    @GET\n    @Path(\"/{id}\")\n    @ApiResponses({\n            @ApiResponse(\n                    responseCode = \"400\",\n                    description = \"Invalid ID\",\n                    content = @Content(\n                            mediaType = \"*/*\",\n                            schema = @Schema(implementation = NotFoundModel.class)\n                    )\n            ),\n            @ApiResponse(responseCode = \"404\", description = \"object not found\")\n    })\n    public Response getTest(\n            @PathParam(\"id\") final String id,\n            @QueryParam(\"limit\") final Integer limit) throws WebApplicationException {\n        return Response.ok().build();\n    }\n\n    @GET\n    @Path(\"/{id}/value\")\n    @Produces({ \"text/plain\" })\n    @ApiResponses({\n            @ApiResponse(\n                    responseCode = \"400\",\n                    description = \"Invalid ID\",\n                    content = @Content(\n                            mediaType = \"*/*\",\n                            schema = @Schema(implementation = NotFoundModel.class)\n                    )\n            ),\n            @ApiResponse(responseCode = \"404\", description = \"object not found\")\n    })\n    public Response getStringValue() throws WebApplicationException {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    /**\n     * Annotation processed by some vendor libraries. It could be used by swagger because the result of that processing\n     * could return with rest error response.\n     */\n    @Target(ElementType.METHOD)\n    @Retention(RetentionPolicy.RUNTIME)\n    public static @interface VendorFunnyAnnotation {\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SimpleResponsesResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class SimpleResponsesResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(\n            summary = \"Simple get operation\",\n            description = \"Defines a simple get operation with no inputs and a complex output object\",\n            operationId = \"getWithPayloadResponse\",\n            deprecated = true,\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\",\n                            content = @Content(\n                                    mediaType = \"application/json\",\n                                    schema = @Schema(implementation = SampleResponseSchema.class)\n                            )\n                    ),\n                    @ApiResponse(\n                            description = \"boo\",\n                            content = @Content(\n                                    mediaType = \"*/*\",\n                                    schema = @Schema(implementation = GenericError.class)\n                            )\n                    )\n            }\n    )\n\n    public void getResponses() {\n    }\n\n    static class SampleResponseSchema {\n        @Schema(description = \"the user id\")\n        private String id;\n    }\n\n    static class GenericError {\n        private int code;\n        private String message;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SimpleUserResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.data.UserData;\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.Response;\n\n@Path(\"/user\")\n@Produces({\"application/json\", \"application/xml\"})\n@Consumes({\"application/json\", \"application/xml\"})\npublic class SimpleUserResource {\n    static UserData userData = new UserData();\n\n    @POST\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response createUser(\n            @Parameter(description = \"Created user object\", required = true) User user) {\n        userData.addUser(user);\n        return Response.ok().entity(\"\").build();\n    }\n\n    @POST\n    @Path(\"/createUserWithReturnType\")\n    @Operation(summary = \"Create user with return type\",\n            description = \"This can only be done by the logged in user.\")\n    public User createUserWithReturnType(\n            @Parameter(description = \"Created user object\", required = true) User user) {\n        userData.addUser(user);\n        return null;\n    }\n\n    @POST\n    @Path(\"/createUserWithResponseAnnotation\")\n    @Operation(summary = \"Create user with response annotation\",\n            description = \"This can only be done by the logged in user.\")\n    @ApiResponse(description = \"aaa\", responseCode = \"200\", content = {@Content(schema = @Schema(implementation = User.class))})\n    public User createUserWithResponseAnnotation(\n            @Parameter(description = \"Created user object\", required = true) User user) {\n        userData.addUser(user);\n        return null;\n    }\n\n    @POST\n    @Path(\"/createUserWithReturnTypeAndResponseAnnotation\")\n    @Operation(summary = \"Create user with return type and response annotation\",\n            description = \"This can only be done by the logged in user.\")\n    @ApiResponse(description = \"aaa\", responseCode = \"200\")\n    public User createUserWithReturnTypeAndResponseAnnotation(\n            @Parameter(description = \"Created user object\", required = true) User user) {\n        userData.addUser(user);\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SingleExampleResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\npublic class SingleExampleResource {\n\n    @POST\n    @Path(\"/test1\")\n    public Response test1(\n            @RequestBody(\n                    content = @Content(\n                            mediaType = \"application/json\",\n                            examples = @ExampleObject(value = \"{\\\"foo\\\" : \\\"foo\\\", \\\"bar\\\" : \\\"bar\\\"}\")\n                    )\n            ) final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @POST\n    @Path(\"/test2\")\n    @Operation(requestBody = @RequestBody(\n            content = @Content(\n                    mediaType = \"application/json\",\n                    schema = @Schema(implementation = User.class),\n                    examples = @ExampleObject(value = \"{\\\"foo\\\" : \\\"foo\\\", \\\"bar\\\" : \\\"bar\\\"}\")\n            )\n    ))\n    public Response test2(final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SubResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\n\npublic class SubResource {\n    @GET\n    @Operation(description = \"gets an object by ID\",\n            tags = \"Employees\")\n    @ApiResponse(description = \"200\", responseCode = \"200\",\n            content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class))))\n    public void getAllEmployees() {\n        return;\n    }\n\n    @Operation(description = \"gets an object by ID\",\n            tags = \"Employees\")\n    @ApiResponse(description = \"200\", responseCode = \"200\",\n            content = @Content(schema = @Schema(implementation = Pet.class)))\n    @GET\n    @Path(\"{id}\")\n    public Pet getSubresourceOperation(@PathParam(\"id\") Long userId) {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SubResourceHead.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport javax.ws.rs.Path;\n\n@Path(\"/head\")\npublic class SubResourceHead {\n\n    /**\n     * This path is expected to be collected\n     *\n     * @return class instance of sub-resource\n     */\n    @Path(\"tail\")\n    public Class<SubResourceTail> getTail() {\n        return SubResourceTail.class;\n    }\n\n    /**\n     * This path is expected to be collected\n     *\n     * @return class instance of sub-resource\n     */\n    @Path(\"noPath\")\n    public Class<NoPathSubResource> getNoPath() {\n        return NoPathSubResource.class;\n    }\n\n    /**\n     * This path is expected to be skipped as {@link String} doesn't process\n     * any requests.\n     *\n     * @return string class\n     */\n    @Path(\"stringClass\")\n    public Class<String> getStringClass() {\n        return String.class;\n    }\n\n    /**\n     * This path is expected to be skipped as resource class is unknown here.\n     *\n     * @return {@code null}\n     */\n    @Path(\"anyClass\")\n    public <T> Class<T> getAnyClass() {\n        return null;\n    }\n\n    /**\n     * This path is expected to be skipped as resource class is unknown here.\n     *\n     * @return {@code null}\n     */\n    @Path(\"wildcardClass\")\n    public Class<?> getWildcardClass() {\n        return null;\n    }\n\n    /**\n     * This path is expected to be skipped as method result is an array.\n     *\n     * @return {@code null}\n     */\n    @Path(\"classes\")\n    public Class<?>[] getClasses() {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SubResourceTail.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\n\npublic class SubResourceTail {\n\n    @Operation(description = \"Returns greeting\")\n    @GET\n    @Path(\"/hello\")\n    public String getGreeting() {\n        return \"Hello!\";\n    }\n\n    @Operation(description = \"Echoes passed string\")\n    @GET\n    @Path(\"{string}\")\n    public String getEcho(@PathParam(\"string\") String string) {\n        return string;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/TagsResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n@OpenAPIDefinition(tags = {\n        @Tag(name = \"Definition First Tag\"),\n        @Tag(name = \"Definition Second Tag full\", description = \"desc definition\")\n})\n@Tag(name = \"Second Tag\")\n@Tag(name = \"Fourth Tag Full\", description = \"desc class\", externalDocs = @ExternalDocumentation(description = \"docs desc class\"))\n@Tag(name = \"Fifth Tag Full\", description = \"desc class\", externalDocs = @ExternalDocumentation(description = \"docs desc class\"))\n@Tag(name = \"Sixth Tag\")\npublic class TagsResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(tags = {\"Example Tag\", \"Second Tag\"})\n    @Tag(name = \"Third Tag\")\n    @Tag(name = \"Second Tag\")\n    @Tag(name = \"Fourth Tag Full\", description = \"desc\", externalDocs = @ExternalDocumentation(description = \"docs desc\"))\n    public Response getTags() {\n        return Response.ok().entity(\"ok\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Test2607.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.info.Info;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\n\n@OpenAPIDefinition(info =\n@Info( title = \"TEST\", version = \"0.0\", description = \"Test API\" ) )\n@Path(\"/swaggertest/\")\npublic class Test2607 {\n\n    @GET\n    @Path(\"name\")\n    @Produces(MediaType.TEXT_PLAIN)\n    public String getName() {\n        return \"SwaggerTest\";\n    }\n\n    @Path(\"subresource\")\n    @Operation\n    public TestSub2607 getSubResource() {\n        return new TestSub2607();\n    }\n\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/TestResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.MediaType;\n\n@Path(\"test\")\n@Produces(MediaType.APPLICATION_JSON)\npublic class TestResource {\n    @Path(\"/status\")\n    @GET\n    @Operation(description = \"Get status\")\n    public String getStatus() {\n        return \"{\\\"status\\\":\\\"OK!\\\"}\";\n    }\n\n    @Path(\"/more\")\n    @Operation(description = \"Get more\")\n    @Produces({MediaType.APPLICATION_XML})\n    public TestSubResource getSubResource(\n            @QueryParam(\"qp\") Integer qp) {\n        return new TestSubResource();\n    }\n\n    @Path(\"/evenmore\")\n    @Operation(description = \"Get even more\")\n    @Produces({MediaType.APPLICATION_XML})\n    @Consumes(MediaType.APPLICATION_JSON)\n    public TestSubResource getEvenMoreSubResource(Pet pet) {\n        return new TestSubResource();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/TestSub2607.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\n\n@Produces(MediaType.APPLICATION_JSON)\npublic class TestSub2607 {\n    @GET\n    @Path(\"version\")\n    @Produces(MediaType.TEXT_PLAIN)\n    public String getSubResourceVersion() {\n        return \"1.0.0\";\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/TestSubResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\n\n@Produces(MediaType.APPLICATION_JSON)\npublic class TestSubResource {\n    @Path(\"/otherStatus\")\n    @GET\n    @Operation(description = \"Get the other status!\")\n    public String otherStatus() {\n        return \"{\\\"a\\\":\\\"Still Ok!\\\"}\";\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket2340Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport com.fasterxml.jackson.annotation.JsonSubTypes;\nimport com.fasterxml.jackson.annotation.JsonTypeInfo;\nimport com.fasterxml.jackson.annotation.JsonTypeName;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\n\n@Path(\"/test\")\npublic class Ticket2340Resource {\n\n    @Produces({ MediaType.APPLICATION_JSON })\n    @Consumes({ MediaType.APPLICATION_JSON })\n    @Path(\"/test\")\n    @POST\n    public String getAnimal(Animal animal) {\n        return \"ok\";\n    }\n\n\n    @JsonTypeInfo(\n            use = JsonTypeInfo.Id.NAME,\n            include = JsonTypeInfo.As.PROPERTY,\n            property = \"type\")//, visible = true)\n    @JsonSubTypes({\n            @JsonSubTypes.Type(value = Dog.class, name = \"dog\"),\n            @JsonSubTypes.Type(value = Cat.class, name = \"cat\")\n    })\n    public static class Animal {\n    }\n\n    @JsonTypeName(\"dog\")\n    public static class Dog extends Animal {\n        public double barkVolume;\n    }\n\n    @JsonTypeName(\"cat\")\n    public static class Cat extends Animal {\n        boolean likesCream;\n        public int lives;\n    }\n\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket2644AnnotatedInterface.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n@Path(\"resources\")\n@Tag(name = \"resource\")\npublic interface Ticket2644AnnotatedInterface {\n    @GET\n    Response getResource();\n}\n\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket2644ConcreteImplementation.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport javax.ws.rs.core.Response;\n\npublic class Ticket2644ConcreteImplementation implements Ticket2644AnnotatedInterface {\n    public Response getResource() {\n        // Get the resource\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket2763Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.MediaType;\n\npublic class Ticket2763Resource {\n\n    @GET\n    @Path(\"/array\")\n    @ApiResponse(content = @Content(\n            mediaType = MediaType.APPLICATION_JSON,\n            array = @ArraySchema(schema = @Schema(\n                    ref=\"https://openebench.bsc.es/monitor/tool/tool.json\"))))\n    public void getArrayResponses() {\n    }\n\n    @GET\n    @Path(\"/schema\")\n    @ApiResponse(content = @Content(\n            mediaType = MediaType.APPLICATION_JSON,\n            schema = @Schema(ref=\"https://openebench.bsc.es/monitor/tool/tool.json\")))\n    public void getSchemaResponses() {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket2793Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport io.swagger.v3.oas.annotations.responses.ApiResponses;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\nimport java.util.Map;\nimport java.util.UUID;\n\n@OpenAPIDefinition\n@Path(\"distances\")\npublic interface Ticket2793Resource {\n    @GET\n    @Produces(MediaType.APPLICATION_JSON)\n    @ApiResponses({\n            @ApiResponse(responseCode = \"200\", content = @Content(schema = @Schema(implementation = DistancesResponse.class)))\n    })\n    Response getDistances();\n\n    abstract class DistancesResponse implements Map<UUID, Map<RouteMetric, Integer>> { }\n\n    public static class RouteMetric {\n        public String foo;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket2794Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.validation.constraints.NotNull;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\nimport java.util.Arrays;\n\n@Path(\"/notnullparameter\")\npublic class Ticket2794Resource\n{\n    @Produces({ MediaType.APPLICATION_JSON })\n    @GET\n    public Response getBooks(\n            @QueryParam(\"page\") @NotNull int page) {\n        return Response.ok(\n                Arrays.asList(\n                        new Book(),\n                        new Book()\n                )\n        ).build();\n    }\n\n    @Path(\"/new_reqBody_required\")\n    @POST\n    public Response insert(@RequestBody(required = true) Book book) {\n        return Response.ok().build();\n    }\n\n    @Path(\"/newnotnull\")\n    @POST\n    public Response insertnotnull(@NotNull Book book) {\n        return Response.ok().build();\n    }\n\n    public static class Book {\n        public String foo;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket2806Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class Ticket2806Resource {\n\n    @GET\n    @Path(\"/test\")\n    public Test getTest() {\n        return null;\n    }\n\n    class Test {\n        private String[] stringArray;\n\n        @ArraySchema(\n                minItems = 2,\n                maxItems = 4,\n                uniqueItems = true,\n                arraySchema = @Schema(\n                        description = \"Array desc\",\n                        example = \"[\\\"aaa\\\", \\\"bbb\\\"]\"\n                ),\n                schema = @Schema(\n                        description = \"Hello, World!\",\n                        example = \"Lorem ipsum dolor set\"\n                )\n        )\n        public void setStringArray(String[] value) { stringArray = value; }\n        public String[] getStringArray() { return stringArray; }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket2818Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\n\n@Path(\"/bookstore\")\npublic class Ticket2818Resource {\n\n    @Produces({ MediaType.APPLICATION_JSON })\n    @Path(\"/{id}\")\n    @GET\n    public Book getBook(\n            @Parameter(\n                    in = ParameterIn.PATH,\n                    schema = @Schema (\n                            type = \"integer\",\n                            format = \"int32\"\n                    )\n            )\n            @PathParam(\"id\") int id) {\n        return new Book();\n    }\n\n\n    public static class Book {\n        public String foo;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket2848Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport java.util.List;\n\n@Path(\"/\")\npublic class Ticket2848Resource {\n    @GET\n    public Town getter() {\n        return null;\n    }\n\n    public static class Town {\n        @ArraySchema( schema = @Schema(required = true), minItems = 1,uniqueItems = true )\n        public List<String> streets;\n    }\n\n\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket3015Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport java.net.URI;\n\n@Path(\"test\")\npublic class Ticket3015Resource {\n\n    @Operation(responses = {\n            @ApiResponse(responseCode = \"200\", description = \"OK\", content = @Content(schema = @Schema(implementation = URI.class))),\n            @ApiResponse(responseCode = \"400\", description = \"Bad Request\"),\n            @ApiResponse(responseCode = \"500\", description = \"Internal Server Error\")\n    })\n    @GET\n    @Path(\"/test\")\n    public void schemaImpl() {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket3587Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@Path(\"test\")\npublic class Ticket3587Resource {\n\n    @GET\n    @Path(\"/test\")\n    public void parameterExamplesOrderingTest(\n        @Parameter(\n            in = ParameterIn.QUERY,\n            examples = {\n                @ExampleObject(\n                    name = \"Example One\"\n                ),\n                @ExampleObject(\n                    name = \"Example Two\"\n                ),\n                @ExampleObject(\n                    name = \"Example Three\"\n                )\n            }\n        )\n            String parameterWithOrderedExamples,\n        @Parameter(\n            in = ParameterIn.QUERY,\n            examples = {\n                @ExampleObject(\n                    name = \"Example Three\"\n                ),\n                @ExampleObject(\n                    name = \"Example Two\"\n                ),\n                @ExampleObject(\n                    name = \"Example One\"\n                )\n            }\n        )\n            String parameterWithExamplesInDifferentOrder) { }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket3731BisResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.validation.constraints.Max;\nimport javax.validation.constraints.Min;\nimport javax.ws.rs.DefaultValue;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport java.util.List;\n\n@Path(\"/test\")\npublic class Ticket3731BisResource {\n    @GET\n    @Path(\"/cart\")\n    @Operation(\n            summary = \"Get cart items\",\n            description = \"Paging follows RFC 5005.\")\n    public List<String> getCart(\n            @QueryParam(\"pageSize\")\n            @DefaultValue(\"50\")\n            @Parameter(description = \"Number of items per page. Range[1, 200]\") //\n            @Min(2)\n            @Max(202)\n            @Schema(minimum = \"1\", maximum = \"200\")\n            final int pageSize) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket3731Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.validation.constraints.Max;\nimport javax.validation.constraints.Min;\nimport javax.ws.rs.DefaultValue;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport java.util.List;\n\n@Path(\"/test\")\npublic class Ticket3731Resource {\n    @GET\n    @Path(\"/cart\")\n    @Operation(\n            summary = \"Get cart items\",\n            description = \"Paging follows RFC 5005.\")\n    public List<String> getCart(\n            @QueryParam(\"pageSize\")\n            @DefaultValue(\"50\")\n            @Min(1) @Max(200)\n            @Parameter(description = \"Number of items per page. Range[1, 200]\") //\n            final int pageSize) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4065Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\n\n@Path(\"/bar\")\npublic class Ticket4065Resource {\n    @GET\n    @Path(\"\")\n    @Produces({\"application/json\"})\n    public void test(\n            @Parameter(in = ParameterIn.QUERY, name = \"blub\", explode = Explode.FALSE) Long[] ids\n    ) {}\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4341Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport javax.validation.constraints.NotNull;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport java.util.List;\n\npublic class Ticket4341Resource {\n\n    @GET\n    @Path(\"/user\")\n    public User getUsers() {\n        return null;\n    }\n\n    static class User {\n        @ArraySchema(\n                arraySchema = @Schema(requiredMode = Schema.RequiredMode.REQUIRED),\n                schema = @Schema(type = \"string\")\n        )\n        public List<String> requiredArray;\n\n        @ArraySchema(\n                arraySchema = @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED),\n                schema = @Schema(type = \"string\")\n        )\n        public List<String> notRequiredArray;\n\n        @ArraySchema(\n                arraySchema = @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED),\n                schema = @Schema(type = \"string\")\n        )\n        @NotNull\n        public List<String> notRequiredArrayWithNotNull;\n\n        @ArraySchema(\n                arraySchema = @Schema(requiredMode = Schema.RequiredMode.AUTO),\n                schema = @Schema(type = \"string\")\n        )\n        @NotNull\n        public List<String> autoRequiredWithNotNull;\n\n        @ArraySchema(\n                arraySchema = @Schema(requiredMode = Schema.RequiredMode.AUTO),\n                schema = @Schema(type = \"string\")\n        )\n        public List<String> autoNotRequired;\n\n        @ArraySchema(\n                arraySchema = @Schema(requiredMode = Schema.RequiredMode.REQUIRED)\n        )\n        public List<String> requiredArrayArraySchemaOnly;\n\n        @ArraySchema(\n                schema = @Schema(type = \"string\", requiredMode = Schema.RequiredMode.REQUIRED)\n        )\n        public List<String> requiredItemsOnlyArray;\n\n        @ArraySchema(\n                arraySchema = @Schema(\n                        description = \"array-level description\",\n                        deprecated = true,\n                        accessMode = Schema.AccessMode.READ_ONLY\n                ),\n                schema = @Schema(\n                        description = \"item-level description\",\n                        deprecated = false,\n                        accessMode = Schema.AccessMode.WRITE_ONLY,\n                        format = \"email\"\n                )\n        )\n        public List<String> metadataArray;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4412Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\nimport java.util.List;\n\n@Path(\"/test\")\npublic class Ticket4412Resource {\n    @Path(\"/sws/{var:.*}\")\n    @GET\n    @Produces(MediaType.TEXT_XML)\n    public List<String> getCart(@PathParam(\"var\") String var) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4446Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport java.util.List;\n\n@Path(\"/test\")\npublic class Ticket4446Resource {\n    @Path(\"test\")\n    @GET\n    public MyPojo getCart() {\n        return null;\n    }\n\n    public static class MyPojo {\n        public List<String> someStrings;\n        public List<MyPojo> morePojos;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4483Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.responses.ApiResponses;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\nimport java.util.Map;\n\n/*\n\n */\n@Tag(\n        name = \"Dummy\",\n        description = \"Dummy resource for testing setup\"\n)\n@Path(\"test\")\n@Consumes({MediaType.APPLICATION_JSON})\n@Produces({MediaType.APPLICATION_JSON})\n@ApiResponses({\n        @ApiResponse(responseCode = \"401\", description = \"Authentication is required\", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Ticket4483Resource.LocalizedError.class))))\n})\npublic class Ticket4483Resource {\n    @GET\n    @Operation(\n            description = \"Dummy GET\"\n    )\n    @ApiResponse(responseCode = \"200\", description = \"test\", useReturnTypeSchema = true)\n    public Map<String, Boolean> dummy() {\n        Map map = new java.util.HashMap();\n        map.put(\"success\", Boolean.TRUE);\n        return map;\n    }\n\n\n\n    @Path(\"/opresp\")\n    @GET\n    @Operation(\n            responses = {\n                    @ApiResponse(responseCode = \"200\", description = \"Dummy GET opresp\", useReturnTypeSchema = true)})\n    public Map<String, Boolean> dummyopresp() {\n        Map map = new java.util.HashMap();\n        map.put(\"success\", Boolean.TRUE);\n        return map;\n    }\n\n    @Path(\"/oprespnodesc\")\n    @GET\n    @Operation(\n            responses = {\n                    @ApiResponse(responseCode = \"200\", useReturnTypeSchema = true)})\n    public Map<String, Boolean> oprespnodesc() {\n        Map map = new java.util.HashMap();\n        map.put(\"success\", Boolean.TRUE);\n        return map;\n    }\n\n    public static class LocalizedError {\n        public String code;\n        public String message;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4804CustomClass.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport javax.validation.constraints.DecimalMin;\nimport javax.validation.constraints.Min;\nimport javax.validation.constraints.NotEmpty;\nimport javax.validation.constraints.NotNull;\nimport javax.validation.constraints.Pattern;\nimport java.math.BigDecimal;\n\npublic class Ticket4804CustomClass {\n\n    public static interface ValidationGroup {\n\n    }\n\n    public static interface OtherValidationGroup {\n\n    }\n\n    @NotNull\n    public String nonGroupValidatedField;\n\n    @Min(value = 1, groups = ValidationGroup.class)\n    public Integer singleGroupValidatedField;\n\n    @DecimalMin(value = \"1.0\", groups = {ValidationGroup.class, OtherValidationGroup.class})\n    public BigDecimal multipleGroupValidatedField;\n\n    @Pattern(regexp = \".*\", groups = OtherValidationGroup.class)\n    public String otherGroupValidatedField;\n\n    @NotEmpty(groups = ValidationGroup.class)\n    public String singleGroupValidatedField2;\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4804NotBlankResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.parameters.ValidatedParameter;\n\nimport javax.validation.Valid;\nimport javax.validation.constraints.NotBlank;\nimport javax.validation.constraints.NotEmpty;\nimport javax.validation.constraints.NotNull;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\n\n@Path(\"/test\")\npublic class Ticket4804NotBlankResource {\n\n    @POST\n    @Path(\"/createcart\")\n    public void postCart(@Valid @ValidatedParameter(onCreate.class) Cart cart) {}\n\n    @PUT\n    @Path(\"/updatecart\")\n    public void putCart(@Valid @ValidatedParameter(onUpdate.class) Cart cart) {}\n    \n    @PUT\n    @Path(\"/barcart\")\n    public void barCart(Cart cart) {}\n\n    public static interface onCreate {}\n    public static interface onUpdate {}\n\n    public static class CartDetails {\n        @NotBlank(groups = {onCreate.class, onUpdate.class})\n        public String name;\n\n        @NotEmpty\n        public String[] description;\n    }\n\n\n    public static class Cart {\n        @NotBlank(groups = {onCreate.class, onUpdate.class})\n        public int[] pageSizes;\n\n        @NotNull\n        public CartDetails notNullcartDetails;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4804ProcessorResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.core.util.ValidatorProcessor;\nimport io.swagger.v3.oas.annotations.parameters.ValidatedParameter;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport javax.validation.Valid;\nimport javax.validation.constraints.NotNull;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport java.lang.annotation.Annotation;\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.util.Set;\n\n@Path(\"/test\")\npublic class Ticket4804ProcessorResource {\n\n    @Target({ElementType.PARAMETER})\n    @Retention(RetentionPolicy.RUNTIME)\n    static @interface MyValidatorInterface {\n        Class[] groups() default {};\n    }\n\n\n    public static class CustomValidatorProcessor implements ValidatorProcessor {\n\n        @Override\n        public boolean applyBeanValidatorAnnotations(Schema property, Annotation[] annotations, Schema parent, boolean applyNotNullAnnotations) {\n            if (annotations == null || annotations.length < 1) {\n                return false;\n            }\n            Map<String, Annotation> annos = new HashMap<>();\n            if (annotations != null) {\n                for (Annotation anno : annotations) {\n                    annos.put(anno.annotationType().getName(), anno);\n                }\n            }\n            if (annos.containsKey(MyValidatorInterface.class.getName()) && annos.containsKey(NotNull.class.getName())) {\n                MyValidatorInterface myValid = (MyValidatorInterface) annos.get(MyValidatorInterface.class.getName());\n                NotNull notNull = (NotNull) annos.get(NotNull.class.getName());\n                for (Class group : notNull.groups()) {\n                    if (Arrays.stream(myValid.groups()).anyMatch(t -> t.equals(group))) {\n                        parent.addRequiredItem(property.getName());\n                        return true;\n                    }\n                }\n            }\n            return false;\n        }\n\n        @Override\n        public Set<Class> resolveInvocationGroups(Map<String, Annotation> annos) {\n            if (annos.containsKey(MyValidatorInterface.class.getName())) {\n                MyValidatorInterface myValid = (MyValidatorInterface) annos.get(MyValidatorInterface.class.getName());\n                return new HashSet<>(Arrays.asList(myValid.groups()));\n            }\n            return null;\n        }\n\n        @Override\n        public Set<Annotation> resolveInvocationAnnotations(Annotation[] annotations) {\n            for (Annotation annotation : annotations) {\n                if (annotation.annotationType().equals(MyValidatorInterface.class)) {\n                    return Collections.singleton(annotation);\n                }\n            }\n            return null;\n        }\n    }\n\n    @PUT\n    @Path(\"/updatecart\")\n    public void putCart(@Valid @MyValidatorInterface(groups = {onFoo.class}) @ValidatedParameter(onUpdate.class) Cart cart) {}\n\n    @POST\n    @Path(\"/createcart\")\n    public void postCart(@Valid @ValidatedParameter(onCreate.class) Cart cart) {}\n\n    @PUT\n    @Path(\"/foocart\")\n    public void fooCart(@Valid @ValidatedParameter(onFoo.class) Cart cart) {}\n\n    @PUT\n    @Path(\"/barcart\")\n    public void barCart(Cart cart) {}\n\n    public static interface onCreate {}\n    public static interface onUpdate {}\n    public static interface onFoo {}\n\n    public static class CartDetails {\n        @NotNull(groups = {onCreate.class})\n        public String name;\n\n        @NotNull\n        public String description;\n    }\n\n\n    public static class Cart {\n        @NotNull(groups = {onCreate.class})\n        public int pageSize;\n        @NotNull(groups = {onFoo.class})\n        public CartDetails cartDetails;\n\n        @NotNull\n        public CartDetails notNullcartDetails;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4804Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.parameters.ValidatedParameter;\n\nimport javax.validation.Valid;\nimport javax.validation.constraints.NotNull;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\n\n@Path(\"/test\")\npublic class Ticket4804Resource {\n\n    @POST\n    @Path(\"/createcart\")\n    public void postCart(@Valid @ValidatedParameter(onCreate.class) Cart cart) {}\n\n    @PUT\n    @Path(\"/updatecart\")\n    public void putCart(@Valid @ValidatedParameter(onUpdate.class) Cart cart) {}\n\n    @PUT\n    @Path(\"/foocart\")\n    public void fooCart(@Valid @ValidatedParameter(onFoo.class) Cart cart) {}\n\n    @PUT\n    @Path(\"/barcart\")\n    public void barCart(Cart cart) {}\n\n    public static interface onCreate {}\n    public static interface onUpdate {}\n    public static interface onFoo {}\n\n    public static class CartDetails {\n        @NotNull(groups = {onCreate.class})\n        public String name;\n\n        @NotNull\n        public String description;\n    }\n\n\n    public static class Cart {\n        @NotNull(groups = {onCreate.class})\n        public int pageSize;\n        @NotNull(groups = {onFoo.class})\n        public CartDetails cartDetails;\n\n        @NotNull\n        public CartDetails notNullcartDetails;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4850Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.extensions.ExtensionProperty;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@Path(\"/bar\")\npublic class Ticket4850Resource {\n    @GET\n    @Path(\"\")\n    public ExtensionsResource test(\n\n    ) {return new ExtensionsResource();}\n\n    @Schema(\n            description = \"ExtensionsResource\",\n            extensions = {\n                    @Extension(name = \"x-user\", properties = {\n                            @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                    @Extension(name = \"user-extensions\", properties = {\n                            @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                            @ExtensionProperty(name = \"address\", value = \"House\")})\n            }\n    )\n    private class ExtensionsResource {\n        public ExtensionsResource() {}\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4859Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\n\n@Path(\"/test\")\npublic class Ticket4859Resource {\n\n    @PUT\n    @Path(\"/minlength\")\n    public void minlength(Minlength minlength) {}\n\n    public static class Minlength {\n        @Schema(example = \"4242424242424242\", minLength = 12, maxLength = 19, required = true)\n        public String name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4878Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\n\n@Path(\"{globalPathParam}\")\npublic class Ticket4878Resource {\n\n    public Ticket4878Resource(@PathParam(\"globalPathParam\") @Schema($comment=\"3.1 property for global path param\") String globalPathParam) {}\n\n    @GET\n    @Path(\"{localPathParam}\")\n    public void getMethod(@PathParam(\"localPathParam\") @Schema($comment=\"3.1 property for local path param\") String localPathParam) {}\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4879Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.validation.constraints.Size;\nimport javax.ws.rs.DefaultValue;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport java.util.List;\n\n@Path(\"/test\")\npublic class Ticket4879Resource {\n\n    @PUT\n    @Path(\"/test\")\n    public void test(DefaultClass defaultClass) {}\n\n    @GET\n    @Path(\"/testDefaultValueAnnotation\")\n    public void testDefault(\n            @DefaultValue(value = \"true\") @QueryParam(value = \"myBool\") Boolean myBool,\n            @DefaultValue(value = \"1\") @QueryParam(value = \"myInt\") Integer myInt) {\n    }\n\n    @GET\n    @Path(\"/testsize\")\n    public void testSize(@Size(min = 1, max = 100) List<String> myList) {}\n\n    public static class DefaultClass {\n        @Schema(defaultValue = \"true\")\n        public Boolean name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket5017Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport java.util.Map;\n\n@Path(\"/test\")\npublic class Ticket5017Resource {\n    @GET\n    public void myMethod(Example request) {}\n\n    public static class Example {\n        @Schema(propertyNames = MyEnum.class)\n        private Map<MyEnum, String> myMap;\n\n        public Map<MyEnum, String> getMyMap() {\n            return myMap;\n        }\n\n        public void setMyMap(Map<MyEnum, String> myMap) {\n            this.myMap = myMap;\n        }\n    }\n\n    public enum MyEnum {\n        FOO, BAR\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/UploadRequest.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\r\n\r\nimport io.swagger.v3.oas.annotations.Hidden;\r\nimport io.swagger.v3.oas.annotations.media.Schema;\r\nimport org.glassfish.jersey.media.multipart.FormDataContentDisposition;\r\nimport org.glassfish.jersey.media.multipart.FormDataParam;\r\n\r\nimport java.io.InputStream;\r\n\r\n@Schema(name = \"UploadRequest\", title=\"Schema for Upload\")\r\npublic class UploadRequest {\r\n\r\n\t@Hidden\r\n\t@FormDataParam(\"picture\")\r\n\tprivate FormDataContentDisposition disposition;\r\n\r\n\tpublic FormDataContentDisposition getDisposition() {\r\n\t\treturn disposition;\r\n\t}\r\n\tpublic void setDisposition(FormDataContentDisposition disposition) {\r\n\t\tthis.disposition = disposition;\r\n\t}\r\n\r\n\r\n\t@FormDataParam(\"name\")\r\n\tprivate String name;\r\n\r\n\tpublic String getName() {\r\n\t\treturn name;\r\n\t}\r\n\tpublic void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}\r\n\r\n\r\n\t@Schema(name=\"picture\", type=\"string\", format=\"binary\")\r\n\t@FormDataParam(\"picture\")\r\n\tprivate InputStream upload;\r\n\r\n\r\n\tpublic InputStream getUpload() {\r\n\t\treturn upload;\r\n\t}\r\n\tpublic void setUpload(InputStream upload) {\r\n\t\tthis.upload = upload;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic String toString() {\r\n\t\tfinal String NL = System.lineSeparator();\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tsb.append(super.toString());\r\n\t\tsb.append(\"name: \").append(name).append(NL);\r\n\t\treturn sb.toString();\r\n\t}\r\n\r\n}\r\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/UploadResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\r\n\r\nimport io.swagger.v3.oas.annotations.media.Content;\r\nimport io.swagger.v3.oas.annotations.media.Schema;\r\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\r\n\r\nimport javax.ws.rs.BeanParam;\r\nimport javax.ws.rs.Consumes;\r\nimport javax.ws.rs.POST;\r\nimport javax.ws.rs.Path;\r\nimport javax.ws.rs.Produces;\r\nimport javax.ws.rs.core.MediaType;\r\nimport javax.ws.rs.core.Response;\r\n\r\n\r\n@Path(\"/upload\")\r\npublic class UploadResource {\r\n\r\n\t@POST\r\n\t@Consumes(MediaType.MULTIPART_FORM_DATA)\r\n\t@Produces(MediaType.APPLICATION_JSON)\r\n\tpublic Response uploadWithBean(@BeanParam UploadRequest personData) {\r\n\t\treturn Response.ok().build();\r\n\t}\r\n\r\n\t@Path(\"/requestbody\")\r\n\t@POST\r\n\t@Consumes(MediaType.MULTIPART_FORM_DATA)\r\n\t@Produces(MediaType.APPLICATION_JSON)\r\n\t@RequestBody(content = @Content(schema = @Schema(implementation = UploadRequest.class)))\r\n\tpublic Response uploadWithBeanAndRequestBody(@BeanParam UploadRequest personData) {\r\n\t\treturn Response.ok().build();\r\n\t}\r\n}\r\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/UrlEncodedResourceWithEncodings.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\n\nimport javax.ws.rs.BeanParam;\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.FormParam;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\nimport java.util.List;\n\nimport static io.swagger.v3.oas.annotations.enums.Explode.FALSE;\nimport static io.swagger.v3.oas.annotations.enums.Explode.TRUE;\n\n@Path(\"/things\")\n@Produces(\"application/json\")\npublic class UrlEncodedResourceWithEncodings {\n\n    @POST\n    @Path(\"/search\")\n    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n    public Response searchForThings( @BeanParam CompositeFormBody body ) {\n        return Response.status(200).entity(\"Searching for something\").build();\n    }\n\n    @POST\n    @Path(\"/sriracha\")\n    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n    public Response srirachaThing(\n            @Parameter(name = \"id\", style = ParameterStyle.FORM, explode = TRUE, description = \"id param\") @FormParam( \"id\" ) List<String> ids,\n            @Parameter(name = \"name\", style = ParameterStyle.FORM, explode = FALSE) @FormParam( \"name\" ) List<String> names) {\n        return Response.status(200).entity(\"Sriracha!\").build();\n    }\n\n    public static class CompositeFormBody {\n        @Parameter(name = \"id\", style = ParameterStyle.FORM, explode = TRUE, description = \"id param\")\n        @FormParam(\"id\")\n        public List<String> ids;\n\n        @Parameter(name = \"name\", style = ParameterStyle.FORM, explode = FALSE)\n        @FormParam(\"name\")\n        public List<String> names;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/UserAnnotation.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n\n@Retention(RetentionPolicy.RUNTIME)\n@Operation(tags = {\"test\"})\npublic @interface UserAnnotation {\n    /**\n     * The identifying name of the contact person/organization.\n     *\n     * @return the name of the contact\n     **/\n    String name() default \"\";\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/UserAnnotationResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport javax.validation.constraints.NotNull;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\n\n@Path(\"test\")\n@Produces(MediaType.APPLICATION_JSON)\npublic class UserAnnotationResource {\n    @Path(\"/status\")\n    @GET\n    @UserAnnotation(name = \"test\")\n    @NotNull\n    public String getStatus() {\n        return \"{\\\"status\\\":\\\"OK!\\\"}\";\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/UserResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.data.UserData;\nimport io.swagger.v3.jaxrs2.resources.exception.ApiException;\nimport io.swagger.v3.jaxrs2.resources.exception.NotFoundException;\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.DELETE;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n@Path(\"/user\")\n@Produces({\"application/json\", \"application/xml\"})\npublic class UserResource {\n    static UserData userData = new UserData();\n\n    @POST\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response createUser(\n            @Parameter(description = \"Created user object\", required = true) User user) {\n        userData.addUser(user);\n        return Response.ok().entity(\"\").build();\n    }\n\n    @POST\n    @Path(\"/createWithArray\")\n    @Operation(summary = \"Creates list of users with given input array\")\n    public Response createUsersWithArrayInput(@Parameter(description = \"List of user object\", required = true) User[] users) {\n        for (User user : users) {\n            userData.addUser(user);\n        }\n        return Response.ok().entity(\"\").build();\n    }\n\n    @POST\n    @Path(\"/createWithList\")\n    @Operation(summary = \"Creates list of users with given input array\")\n    public Response createUsersWithListInput(@Parameter(description = \"List of user object\", required = true) java.util.List<User> users) {\n        for (User user : users) {\n            userData.addUser(user);\n        }\n        return Response.ok().entity(\"\").build();\n    }\n\n    @PUT\n    @Path(\"/{username}\")\n    @Operation(summary = \"Updated user\",\n            description = \"This can only be done by the logged in user.\",\n            responses = {\n                    @ApiResponse(responseCode = \"200\", description = \"user updated\"),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid user supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"User not found\")})\n    public Response updateUser(\n            @Parameter(description = \"name that need to be deleted\", required = true, examples = {\n                    @ExampleObject(name = \"example1\", value = \"example1\",\n                            summary = \"Summary example 1\", externalValue = \"external value 1\"),\n                    @ExampleObject(name = \"example2\", value = \"example2\",\n                            summary = \"Summary example 2\", externalValue = \"external value 2\")\n            }) @PathParam(\"username\") String username,\n            @Parameter(description = \"Updated user object\", required = true) User user) {\n        userData.addUser(user);\n        return Response.ok().entity(\"\").build();\n    }\n\n    @DELETE\n    @Path(\"/{username}\")\n    @Operation(summary = \"Delete user\",\n            description = \"This can only be done by the logged in user.\",\n            responses = {\n                    @ApiResponse(responseCode = \"200\", description = \"user deteled\"),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid username supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"User not found\")})\n    public Response deleteUser(\n            @Parameter(description = \"The name that needs to be deleted\", required = true) @PathParam(\"username\") String username) {\n        if (userData.removeUser(username)) {\n            return Response.ok().entity(\"\").build();\n        } else {\n            return Response.status(Response.Status.NOT_FOUND).build();\n        }\n    }\n\n    @GET\n    @Path(\"/{username}\")\n    @Operation(summary = \"Get user by user name\",\n            responses = {\n                    @ApiResponse(description = \"The user\",\n                            content = @Content(mediaType = \"application/json\",\n                                    schema = @Schema(implementation = User.class))),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid username supplied\"),\n                    @ApiResponse(responseCode = \"400\", description = \"User not found\")})\n    public Response getUserByName(\n            @Parameter(description = \"The name that needs to be fetched. Use user1 for testing. \", required = true) @PathParam(\"username\") String username)\n            throws ApiException {\n        User user = userData.findUserByName(username);\n        if (null != user) {\n            return Response.ok().entity(user).build();\n        } else {\n            throw new NotFoundException(404, \"User not found\");\n        }\n    }\n\n    @GET\n    @Path(\"/login\")\n    @Operation(summary = \"Logs user into the system\",\n            responses = {\n                    @ApiResponse(description = \"Successfully logged in\",\n                            content = @Content(schema = @Schema(implementation = String.class))),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid username/password supplied\")})\n    public Response loginUser(\n            @Parameter(description = \"The user name for login\", required = true) @QueryParam(\"username\") String username,\n            @Parameter(description = \"The password for login in clear text\", required = true) @QueryParam(\"password\") String password) {\n        return Response.ok()\n                .entity(\"logged in user session:\" + System.currentTimeMillis())\n                .build();\n    }\n\n    @GET\n    @Path(\"/logout\")\n    @Operation(summary = \"Logs out current logged in user session\")\n    public Response logoutUser() {\n        return Response.ok().entity(\"\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/WebHookResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources;\n\nimport io.swagger.v3.jaxrs2.resources.siblings.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Webhook;\nimport io.swagger.v3.oas.annotations.Webhooks;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\n@Webhooks({\n        @Webhook(\n                name = \"newPet\",\n                operation = @Operation(\n                        requestBody = @RequestBody(\n                                description = \"Information about a new pet in the system\",\n                                content = {\n                                        @Content(\n                                                mediaType = \"application/json\",\n                                                schema = @Schema(\n                                                        description = \"Webhook Pet\",\n                                                        implementation = Pet.class\n                                                )\n                                        )\n                                }\n                        ),\n                        method = \"post\",\n                        responses = @ApiResponse(\n                                responseCode = \"200\",\n                                description = \"Return a 200 status to indicate that the data was received successfully\"\n                        )\n                )\n        )\n})\npublic class WebHookResource {\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/data/PetData.java",
    "content": "package io.swagger.v3.jaxrs2.resources.data;\n\nimport io.swagger.v3.jaxrs2.resources.model.Category;\nimport io.swagger.v3.jaxrs2.resources.model.Pet;\nimport io.swagger.v3.jaxrs2.resources.model.Tag;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.stream.Collectors;\n\npublic class PetData {\n    static List<Pet> pets = new ArrayList<Pet>();\n    static List<Category> categories = new ArrayList<Category>();\n\n    static {\n        categories.add(createCategory(1, \"Dogs\"));\n        categories.add(createCategory(2, \"Cats\"));\n        categories.add(createCategory(3, \"Rabbits\"));\n        categories.add(createCategory(4, \"Lions\"));\n\n        pets.add(createPet(1, categories.get(1), \"Cat 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag1\", \"tag2\"}, \"available\"));\n        pets.add(createPet(2, categories.get(1), \"Cat 2\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag2\", \"tag3\"}, \"available\"));\n        pets.add(createPet(3, categories.get(1), \"Cat 3\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"pending\"));\n\n        pets.add(createPet(4, categories.get(0), \"Dog 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag1\", \"tag2\"}, \"available\"));\n        pets.add(createPet(5, categories.get(0), \"Dog 2\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag2\", \"tag3\"}, \"sold\"));\n        pets.add(createPet(6, categories.get(0), \"Dog 3\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"pending\"));\n\n        pets.add(createPet(7, categories.get(3), \"Lion 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag1\", \"tag2\"}, \"available\"));\n        pets.add(createPet(8, categories.get(3), \"Lion 2\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag2\", \"tag3\"}, \"available\"));\n        pets.add(createPet(9, categories.get(3), \"Lion 3\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"available\"));\n\n        pets.add(createPet(10, categories.get(2), \"Rabbit 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"available\"));\n    }\n\n    public Pet getPetById(long petId) {\n        for (Pet pet : pets) {\n            if (pet.getId() == petId) {\n                return pet;\n            }\n        }\n        return null;\n    }\n\n    public List<Pet> findPetByStatus(String status) {\n        String[] statues = status.split(\",\");\n        List<Pet> result = new ArrayList<Pet>();\n        for (Pet pet : pets) {\n            for (String s : statues) {\n                if (s.equals(pet.getStatus())) {\n                    result.add(pet);\n                }\n            }\n        }\n        return result;\n    }\n\n    public List<Pet> findPetByCategory(Category category) {\n        return pets.stream().filter(pet -> category.equals(pet.getCategory())).collect(Collectors.toList());\n    }\n\n    public List<Pet> findPetByTags(String tags) {\n        String[] tagList = tags.split(\",\");\n        List<Pet> result = new ArrayList<Pet>();\n        for (Pet pet : pets) {\n            if (null != pet.getTags()) {\n                for (Tag tag : pet.getTags()) {\n                    for (String tagListString : tagList) {\n                        if (tagListString.equals(tag.getName())) {\n                            result.add(pet);\n                        }\n                    }\n                }\n            }\n        }\n        return result;\n    }\n\n    public void addPet(Pet pet) {\n        if (pets.size() > 0) {\n            for (int i = pets.size() - 1; i >= 0; i--) {\n                if (pets.get(i).getId() == pet.getId()) {\n                    pets.remove(i);\n                }\n            }\n        }\n        pets.add(pet);\n    }\n\n    static Pet createPet(long id, Category cat, String name, String[] urls,\n                         String[] tags, String status) {\n        Pet pet = new Pet();\n        pet.setId(id);\n        pet.setCategory(cat);\n        pet.setName(name);\n        if (null != urls) {\n            List<String> urlObjs = new ArrayList<String>();\n            for (String urlString : urls) {\n                urlObjs.add(urlString);\n            }\n            pet.setPhotoUrls(urlObjs);\n        }\n        List<Tag> tagObjs = new ArrayList<Tag>();\n        int i = 0;\n        if (null != tags) {\n            for (String tagString : tags) {\n                i = i + 1;\n                Tag tag = new Tag();\n                tag.setId(i);\n                tag.setName(tagString);\n                tagObjs.add(tag);\n            }\n        }\n        pet.setTags(tagObjs);\n        pet.setStatus(status);\n        return pet;\n    }\n\n    static Category createCategory(long id, String name) {\n        Category category = new Category();\n        category.setId(id);\n        category.setName(name);\n        return category;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/data/UserData.java",
    "content": "package io.swagger.v3.jaxrs2.resources.data;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class UserData {\n    static List<User> users = new ArrayList<User>();\n\n    static {\n        users.add(createUser(1, \"user1\", \"first name 1\", \"last name 1\",\n                \"email1@test.com\", \"123-456-7890\", 1));\n        users.add(createUser(2, \"user2\", \"first name 2\", \"last name 2\",\n                \"email2@test.com\", \"123-456-7890\", 2));\n        users.add(createUser(3, \"user3\", \"first name 3\", \"last name 3\",\n                \"email3@test.com\", \"123-456-7890\", 3));\n        users.add(createUser(4, \"user4\", \"first name 4\", \"last name 4\",\n                \"email4@test.com\", \"123-456-7890\", 1));\n        users.add(createUser(5, \"user5\", \"first name 5\", \"last name 5\",\n                \"email5@test.com\", \"123-456-7890\", 2));\n        users.add(createUser(6, \"user6\", \"first name 6\", \"last name 6\",\n                \"email6@test.com\", \"123-456-7890\", 3));\n        users.add(createUser(7, \"user7\", \"first name 7\", \"last name 7\",\n                \"email7@test.com\", \"123-456-7890\", 1));\n        users.add(createUser(8, \"user8\", \"first name 8\", \"last name 8\",\n                \"email8@test.com\", \"123-456-7890\", 2));\n        users.add(createUser(9, \"user9\", \"first name 9\", \"last name 9\",\n                \"email9@test.com\", \"123-456-7890\", 3));\n        users.add(createUser(10, \"user10\", \"first name 10\", \"last name 10\",\n                \"email10@test.com\", \"123-456-7890\", 1));\n        users.add(createUser(11, \"user?10\", \"first name ?10\", \"last name ?10\",\n                \"email101@test.com\", \"123-456-7890\", 1));\n\n    }\n\n    public User findUserByName(String username) {\n        for (User user : users) {\n            if (user.getUsername().equals(username)) {\n                return user;\n            }\n        }\n        return null;\n    }\n\n    public void addUser(User user) {\n        if (users.size() > 0) {\n            for (int i = users.size() - 1; i >= 0; i--) {\n                if (users.get(i).getUsername().equals(user.getUsername())) {\n                    users.remove(i);\n                }\n            }\n        }\n        users.add(user);\n    }\n\n    public boolean removeUser(String username) {\n        if (users.size() > 0) {\n            for (int i = users.size() - 1; i >= 0; i--) {\n                if (users.get(i).getUsername().equals(username)) {\n                    users.remove(i);\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n\n    private static User createUser(long id, String username, String firstName,\n                                   String lastName, String email, String phone, int userStatus) {\n        User user = new User();\n        user.setId(id);\n        user.setUsername(username);\n        user.setFirstName(firstName);\n        user.setLastName(lastName);\n        user.setEmail(email);\n        user.setPassword(\"XXXXXXXXXXX\");\n        user.setPhone(phone);\n        user.setUserStatus(userStatus);\n        return user;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/exception/ApiException.java",
    "content": "package io.swagger.v3.jaxrs2.resources.exception;\n\npublic class ApiException extends Exception {\n    private int code;\n\n    public ApiException(int code, String msg) {\n        super(msg);\n        this.code = code;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/exception/NotFoundException.java",
    "content": "package io.swagger.v3.jaxrs2.resources.exception;\n\npublic class NotFoundException extends ApiException {\n    private int code;\n\n    public NotFoundException(int code, String msg) {\n        super(code, msg);\n        this.code = code;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/extensions/ExtensionsResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources.extensions;\n\nimport io.swagger.v3.jaxrs2.resources.model.ExtensionUser;\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeType;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.extensions.ExtensionProperty;\nimport io.swagger.v3.oas.annotations.info.Contact;\nimport io.swagger.v3.oas.annotations.info.Info;\nimport io.swagger.v3.oas.annotations.info.License;\nimport io.swagger.v3.oas.annotations.links.Link;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Encoding;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.security.OAuthFlow;\nimport io.swagger.v3.oas.annotations.security.OAuthFlows;\nimport io.swagger.v3.oas.annotations.security.OAuthScope;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.security.SecurityScheme;\nimport io.swagger.v3.oas.annotations.servers.Server;\nimport io.swagger.v3.oas.annotations.servers.ServerVariable;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n@OpenAPIDefinition(\n        extensions = {\n                @Extension(name = \"x-openapi\", properties = {\n                        @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                @Extension(name = \"openapi-extensions\", properties = {\n                        @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                        @ExtensionProperty(name = \"address\", value = \"House\")})\n        },\n        info = @Info(\n                extensions = {\n                        @Extension(name = \"x-info\", properties = {\n                                @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                        @Extension(name = \"info-extensions\", properties = {\n                                @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                @ExtensionProperty(name = \"address\", value = \"House\")})\n                },\n                contact = @Contact(\n                        extensions = {\n                                @Extension(name = \"x-contact\", properties = {\n                                        @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                                @Extension(name = \"contact-extensions\", properties = {\n                                        @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                        @ExtensionProperty(name = \"address\", value = \"House\")})\n                        }\n                ),\n                license = @License(\n                        extensions = {\n                                @Extension(name = \"x-license\", properties = {\n                                        @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                                @Extension(name = \"license-extensions\", properties = {\n                                        @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                        @ExtensionProperty(name = \"address\", value = \"House\")})\n                        }\n                )\n        ),\n        servers = @Server(\n                extensions = {\n                        @Extension(name = \"x-server\", properties = {\n                                @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                        @Extension(name = \"server-extensions\", properties = {\n                                @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                @ExtensionProperty(name = \"address\", value = \"House\")})\n                },\n                variables = @ServerVariable(\n                        name = \"aa\",\n                        defaultValue = \"aa\",\n                        extensions = {\n                                @Extension(name = \"x-servervar\", properties = {\n                                        @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                                @Extension(name = \"servervar-extensions\", properties = {\n                                        @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                        @ExtensionProperty(name = \"address\", value = \"House\")})\n                        }\n                )\n        ),\n        externalDocs = @ExternalDocumentation(\n                extensions = {\n                        @Extension(name = \"x-externalDocs\", properties = {\n                                @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                        @Extension(name = \"externalDocs-extensions\", properties = {\n                                @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                @ExtensionProperty(name = \"address\", value = \"House\")})\n                }\n\n        )\n)\n@SecurityScheme(name = \"myOauth2Security\",\n        type = SecuritySchemeType.OAUTH2,\n        in = SecuritySchemeIn.HEADER,\n        description = \"myOauthSecurity Description\",\n        flows = @OAuthFlows(\n                implicit = @OAuthFlow(\n                        authorizationUrl = \"http://x.com\",\n                        scopes = @OAuthScope(\n                                name = \"write:pets\",\n                                description = \"modify pets in your account\"\n                        ),\n                        extensions = {\n                                @Extension(name = \"x-oauthflow\", properties = {\n                                        @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                                @Extension(name = \"oauthflow-extensions\", properties = {\n                                        @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                        @ExtensionProperty(name = \"address\", value = \"House\")})\n                        }\n                ),\n                extensions = {\n                        @Extension(name = \"x-oauthflows\", properties = {\n                                @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                        @Extension(name = \"oauthflows-extensions\", properties = {\n                                @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                @ExtensionProperty(name = \"address\", value = \"House\")})\n                }\n        ),\n        extensions = {\n                @Extension(name = \"x-security\", properties = {\n                        @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                @Extension(name = \"security-extensions\", properties = {\n                        @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                        @ExtensionProperty(name = \"address\", value = \"House\")})\n        }\n)\n@SecurityRequirement(name = \"security_key\",\n        scopes = {\"write:pets\", \"read:pets\"}\n)\n@SecurityRequirement(name = \"myOauth2Security\",\n        scopes = {\"write:pets\"}\n)\npublic class ExtensionsResource {\n\n    @GET\n    @Path(\"/\")\n    @Tag(\n            name = \"MyTag\",\n            extensions = {\n                    @Extension(name = \"x-tag\", properties = {\n                            @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                    @Extension(name = \"tag-extensions\", properties = {\n                            @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                            @ExtensionProperty(name = \"address\", value = \"House\")})\n            }\n    )\n    @Operation(operationId = \"operationId\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\",\n            extensions = {\n                    @Extension(name = \"x-operation\", properties = {\n                            @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                    @Extension(name = \"x-operation-extensions\", properties = {\n                            @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                            @ExtensionProperty(name = \"address\", value = \"House\")}),\n                    @Extension(properties = {\n                            @ExtensionProperty(name = \"codes\", value = \"[\\\"11\\\", \\\"12\\\"]\", parseValue = true),\n                            @ExtensionProperty(name = \"name\", value = \"Josh\")})\n            })\n    public Response getSummaryAndDescription(\n            @Parameter(\n                    extensions = @Extension(\n                            name = \"x-parameter\",\n                            properties = {\n                                    @ExtensionProperty(name = \"parameter\", value = \"value\")\n                            }\n                    ),\n                    examples = {\n                            @ExampleObject(\n                                    name = \"example1\",\n                                    value = \"example1\",\n                                    summary = \"Summary example 1\",\n                                    externalValue = \"external value 1\",\n                                    extensions = {\n                                            @Extension(name = \"x-examples\", properties = {\n                                                    @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                                            @Extension(name = \"examples-extensions\", properties = {\n                                                    @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                                    @ExtensionProperty(name = \"address\", value = \"House\")})\n                                    }\n                            )\n                    }\n            )\n            @QueryParam(\"subscriptionId\") String subscriptionId) {\n\n        return Response.ok().entity(\"ok\").build();\n    }\n\n    @GET\n    @Path(\"/user\")\n    @Operation(\n            operationId = \"getUser\"\n    )\n    @Callback(\n            callbackUrlExpression = \"http://$request.query.url\",\n            name = \"subscription\",\n            extensions = {\n                    @Extension(name = \"x-callback\", properties = {\n                            @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                    @Extension(name = \"callback-extensions\", properties = {\n                            @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                            @ExtensionProperty(name = \"address\", value = \"House\")})\n            },\n            operation = {\n                    @Operation(\n                            method = \"post\",\n                            description = \"payload data will be sent\",\n                            parameters = {\n                                    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true, schema = @Schema(\n                                            type = \"string\",\n                                            format = \"uuid\",\n                                            description = \"the generated UUID\"))\n                            },\n                            responses = {\n                                    @ApiResponse(\n                                            responseCode = \"200\",\n                                            description = \"Return this code if the callback was received and processed successfully\"\n                                    ),\n                                    @ApiResponse(\n                                            responseCode = \"205\",\n                                            description = \"Return this code to unsubscribe from future data updates\"\n                                    ),\n                                    @ApiResponse(\n                                            responseCode = \"default\",\n                                            description = \"All other response codes will disable this callback subscription\"\n                                    )\n                            }),\n                    @Operation(\n                            method = \"get\",\n                            description = \"payload data will be received\"\n                    ),\n                    @Operation(\n                            method = \"put\",\n                            description = \"payload data will be sent\"\n                    )})\n    public void getUser(\n            //@Parameter(description = \"Parameter with no IN\", required = true)\n            @RequestBody(\n                    description = \"Request Body in Param\",\n                    content = @Content(\n                            mediaType = \"application/json\",\n                            schema = @Schema(\n                                    extensions = {\n                                            @Extension(name = \"x-schema\", properties = {\n                                                    @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                                            @Extension(name = \"schema-extensions\", properties = {\n                                                    @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                                    @ExtensionProperty(name = \"address\", value = \"House\")})\n                                    }\n                            ),\n                            extensions = {\n                                    @Extension(name = \"x-content\", properties = {\n                                            @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                                    @Extension(name = \"content-extensions\", properties = {\n                                            @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                            @ExtensionProperty(name = \"address\", value = \"House\")})\n                            },\n                            encoding = @Encoding(\n                                    name = \"application/xml\",\n                                    extensions = {\n                                            @Extension(name = \"x-encoding\", properties = {\n                                                    @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                                            @Extension(name = \"encoding-extensions\", properties = {\n                                                    @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                                    @ExtensionProperty(name = \"address\", value = \"House\")})\n                                    }\n                            )\n                    ),\n                    extensions = {\n                            @Extension(name = \"x-extension\", properties = {\n                                    @ExtensionProperty(name = \"name\", value = \"param\")}),\n                            @Extension(name = \"x-extension2\", properties = {\n                                    @ExtensionProperty(name = \"another\", value = \"val\")})})\n                    ExtensionUser user) {\n    }\n\n    @POST\n    @Path(\"/user\")\n    @Operation(operationId = \"setUser\"\n    )\n    @ApiResponse(\n            description = \"200\",\n            content = @Content(\n                    extensions = {\n                            @Extension(name = \"x-content\", properties = {\n                                    @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                            @Extension(name = \"content-extensions\", properties = {\n                                    @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                    @ExtensionProperty(name = \"address\", value = \"House\")})\n                    },\n                    encoding = @Encoding(\n                            extensions = {\n                                    @Extension(name = \"x-encoding\", properties = {\n                                            @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                                    @Extension(name = \"encoding-extensions\", properties = {\n                                            @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                            @ExtensionProperty(name = \"address\", value = \"House\")})\n                            }\n                    )\n            ),\n            links = @Link(\n                    name = \"aa\",\n                    description = \"aa\",\n                    operationId = \"getUser\",\n                    extensions = {\n                            @Extension(name = \"x-links\", properties = {\n                                    @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                            @Extension(name = \"links-extensions\", properties = {\n                                    @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                    @ExtensionProperty(name = \"address\", value = \"House\")})\n                    }\n\n            ),\n            extensions = {\n                    @Extension(name = \"x-response\", properties = {\n                            @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                    @Extension(name = \"response-extensions\", properties = {\n                            @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                            @ExtensionProperty(name = \"address\", value = \"House\")})\n            }\n    )\n    public ExtensionUser setUser(\n            @Parameter(\n                    description = \"Parameter with no IN\",\n                    required = true,\n                    schema = @Schema(\n                            description = \"the user\",\n                            extensions = {\n                                    @Extension(name = \"x-schema\", properties = {\n                                            @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                                    @Extension(name = \"schema-extensions\", properties = {\n                                            @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                                            @ExtensionProperty(name = \"address\", value = \"House\")})\n                            }\n                    )\n            )\n            @RequestBody(description = \"Request Body in Param\",\n                    extensions = {\n                            @Extension(name = \"x-extension\", properties = {\n                                    @ExtensionProperty(name = \"name\", value = \"param\")}),\n                            @Extension(name = \"x-extension2\", properties = {\n                                    @ExtensionProperty(name = \"another\", value = \"val\")})})\n                    ExtensionUser user) {\n        return null;\n    }\n\n\n    public static final String YAML =\n            \"openapi: 3.0.1\\n\" +\n                    \"info:\\n\" +\n                    \"  contact:\\n\" +\n                    \"    x-contact:\\n\" +\n                    \"      name: Josh\\n\" +\n                    \"    x-contact-extensions:\\n\" +\n                    \"      lastName: Hart\\n\" +\n                    \"      address: House\\n\" +\n                    \"  license:\\n\" +\n                    \"    x-license:\\n\" +\n                    \"      name: Josh\\n\" +\n                    \"    x-license-extensions:\\n\" +\n                    \"      lastName: Hart\\n\" +\n                    \"      address: House\\n\" +\n                    \"  x-info:\\n\" +\n                    \"    name: Josh\\n\" +\n                    \"  x-info-extensions:\\n\" +\n                    \"    lastName: Hart\\n\" +\n                    \"    address: House\\n\" +\n                    \"externalDocs:\\n\" +\n                    \"  x-externalDocs:\\n\" +\n                    \"    name: Josh\\n\" +\n                    \"  x-externalDocs-extensions:\\n\" +\n                    \"    lastName: Hart\\n\" +\n                    \"    address: House\\n\" +\n                    \"servers:\\n\" +\n                    \"- variables:\\n\" +\n                    \"    aa:\\n\" +\n                    \"      default: aa\\n\" +\n                    \"      x-servervar:\\n\" +\n                    \"        name: Josh\\n\" +\n                    \"      x-servervar-extensions:\\n\" +\n                    \"        lastName: Hart\\n\" +\n                    \"        address: House\\n\" +\n                    \"  x-server-extensions:\\n\" +\n                    \"    lastName: Hart\\n\" +\n                    \"    address: House\\n\" +\n                    \"  x-server:\\n\" +\n                    \"    name: Josh\\n\" +\n                    \"paths:\\n\" +\n                    \"  /:\\n\" +\n                    \"    get:\\n\" +\n                    \"      tags:\\n\" +\n                    \"      - MyTag\\n\" +\n                    \"      summary: Operation Summary\\n\" +\n                    \"      description: Operation Description\\n\" +\n                    \"      operationId: operationId\\n\" +\n                    \"      parameters:\\n\" +\n                    \"      - name: subscriptionId\\n\" +\n                    \"        in: query\\n\" +\n                    \"        schema:\\n\" +\n                    \"          type: string\\n\" +\n                    \"        examples:\\n\" +\n                    \"          example1:\\n\" +\n                    \"            summary: Summary example 1\\n\" +\n                    \"            description: example1\\n\" +\n                    \"            value: example1\\n\" +\n                    \"            externalValue: external value 1\\n\" +\n                    \"            x-examples-extensions:\\n\" +\n                    \"              lastName: Hart\\n\" +\n                    \"              address: House\\n\" +\n                    \"            x-examples:\\n\" +\n                    \"              name: Josh\\n\" +\n                    \"        x-parameter:\\n\" +\n                    \"          parameter: value\\n\" +\n                    \"      responses:\\n\" +\n                    \"        default:\\n\" +\n                    \"          description: default response\\n\" +\n                    \"          content:\\n\" +\n                    \"            '*/*': {}\\n\" +\n                    \"      security:\\n\" +\n                    \"      - security_key:\\n\" +\n                    \"        - write:pets\\n\" +\n                    \"        - read:pets\\n\" +\n                    \"      - myOauth2Security:\\n\" +\n                    \"        - write:pets\\n\" +\n                    \"      x-name: Josh\\n\" +\n                    \"      x-operation:\\n\" +\n                    \"        name: Josh\\n\" +\n                    \"      x-operation-extensions:\\n\" +\n                    \"        lastName: Hart\\n\" +\n                    \"        address: House\\n\" +\n                    \"      x-codes:\\n\" +\n                    \"      - \\\"11\\\"\\n\" +\n                    \"      - \\\"12\\\"\\n\" +\n                    \"  /user:\\n\" +\n                    \"    get:\\n\" +\n                    \"      operationId: getUser\\n\" +\n                    \"      requestBody:\\n\" +\n                    \"        description: Request Body in Param\\n\" +\n                    \"        content:\\n\" +\n                    \"          application/json:\\n\" +\n                    \"            schema:\\n\" +\n                    \"              type: string\\n\" +\n                    \"              x-schema:\\n\" +\n                    \"                name: Josh\\n\" +\n                    \"              x-schema-extensions:\\n\" +\n                    \"                lastName: Hart\\n\" +\n                    \"                address: House\\n\" +\n                    \"            encoding:\\n\" +\n                    \"              application/xml:\\n\" +\n                    \"                x-encoding-extensions:\\n\" +\n                    \"                  lastName: Hart\\n\" +\n                    \"                  address: House\\n\" +\n                    \"                x-encoding:\\n\" +\n                    \"                  name: Josh\\n\" +\n                    \"            x-content:\\n\" +\n                    \"              name: Josh\\n\" +\n                    \"            x-content-extensions:\\n\" +\n                    \"              lastName: Hart\\n\" +\n                    \"              address: House\\n\" +\n                    \"        x-extension:\\n\" +\n                    \"          name: param\\n\" +\n                    \"        x-extension2:\\n\" +\n                    \"          another: val\\n\" +\n                    \"      responses:\\n\" +\n                    \"        default:\\n\" +\n                    \"          description: default response\\n\" +\n                    \"          content:\\n\" +\n                    \"            '*/*': {}\\n\" +\n                    \"      callbacks:\\n\" +\n                    \"        subscription:\\n\" +\n                    \"          http://$request.query.url:\\n\" +\n                    \"            get:\\n\" +\n                    \"              description: payload data will be received\\n\" +\n                    \"            put:\\n\" +\n                    \"              description: payload data will be sent\\n\" +\n                    \"            post:\\n\" +\n                    \"              description: payload data will be sent\\n\" +\n                    \"              parameters:\\n\" +\n                    \"              - name: subscriptionId\\n\" +\n                    \"                in: path\\n\" +\n                    \"                required: true\\n\" +\n                    \"                schema:\\n\" +\n                    \"                  type: string\\n\" +\n                    \"                  description: the generated UUID\\n\" +\n                    \"                  format: uuid\\n\" +\n                    \"              responses:\\n\" +\n                    \"                \\\"200\\\":\\n\" +\n                    \"                  description: Return this code if the callback was received and processed\\n\" +\n                    \"                    successfully\\n\" +\n                    \"                \\\"205\\\":\\n\" +\n                    \"                  description: Return this code to unsubscribe from future data updates\\n\" +\n                    \"                default:\\n\" +\n                    \"                  description: All other response codes will disable this callback\\n\" +\n                    \"                    subscription\\n\" +\n                    \"      security:\\n\" +\n                    \"      - security_key:\\n\" +\n                    \"        - write:pets\\n\" +\n                    \"        - read:pets\\n\" +\n                    \"      - myOauth2Security:\\n\" +\n                    \"        - write:pets\\n\" +\n                    \"    post:\\n\" +\n                    \"      operationId: setUser\\n\" +\n                    \"      requestBody:\\n\" +\n                    \"        description: Request Body in Param\\n\" +\n                    \"        content:\\n\" +\n                    \"          '*/*':\\n\" +\n                    \"            schema:\\n\" +\n                    \"              $ref: \\\"#/components/schemas/ExtensionUser\\\"\\n\" +\n                    \"        x-extension:\\n\" +\n                    \"          name: param\\n\" +\n                    \"        x-extension2:\\n\" +\n                    \"          another: val\\n\" +\n                    \"      responses:\\n\" +\n                    \"        default:\\n\" +\n                    \"          description: \\\"200\\\"\\n\" +\n                    \"          content:\\n\" +\n                    \"            '*/*':\\n\" +\n                    \"              schema:\\n\" +\n                    \"                $ref: \\\"#/components/schemas/ExtensionUser\\\"\\n\" +\n                    \"              x-content:\\n\" +\n                    \"                name: Josh\\n\" +\n                    \"              x-content-extensions:\\n\" +\n                    \"                lastName: Hart\\n\" +\n                    \"                address: House\\n\" +\n                    \"          links:\\n\" +\n                    \"            aa:\\n\" +\n                    \"              operationId: getUser\\n\" +\n                    \"              description: aa\\n\" +\n                    \"              x-links-extensions:\\n\" +\n                    \"                lastName: Hart\\n\" +\n                    \"                address: House\\n\" +\n                    \"              x-links:\\n\" +\n                    \"                name: Josh\\n\" +\n                    \"          x-response-extensions:\\n\" +\n                    \"            lastName: Hart\\n\" +\n                    \"            address: House\\n\" +\n                    \"          x-response:\\n\" +\n                    \"            name: Josh\\n\" +\n                    \"      security:\\n\" +\n                    \"      - security_key:\\n\" +\n                    \"        - write:pets\\n\" +\n                    \"        - read:pets\\n\" +\n                    \"      - myOauth2Security:\\n\" +\n                    \"        - write:pets\\n\" +\n                    \"components:\\n\" +\n                    \"  schemas:\\n\" +\n                    \"    ExtensionUser:\\n\" +\n                    \"      type: object\\n\" +\n                    \"      properties:\\n\" +\n                    \"        id:\\n\" +\n                    \"          type: integer\\n\" +\n                    \"          format: int64\\n\" +\n                    \"        username:\\n\" +\n                    \"          type: string\\n\" +\n                    \"        firstName:\\n\" +\n                    \"          type: string\\n\" +\n                    \"        lastName:\\n\" +\n                    \"          type: string\\n\" +\n                    \"        email:\\n\" +\n                    \"          type: string\\n\" +\n                    \"        password:\\n\" +\n                    \"          type: string\\n\" +\n                    \"        phone:\\n\" +\n                    \"          type: string\\n\" +\n                    \"        userStatus:\\n\" +\n                    \"          type: integer\\n\" +\n                    \"          description: User Status\\n\" +\n                    \"          format: int32\\n\" +\n                    \"          x-userStatus:\\n\" +\n                    \"            name: Josh\\n\" +\n                    \"          x-userStatus-extensions:\\n\" +\n                    \"            lastName: Hart\\n\" +\n                    \"            address: House\\n\" +\n                    \"      description: User\\n\" +\n                    \"      xml:\\n\" +\n                    \"        name: User\\n\" +\n                    \"      x-user-extensions:\\n\" +\n                    \"        lastName: Hart\\n\" +\n                    \"        address: House\\n\" +\n                    \"      x-user:\\n\" +\n                    \"        name: Josh\\n\" +\n                    \"  securitySchemes:\\n\" +\n                    \"    myOauth2Security:\\n\" +\n                    \"      type: oauth2\\n\" +\n                    \"      description: myOauthSecurity Description\\n\" +\n                    \"      in: header\\n\" +\n                    \"      flows:\\n\" +\n                    \"        implicit:\\n\" +\n                    \"          authorizationUrl: http://x.com\\n\" +\n                    \"          scopes:\\n\" +\n                    \"            write:pets: modify pets in your account\\n\" +\n                    \"          x-oauthflow-extensions:\\n\" +\n                    \"            lastName: Hart\\n\" +\n                    \"            address: House\\n\" +\n                    \"          x-oauthflow:\\n\" +\n                    \"            name: Josh\\n\" +\n                    \"        x-oauthflows:\\n\" +\n                    \"          name: Josh\\n\" +\n                    \"        x-oauthflows-extensions:\\n\" +\n                    \"          lastName: Hart\\n\" +\n                    \"          address: House\\n\" +\n                    \"      x-security:\\n\" +\n                    \"        name: Josh\\n\" +\n                    \"      x-security-extensions:\\n\" +\n                    \"        lastName: Hart\\n\" +\n                    \"        address: House\\n\" +\n                    \"x-openapi:\\n\" +\n                    \"  name: Josh\\n\" +\n                    \"x-openapi-extensions:\\n\" +\n                    \"  lastName: Hart\\n\" +\n                    \"  address: House\";\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/extensions/OperationExtensionsResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources.extensions;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.extensions.ExtensionProperty;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\npublic class OperationExtensionsResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(operationId = \"operationId\",\n            summary = \"Operation Summary\",\n            description = \"Operation Description\",\n            extensions = {\n                    @Extension(name = \"x-operation\", properties = {\n                            @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                    @Extension(name = \"x-operation-extensions\", properties = {\n                            @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                            @ExtensionProperty(name = \"address\", value = \"House\")})\n                    })\n    public Response getSummaryAndDescription() {\n        return Response.ok().entity(\"ok\").build();\n    }\n\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/extensions/ParameterExtensionsResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources.extensions;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.extensions.ExtensionProperty;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\npublic class ParameterExtensionsResource {\n\n    @GET\n    @Path(\"/\")\n    @Operation(operationId = \"Id\")\n    public void getParameters(@Parameter(extensions = @Extension(name = \"x-parameter\", properties = {\n            @ExtensionProperty(name = \"parameter\", value = \"value\")}))\n                              @QueryParam(\"subscriptionId\") String subscriptionId) {\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/extensions/RequestBodyExtensionsResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources.extensions;\n\nimport io.swagger.v3.jaxrs2.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.extensions.ExtensionProperty;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class RequestBodyExtensionsResource {\n    @GET\n    @Path(\"/user\")\n    @Operation(operationId = \"Id\"\n    )\n    public void getUser(\n            @Parameter(description = \"Parameter with no IN\", required = true)\n            @RequestBody(description = \"Request Body in Param\",\n            extensions = {\n                    @Extension(name = \"x-extension\", properties = {\n                            @ExtensionProperty(name = \"name\", value = \"param\")}),\n                    @Extension(name = \"x-extension2\", properties = {\n                            @ExtensionProperty(name = \"another\", value = \"val\")})})\n                    User user) {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket2144/BaseDTO.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket2144;\n\n\npublic class BaseDTO {\n\n    public String name;\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket2144/BaseResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket2144;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\n\npublic  abstract class BaseResource<T extends BaseDTO> {\n\n    @GET\n    @Path(\"/{id}\")\n    public T getById(@PathParam(\"id\") String id) { return null; }\n\n\n    @GET\n    @Path(\"/nogeneric/{id}\")\n    public BaseDTO getByIdNoGeneric(@PathParam(\"id\") String id) { return null; }\n\n    @GET\n    @Path(\"/nogenericsamereturn/{id}\")\n    public BaseDTO getByIdNoGenericSameReturn(@PathParam(\"id\") String id) { return null; }\n\n\n    @POST\n    @Path(\"/genericparam\")\n    public BaseDTO genericParam(T id) { return null; }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket2144/Item.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket2144;\n\n\npublic class Item extends BaseDTO {\n\n    public String names;\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket2144/ItemResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket2144;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\n\n@Path(\"/item\")\npublic class ItemResource extends BaseResource<Item> {\n\n    @GET\n    @Path(\"/{id}\")\n    @Override\n    public ItemWithChildren getById(@PathParam(\"id\") String id) { return null; }\n\n    @GET\n    @Path(\"/nogeneric/{id}\")\n    @Override\n    public ItemWithChildren getByIdNoGeneric(@PathParam(\"id\") String id) { return null; }\n\n    @GET\n    @Path(\"/nogenericsamereturn/{id}\")\n    @Override\n    public BaseDTO getByIdNoGenericSameReturn(@PathParam(\"id\") String id) { return null; }\n\n\n\n    @POST\n    @Path(\"/genericparam\")\n    public BaseDTO genericParam(ItemWithChildren id) { return null; }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket2144/ItemWithChildren.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket2144;\n\n\npublic class ItemWithChildren extends Item {\n\n    public String names;\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3149/AggregateEndpoint.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3149;\n\npublic interface AggregateEndpoint<C,R>\n extends FirstEndpoint<C>, SecondEndpoint<R> {\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3149/FirstEndpoint.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3149;\n\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.responses.ApiResponses;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\npublic interface FirstEndpoint<C> {\n\n    @POST\n    @Path(\"/\")\n    @ApiResponses(value = {\n            @ApiResponse(responseCode = \"201\", description = \"Created\"),\n            @ApiResponse(responseCode = \"400\", description = \"Bad Request\"),\n            @ApiResponse(responseCode = \"403\", description = \"Forbidden\"),\n            @ApiResponse(responseCode = \"404\", description = \"Not Found\")})\n    default String firstEndpoint(C param) {\n        return \"firstEndpoint-ok\";\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3149/MainResource.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3149;\n\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport javax.ws.rs.Path;\n\n@Path(\"/test\")\n@Tag(name = \"Test inheritance on default implementation in interfaces\")\npublic class MainResource\n    implements AggregateEndpoint<SampleDTO, SampleOtherDTO> {\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3149/OriginalEndpoint.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3149;\n\npublic interface OriginalEndpoint<C> {\n\n    String originalEndpoint(C c);\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3149/SampleDTO.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3149;\n\n\npublic class SampleDTO {\n\n    public String name;\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3149/SampleOtherDTO.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3149;\n\npublic class SampleOtherDTO {\n\n    public String label;\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3149/SecondEndpoint.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3149;\n\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.responses.ApiResponses;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic interface SecondEndpoint<C> extends OriginalEndpoint<C> {\n\n    @GET\n    @Path(\"/{id}\")\n    @ApiResponses(value = {\n            @ApiResponse(responseCode = \"200\", description = \"OK\"),\n            @ApiResponse(responseCode = \"400\", description = \"Bad Request\"),\n            @ApiResponse(responseCode = \"403\", description = \"Forbidden\"),\n            @ApiResponse(responseCode = \"404\", description = \"Not Found\")})\n    default String secondEnpoint(C param) {\n        return \"secondEnpoint-ok\";\n    }\n\n    @Override\n    @GET\n    @Path(\"/original/{id}\")\n    @ApiResponses(value = {\n            @ApiResponse(responseCode = \"200\", description = \"OK\"),\n            @ApiResponse(responseCode = \"400\", description = \"Bad Request\"),\n            @ApiResponse(responseCode = \"403\", description = \"Forbidden\"),\n            @ApiResponse(responseCode = \"404\", description = \"Not Found\")})\n    default String originalEndpoint(C param) {\n        return \"originalEndpoint-ok\";\n    }\n\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3426/Parent.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3426;\n\npublic class Parent<T> {\n    public T get(String input) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3426/Ticket3426Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3426;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\n\n@Path(\"/inheritExample\")\npublic class Ticket3426Resource extends Parent<String> {\n    @Override\n    @GET\n    @Path(\"/{input}\")\n    public String get(@PathParam(\"input\") String input) {\n        return super.get(input);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3694/Ticket3694Resource.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3694;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\nimport java.util.List;\n\n@Path(\"/\")\npublic class Ticket3694Resource implements Ticket3694ResourceInterface<String> {\n\n\n    @POST\n    @Path(\"foo\")\n    @Consumes(MediaType.APPLICATION_JSON)\n    @Operation(summary = \"Foo List in Interface\", tags = \"Foo\")\n    @Override\n    public Response foo(List<String> foo) {\n        return null;\n    }\n\n    @POST\n    @Path(\"bar\")\n    @Consumes(MediaType.APPLICATION_JSON)\n    @Operation\n    @Override\n    public String bar(List<String> foo) {\n        return null;\n    }\n\n    @POST\n    @Path(\"another\")\n    @Consumes(MediaType.APPLICATION_JSON)\n    @Operation\n    @Override\n    public Response another(String foo) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3694/Ticket3694ResourceExtendedType.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3694;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\nimport java.util.List;\n\n@Path(\"/\")\npublic class Ticket3694ResourceExtendedType implements Ticket3694ResourceInterfaceExtendedType<String> {\n\n\n    @POST\n    @Path(\"foo\")\n    @Consumes(MediaType.APPLICATION_JSON)\n    @Operation(summary = \"Foo List in Interface\", tags = \"Foo\")\n    @Override\n    public Response foo(List<String> foo) {\n        return null;\n    }\n\n    @POST\n    @Path(\"bar\")\n    @Consumes(MediaType.APPLICATION_JSON)\n    @Operation\n    @Override\n    public String bar(List<String> foo) {\n        return null;\n    }\n\n    @POST\n    @Path(\"another\")\n    @Consumes(MediaType.APPLICATION_JSON)\n    @Operation\n    @Override\n    public Response another(String foo) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3694/Ticket3694ResourceInterface.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3694;\n\nimport javax.ws.rs.core.Response;\nimport java.util.List;\n\npublic interface Ticket3694ResourceInterface<T> {\n\n    Response foo(List<T> foo);\n\n    T bar(List<T> foo);\n\n    Response another(T foo);\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3694/Ticket3694ResourceInterfaceExtendedType.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3694;\n\nimport javax.ws.rs.core.Response;\nimport java.util.List;\n\npublic interface Ticket3694ResourceInterfaceExtendedType<T extends String> {\n\n    Response foo(List<T> foo);\n\n    T bar(List<T> foo);\n\n    Response another(T foo);\n\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3694/Ticket3694ResourceInterfaceSimple.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3694;\n\nimport java.util.List;\n\npublic interface Ticket3694ResourceInterfaceSimple<T> {\n\n    T bar(List<T> foo);\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3694/Ticket3694ResourceInterfaceSimpleSameReturn.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3694;\n\nimport javax.ws.rs.core.Response;\nimport java.util.List;\n\npublic interface Ticket3694ResourceInterfaceSimpleSameReturn<T> {\n\n    Response bar(List<T> foo);\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3694/Ticket3694ResourceSimple.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3694;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.MediaType;\nimport java.util.List;\n\n@Path(\"/\")\npublic class Ticket3694ResourceSimple implements Ticket3694ResourceInterfaceSimple<String> {\n\n\n\n    @POST\n    @Path(\"bar\")\n    @Consumes(MediaType.APPLICATION_JSON)\n    @Operation\n    @Override\n    public String bar(List<String> foo) {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3694/Ticket3694ResourceSimpleSameReturn.java",
    "content": "package io.swagger.v3.jaxrs2.resources.generics.ticket3694;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\nimport java.util.List;\n\n@Path(\"/\")\npublic class Ticket3694ResourceSimpleSameReturn implements Ticket3694ResourceInterfaceSimpleSameReturn<String> {\n\n\n\n    @POST\n    @Path(\"bar\")\n    @Consumes(MediaType.APPLICATION_JSON)\n    @Operation\n    @Override\n    public Response bar(List<String> foo) {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/Category.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Category\")\npublic class Category {\n    private long id;\n    private String name;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public Category() {\n    }\n\n    public Category(String name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/CustomGenerator.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\nimport com.fasterxml.jackson.annotation.ObjectIdGenerator;\nimport com.fasterxml.jackson.annotation.ObjectIdGenerators;\n\npublic class CustomGenerator extends ObjectIdGenerators.PropertyGenerator {\n    private static final long serialVersionUID = 1L;\n\n    protected CustomGenerator(Class<?> scope) {\n        super(scope);\n    }\n\n    @Override\n    public ObjectIdGenerator<Object> forScope(Class<?> scope) {\n        return null;\n    }\n\n    @Override\n    public ObjectIdGenerator<Object> newForSerialization(Object context) {\n        return null;\n    }\n\n    @Override\n    public IdKey key(Object key) {\n        return null;\n    }\n\n    @Override\n    public Object generateId(Object forPojo) {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/ExtensionUser.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.extensions.ExtensionProperty;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"User\")\n@Schema(\n        description = \"User\",\n        extensions = {\n                @Extension(name = \"x-user\", properties = {\n                        @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                @Extension(name = \"user-extensions\", properties = {\n                        @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                        @ExtensionProperty(name = \"address\", value = \"House\")})\n        }\n)\npublic class ExtensionUser {\n    private long id;\n    private String username;\n    private String firstName;\n    private String lastName;\n    private String email;\n    private String password;\n    private String phone;\n    private int userStatus;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"firstName\")\n    public String getFirstName() {\n        return firstName;\n    }\n\n    public void setFirstName(String firstName) {\n        this.firstName = firstName;\n    }\n\n    @XmlElement(name = \"username\")\n    public String getUsername() {\n        return username;\n    }\n\n    public void setUsername(String username) {\n        this.username = username;\n    }\n\n    @XmlElement(name = \"lastName\")\n    public String getLastName() {\n        return lastName;\n    }\n\n    public void setLastName(String lastName) {\n        this.lastName = lastName;\n    }\n\n    @XmlElement(name = \"email\")\n    public String getEmail() {\n        return email;\n    }\n\n    public void setEmail(String email) {\n        this.email = email;\n    }\n\n    @XmlElement(name = \"password\")\n    public String getPassword() {\n        return password;\n    }\n\n    public void setPassword(String password) {\n        this.password = password;\n    }\n\n    @XmlElement(name = \"phone\")\n    public String getPhone() {\n        return phone;\n    }\n\n    public void setPhone(String phone) {\n        this.phone = phone;\n    }\n\n    @XmlElement(name = \"userStatus\")\n    @Schema(\n            description = \"User Status\",\n            extensions = {\n                    @Extension(name = \"x-userStatus\", properties = {\n                            @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                    @Extension(name = \"userStatus-extensions\", properties = {\n                            @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                            @ExtensionProperty(name = \"address\", value = \"House\")})\n            }\n    )\n    public int getUserStatus() {\n        return userStatus;\n    }\n\n    public void setUserStatus(int userStatus) {\n        this.userStatus = userStatus;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/FormParamBean.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\nimport javax.ws.rs.BeanParam;\nimport javax.ws.rs.FormParam;\n\npublic class FormParamBean {\n\n    @FormParam(value = \"param1\")\n    private String param1;\n\n    @FormParam(value = \"param2\")\n    private String param2;\n\n    @BeanParam\n    private NestedBeanParam nestedParams;\n\n    public String getParam1() {\n        return param1;\n    }\n\n    public void setParam1(String param1) {\n        this.param1 = param1;\n    }\n\n    public String getParam2() {\n        return param2;\n    }\n\n    public void setParam2(String param2) {\n        this.param2 = param2;\n    }\n\n    public NestedBeanParam getNestedParams() {\n        return nestedParams;\n    }\n\n    public void setNestedParams(final NestedBeanParam nestedParams) {\n        this.nestedParams = nestedParams;\n    }\n\n    private static class NestedBeanParam {\n        @FormParam(value = \"param3\")\n        private String param3;\n        public String getParam3() {\n            return param3;\n        }\n\n        public void setParam3(String param3) {\n            this.param3 = param3;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/Item.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\npublic class Item {\n    private String name;\n    private String value;\n    @Schema(example = \"Ynl0ZQ==\")\n    private byte[] bytes;\n    @Schema(format = \"binary\", example = \"YmluYXJ5\")\n    private byte[] binary;\n\n    private byte[] byteNoAnnotation;\n\n    public Item() {\n    }\n    \n    public void setBinary(byte[] binary) {\n        this.binary = binary;\n    }\n    \n    public byte[] getBinary() {\n        return binary;\n    }\n    \n    public void setName(String name) {\n        this.name = name;\n    }\n    \n    public String getName() {\n        return name;\n    }\n    \n    public void setValue(String value) {\n        this.value = value;\n    }\n    \n    public String getValue() {\n        return value;\n    }\n    \n    public void setBytes(byte[] bytes) {\n        this.bytes = bytes;\n    }\n    \n    public byte[] getBytes() {\n        return bytes;\n    }\n\n    public void setByteNoAnnotation(byte[] byteNoAnnotation) {\n        this.byteNoAnnotation = byteNoAnnotation;\n    }\n\n    public byte[] getByteNoAnnotation() {\n        return byteNoAnnotation;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/JacksonBean.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\nimport com.fasterxml.jackson.annotation.JsonCreator;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonUnwrapped;\nimport com.fasterxml.jackson.annotation.JsonValue;\n\npublic class JacksonBean {\n\n    private String id;\n    private String ignored;\n    private StringValueBean bean;\n    private NotFoundModel model;\n    private NotFoundModel model2;\n\n    @JsonIgnore\n    public String getIgnored() {\n        return ignored;\n    }\n\n    public void setIgnored(String ignored) {\n        this.ignored = ignored;\n    }\n\n    public void setId(String id) {\n        this.id = id;\n    }\n\n    public void setModel(NotFoundModel model) {\n        this.model = model;\n    }\n\n    public StringValueBean getBean() {\n        return bean;\n    }\n\n    public void setBean(StringValueBean bean) {\n        this.bean = bean;\n    }\n\n    @JsonProperty(\"identity\")\n    public String getId() {\n        return id;\n    }\n\n    @JsonUnwrapped\n    public NotFoundModel getModel() {\n        return model;\n    }\n\n    @JsonUnwrapped(prefix = \"pre\", suffix = \"suf\")\n    public NotFoundModel getModel2() {\n        return model2;\n    }\n\n    public void setModel2(NotFoundModel model2) {\n        this.model2 = model2;\n    }\n\n    public static class StringValueBean {\n\n        private final String value;\n\n        @JsonCreator\n        public StringValueBean(String value) {\n            this.value = value;\n        }\n\n        @JsonValue\n        public String getValue() {\n            return value;\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/ListOfStringsBeanParam.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\nimport java.util.List;\n\nimport javax.ws.rs.QueryParam;\n\npublic class ListOfStringsBeanParam {\n    @QueryParam(value = \"listOfStrings\")\n    private List<String> list;\n\n    public List<String> getList() {\n        return list;\n    }\n\n    public void setList(List<String> list) {\n        this.list = list;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/ModelWithJsonIdentity.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\nimport com.fasterxml.jackson.annotation.JsonIdentityInfo;\nimport com.fasterxml.jackson.annotation.JsonIdentityReference;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.ObjectIdGenerators;\n\npublic class ModelWithJsonIdentity {\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"name\")\n    @JsonProperty(\"PropertyGeneratorAsId\")\n    public SourceDefinition1 testPropertyGeneratorAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"name\")\n    @JsonProperty(\"PropertyGeneratorAsProperty\")\n    public SourceDefinition1 testPropertyGeneratorAsProperty;\n\n    public class SourceDefinition1 {\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"driverId\")\n    @JsonProperty(\"ChangedPropertyName\")\n    public SourceDefinition2 testChangedPropertyName;\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"driverId\")\n    @JsonProperty(\"ChangedPropertyName2\")\n    public SourceDefinition2 testChangedPropertyName2;\n\n    static public class SourceDefinition2 {\n        @JsonProperty(\"driverId\")\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class)\n    @JsonProperty(\"SourceWithoutPropertyAsId\")\n    public SourceDefinition3 testWithoutPropertyAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class)\n    @JsonProperty(\"SourceWithoutPropertyAsProperty\")\n    public SourceDefinition3 testWithoutPropertyAsProperty;\n\n    public class SourceDefinition3 {\n        @JsonProperty(\"driverId\")\n        public String driver;\n        public String name;\n\n        @JsonProperty(\"@id\")\n        public String id;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = \"testName1\")\n    @JsonProperty(\"IntSequenceGeneratorAsId\")\n    public SourceDefinition4 testIntSequenceGeneratorAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = \"testName2\")\n    @JsonProperty(\"IntSequenceGeneratorAsProperty\")\n    public SourceDefinition4 testIntSequenceGeneratorAsProperty;\n\n    public class SourceDefinition4 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class)\n    @JsonProperty(\"IntSequenceWithoutPropertyAsId\")\n    public SourceDefinition5 testIntSequenceWithoutPropertyAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class)\n    @JsonProperty(\"IntSequenceWithoutPropertyAsProperty\")\n    public SourceDefinition5 testIntSequenceWithoutPropertyAsProperty;\n\n    public class SourceDefinition5 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = \"UUID1\")\n    @JsonProperty(\"UUIDGeneratorAsId\")\n    public SourceDefinition6 testUUIDGeneratorAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = \"UUID2\")\n    @JsonProperty(\"UUIDGeneratorAsProperty\")\n    public SourceDefinition6 testUUIDGeneratorAsProperty;\n\n    public class SourceDefinition6 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class)\n    @JsonProperty(\"UUIDGeneratorWithoutPropertyAsId\")\n    public SourceDefinition7 testUUIDGeneratorWithoutPropertyAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class)\n    @JsonProperty(\"UUIDGeneratorWithoutPropertyAsProperty\")\n    public SourceDefinition7 testUUIDGeneratorWithoutPropertyAsProperty;\n\n    public class SourceDefinition7 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.None.class, property = \"testGeneratorsNone\")\n    @JsonProperty(\"GeneratorsNone\")\n    public SourceDefinition8 testGeneratorsNone;\n\n    public class SourceDefinition8 {\n        @JsonProperty(\"driverId\")\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = CustomGenerator.class, property = \"name\")\n    @JsonProperty(\"CustomGenerator\")\n    public SourceDefinition9 testCustomGenerator;\n\n    public class SourceDefinition9 {\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityInfo(generator = CustomGenerator.class, property = \"name\")\n    @JsonProperty(\"WithoutJsonIdentityReference\")\n    public SourceDefinition10 testWithoutJsonIdentityReference;\n\n    public class SourceDefinition10 {\n        public String driver;\n        public String name;\n    }\n\n    @JsonProperty(\"IntSequenceGeneratorAtClassLevel\")\n    public SourceDefinition11 testIntSequenceGeneratorAtClassLevel;\n\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class)\n    public class SourceDefinition11 {\n        public String name;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/ModelWithJsonIdentityCyclic.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\nimport com.fasterxml.jackson.annotation.JsonIdentityInfo;\nimport com.fasterxml.jackson.annotation.JsonIdentityReference;\nimport com.fasterxml.jackson.annotation.ObjectIdGenerators;\n\nimport java.util.List;\n\npublic class ModelWithJsonIdentityCyclic {\n\n    public Long id;\n\n    public List<SourceDefinition> sourceDefinitions;\n\n    @JsonIdentityInfo(\n            generator = ObjectIdGenerators.PropertyGenerator.class,\n            property = \"name\")\n    public static class SourceDefinition {\n        public String driver;\n        public String name;\n\n        @JsonIdentityReference(alwaysAsId=true)\n        @JsonIdentityInfo(\n                generator = ObjectIdGenerators.PropertyGenerator.class,\n                property = \"id\")\n        public ModelWithJsonIdentityCyclic model;\n    }\n\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/MultipleBaseBean.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\n@io.swagger.v3.oas.annotations.media.Schema(\n        description = \"MultipleBaseBean\",\n        subTypes = { MultipleSub1Bean.class, MultipleSub2Bean.class }\n)\npublic class MultipleBaseBean {\n    public String beanType;\n    public int a;\n    public String b;\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/MultipleSub1Bean.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\n@io.swagger.v3.oas.annotations.media.Schema(\n        description = \"MultipleSub1Bean\"\n)\npublic class MultipleSub1Bean extends MultipleBaseBean {\n    public int c;\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/MultipleSub2Bean.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\n@io.swagger.v3.oas.annotations.media.Schema(\n        description = \"MultipleSub2Bean\"\n)\npublic class MultipleSub2Bean extends MultipleBaseBean {\n    public int d;\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/NestedBeanParam.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\nimport javax.ws.rs.BeanParam;\nimport javax.ws.rs.DefaultValue;\nimport javax.ws.rs.QueryParam;\n\npublic class NestedBeanParam {\n\n    @BeanParam\n    private NestedClass nestedParams;\n\n    public NestedClass getNestedParams() {\n        return nestedParams;\n    }\n\n    public void setNestedParams(final NestedClass nestedParams) {\n        this.nestedParams = nestedParams;\n    }\n\n    public class NestedClass {\n        @QueryParam(value = \"queryParam\")\n        @DefaultValue(\"10\")\n        private Integer queryParam = 10;\n        public Integer getQueryParam() {\n            return queryParam;\n        }\n\n        public void setQueryParam(final Integer queryParam) {\n            this.queryParam = queryParam;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/NotFoundModel.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\npublic class NotFoundModel {\n    int code;\n    String message;\n\n    public NotFoundModel() {\n    }\n\n    public NotFoundModel(int code, String message) {\n        this.code = code;\n        this.message = message;\n    }\n\n    public int getCode() {\n        return code;\n    }\n\n    public void setCode(int code) {\n        this.code = code;\n    }\n\n    public String getMessage() {\n        return message;\n    }\n\n    public void setMessage(String message) {\n        this.message = message;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/Pet.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlElementWrapper;\nimport javax.xml.bind.annotation.XmlRootElement;\nimport java.util.ArrayList;\nimport java.util.List;\n\n@XmlRootElement(name = \"Pet\")\npublic class Pet {\n    private long id;\n    private Category category;\n    private String name;\n    private List<String> photoUrls = new ArrayList<String>();\n    private List<Tag> tags = new ArrayList<Tag>();\n    private String status;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"category\")\n    public Category getCategory() {\n        return category;\n    }\n\n    public void setCategory(Category category) {\n        this.category = category;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    @XmlElementWrapper(name = \"photoUrls\")\n    @XmlElement(name = \"photoUrl\")\n    public List<String> getPhotoUrls() {\n        return photoUrls;\n    }\n\n    public void setPhotoUrls(List<String> photoUrls) {\n        this.photoUrls = photoUrls;\n    }\n\n    @XmlElementWrapper(name = \"tags\")\n    @XmlElement(name = \"tag\")\n    public List<Tag> getTags() {\n        return tags;\n    }\n\n    public void setTags(List<Tag> tags) {\n        this.tags = tags;\n    }\n\n    @XmlElement(name = \"status\")\n    @Schema(description = \"pet status in the store\", allowableValues = \"available,pending,sold\")\n    public String getStatus() {\n        return status;\n    }\n\n    public void setStatus(String status) {\n        this.status = status;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/Tag.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Tag\")\npublic class Tag {\n    private long id;\n    private String name;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/User.java",
    "content": "package io.swagger.v3.jaxrs2.resources.model;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"User\")\npublic class User {\n    private long id;\n    private String username;\n    private String firstName;\n    private String lastName;\n    private String email;\n    private String password;\n    private String phone;\n    private int userStatus;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"firstName\")\n    public String getFirstName() {\n        return firstName;\n    }\n\n    public void setFirstName(String firstName) {\n        this.firstName = firstName;\n    }\n\n    @XmlElement(name = \"username\")\n    public String getUsername() {\n        return username;\n    }\n\n    public void setUsername(String username) {\n        this.username = username;\n    }\n\n    @XmlElement(name = \"lastName\")\n    public String getLastName() {\n        return lastName;\n    }\n\n    public void setLastName(String lastName) {\n        this.lastName = lastName;\n    }\n\n    @XmlElement(name = \"email\")\n    public String getEmail() {\n        return email;\n    }\n\n    public void setEmail(String email) {\n        this.email = email;\n    }\n\n    @XmlElement(name = \"password\")\n    public String getPassword() {\n        return password;\n    }\n\n    public void setPassword(String password) {\n        this.password = password;\n    }\n\n    @XmlElement(name = \"phone\")\n    public String getPhone() {\n        return phone;\n    }\n\n    public void setPhone(String phone) {\n        this.phone = phone;\n    }\n\n    @XmlElement(name = \"userStatus\")\n    @Schema(description = \"User Status\") //, allowableValues = {\"1\",\"2\",\"3\"})\n    public int getUserStatus() {\n        return userStatus;\n    }\n\n    public void setUserStatus(int userStatus) {\n        this.userStatus = userStatus;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/rs/AbstractEntityRestService.java",
    "content": "package io.swagger.v3.jaxrs2.resources.rs;\n\npublic abstract class AbstractEntityRestService<DTO extends PersistentDTO> implements EntityRestService<DTO> {\n\n    public DTO create(DTO object) throws Exception {\n        return null;\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/rs/EntityRestService.java",
    "content": "package io.swagger.v3.jaxrs2.resources.rs;\r\n\r\nimport javax.ws.rs.POST;\r\nimport javax.ws.rs.Path;\r\n\r\npublic interface EntityRestService<DTO> {\r\n\r\n    @POST\r\n    @Path(\"/\")\r\n    public DTO create(DTO object) throws Exception;\r\n\r\n\r\n}\r\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/rs/PersistentDTO.java",
    "content": "package io.swagger.v3.jaxrs2.resources.rs;\r\n\r\npublic class PersistentDTO {\r\n\r\n    private String guid;\r\n\r\n    public void setGuid(String guid) {\r\n        this.guid = guid;\r\n    }\r\n\r\n    public String getGuid() {\r\n        return guid;\r\n    }\r\n\r\n\r\n}\r\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/rs/ProcessTokenDTO.java",
    "content": "package io.swagger.v3.jaxrs2.resources.rs;\n\npublic class ProcessTokenDTO extends PersistentDTO {\n\n    private String name;\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/rs/ProcessTokenRestService.java",
    "content": "package io.swagger.v3.jaxrs2.resources.rs;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\n\n@Path(\"token\")\n@Consumes(MediaType.APPLICATION_JSON)\n@Produces(MediaType.APPLICATION_JSON)\npublic class ProcessTokenRestService extends AbstractEntityRestService<ProcessTokenDTO> {\n\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/siblings/Category.java",
    "content": "package io.swagger.v3.jaxrs2.resources.siblings;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(description = \"parent\")\npublic class Category {\n    private long id;\n\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/siblings/Pet.java",
    "content": "package io.swagger.v3.jaxrs2.resources.siblings;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(description = \"Pet\")\npublic class Pet {\n    private Category category;\n\n    @Schema(description = \"child\")\n    public Category getCategory() {\n        return category;\n    }\n\n    public void setCategory(Category category) {\n        this.category = category;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/siblings/PetSimple.java",
    "content": "package io.swagger.v3.jaxrs2.resources.siblings;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\n@Schema(description = \"Pet\")\npublic class PetSimple {\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ticket3624/Service.java",
    "content": "package io.swagger.v3.jaxrs2.resources.ticket3624;\n\nimport io.swagger.v3.jaxrs2.resources.ticket3624.model.ByIdResponse;\nimport io.swagger.v3.jaxrs2.resources.ticket3624.model.ContainerizedResponse;\nimport io.swagger.v3.jaxrs2.resources.ticket3624.model.Response;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\n\n@Tag(name = \"ExampleService\")\n@Produces(MediaType.APPLICATION_JSON)\n@Consumes(MediaType.APPLICATION_JSON)\n@Path(Service.ROOT_PATH)\npublic interface Service {\n    String ROOT_PATH = \"/example\";\n\n    @GET\n    @Path(\"/model\")\n    @Operation(summary = \" Retrieve models for display to the user\")\n    Response getModels();\n\n\n    @GET\n    @Path(\"/model/by/ids\")\n    @Operation(summary = \" Retrieve models by their ids\")\n    ByIdResponse getModelsById();\n\n    @GET\n    @Path(\"/containerized/model\")\n    @Operation(summary = \" Retrieve review insights for a specific product\")\n    ContainerizedResponse getContainerizedModels();\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ticket3624/model/ByIdResponse.java",
    "content": "package io.swagger.v3.jaxrs2.resources.ticket3624.model;\n\nimport java.util.Map;\n\npublic abstract class ByIdResponse {\n    public abstract Map<Integer, Model> getModelsById();\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ticket3624/model/ContainerizedResponse.java",
    "content": "package io.swagger.v3.jaxrs2.resources.ticket3624.model;\n\nimport java.util.List;\n\npublic abstract class ContainerizedResponse {\n    public abstract List<ModelContainer> getContainerizedModels();\n    public abstract int getTotalCount();\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ticket3624/model/Model.java",
    "content": "package io.swagger.v3.jaxrs2.resources.ticket3624.model;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport java.util.Optional;\n\n\npublic abstract class Model {\n    // this is the ID of the review\n    public abstract int getId();\n\n    public abstract String getText();\n\n    public abstract String getTitle();\n\n    public abstract boolean isActive();\n\n    public abstract Optional<String> getOptionalString();\n\n    public abstract Optional<Model> getParent();\n\n    @Schema\n    public abstract Optional<Model> getSchemaParent();\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ticket3624/model/ModelContainer.java",
    "content": "package io.swagger.v3.jaxrs2.resources.ticket3624.model;\n\n\nimport java.util.Optional;\n\n\npublic abstract class ModelContainer {\n    public abstract Optional<Model> getModel();\n    public abstract int getId();\n    public abstract String getText();\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ticket3624/model/Response.java",
    "content": "package io.swagger.v3.jaxrs2.resources.ticket3624.model;\n\nimport java.util.List;\n\npublic abstract class Response {\n    public abstract List<Model> getModels();\n\n    public abstract int getCount();\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/schemaResolution/SchemaResolutionAnnotatedResource.java",
    "content": "package io.swagger.v3.jaxrs2.schemaResolution;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@Path(\"test\")\npublic class SchemaResolutionAnnotatedResource {\n\n    @GET\n    @Path(\"/inlineSchemaSecond\")\n    public InlineSchemaSecond inlineSchemaSecond(@Schema(description = \"InlineSchemaSecond API\", schemaResolution = Schema.SchemaResolution.INLINE) InlineSchemaSecond inlineSchemaSecond) {\n        return null;\n    }\n    @GET\n    @Path(\"/inlineSchemaFirst\")\n    public InlineSchemaFirst inlineSchemaFirst() {\n        return null;\n    }\n\n\n    static class InlineSchemaFirst {\n\n        // public String foo;\n\n        @Schema(description = \"InlineSchemaFirst property 1\", nullable = true, schemaResolution = Schema.SchemaResolution.ALL_OF_REF)\n        public InlineSchemaPropertyFirst property1;\n\n\n        private InlineSchemaPropertyFirst property2;\n\n        @Schema(description = \" InlineSchemaFirst property 2\", example = \"example 2\", schemaResolution = Schema.SchemaResolution.INLINE)\n        public InlineSchemaPropertyFirst getProperty2() {\n            return null;\n        }\n    }\n\n    static class InlineSchemaSecond {\n\n        public String foo;\n\n        @Schema(description = \"InlineSchemaSecond property 1\", nullable = true)\n        public InlineSchemaPropertySecond propertySecond1;\n\n\n        private InlineSchemaPropertyFirst property2;\n\n        @Schema(description = \"InlineSchemaSecond property 2\", example = \"InlineSchemaSecond example 2\")\n        public InlineSchemaPropertyFirst getProperty2() {\n            return null;\n        }\n    }\n\n    @Schema(description = \"property\", example = \"example\")\n    static class InlineSchemaPropertyFirst {\n        public String bar;\n    }\n\n    @Schema(description = \"propertysecond\", example = \"examplesecond\")\n    static class InlineSchemaPropertySecond {\n        public InlineSchemaSimple bar;\n    }\n\n    static class InlineSchemaSimple {\n\n        @Schema(description = \"property 1\", schemaResolution = Schema.SchemaResolution.INLINE)\n        public InlineSchemaPropertySimple property1;\n\n\n        private InlineSchemaPropertySimple property2;\n\n        @Schema(description = \"property 2\", example = \"example\", schemaResolution = Schema.SchemaResolution.ALL_OF_REF)\n        public InlineSchemaPropertySimple getProperty2() {\n            return null;\n        }\n    }\n\n    @Schema(description = \"property\")\n    static class InlineSchemaPropertySimple {\n        public String bar;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/schemaResolution/SchemaResolutionAnnotatedSimpleResource.java",
    "content": "package io.swagger.v3.jaxrs2.schemaResolution;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@Path(\"test\")\npublic class SchemaResolutionAnnotatedSimpleResource {\n\n    @GET\n    @Path(\"/inlineSchemaFirst\")\n    public InlineSchemaFirst inlineSchemaFirst() {\n        return null;\n    }\n\n\n    static class InlineSchemaFirst {\n\n        private InlineSchemaPropertyFirst property2;\n\n        @Schema(description = \" InlineSchemaFirst property 2\", example = \"example 2\", schemaResolution = Schema.SchemaResolution.INLINE)\n        public InlineSchemaPropertyFirst getProperty2() {\n            return null;\n        }\n    }\n\n    @Schema(description = \"property\", example = \"example\")\n    static class InlineSchemaPropertyFirst {\n        // public String bar;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/schemaResolution/SchemaResolutionResource.java",
    "content": "package io.swagger.v3.jaxrs2.schemaResolution;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n@Path(\"test\")\npublic class SchemaResolutionResource {\n\n    @GET\n    @Path(\"/inlineSchemaSecond\")\n    public InlineSchemaSecond inlineSchemaSecond(@Schema(description = \"InlineSchemaSecond API\") InlineSchemaSecond inlineSchemaSecond) {\n        return null;\n    }\n    @GET\n    @Path(\"/inlineSchemaFirst\")\n    public InlineSchemaFirst inlineSchemaFirst() {\n        return null;\n    }\n\n\n    static class InlineSchemaFirst {\n\n        // public String foo;\n\n        @Schema(description = \"InlineSchemaFirst property 1\", nullable = true)\n        public InlineSchemaPropertyFirst property1;\n\n\n        private InlineSchemaPropertyFirst property2;\n\n        @Schema(description = \" InlineSchemaFirst property 2\", example = \"example 2\")\n        public InlineSchemaPropertyFirst getProperty2() {\n            return null;\n        }\n    }\n\n    static class InlineSchemaSecond {\n\n        public String foo;\n\n        @Schema(description = \"InlineSchemaSecond property 1\", nullable = true)\n        public InlineSchemaPropertySecond propertySecond1;\n\n\n        private InlineSchemaPropertyFirst property2;\n\n        @Schema(description = \"InlineSchemaSecond property 2\", example = \"InlineSchemaSecond example 2\")\n        public InlineSchemaPropertyFirst getProperty2() {\n            return null;\n        }\n    }\n\n    @Schema(description = \"property\", example = \"example\")\n    static class InlineSchemaPropertyFirst {\n        public String bar;\n    }\n\n    @Schema(description = \"propertysecond\", example = \"examplesecond\")\n    static class InlineSchemaPropertySecond {\n        public InlineSchemaSimple bar;\n    }\n\n    static class InlineSchemaSimple {\n\n        @Schema(description = \"property 1\")\n        public InlineSchemaPropertySimple property1;\n\n\n        private InlineSchemaPropertySimple property2;\n\n        @Schema(description = \"property 2\", example = \"example\")\n        public InlineSchemaPropertySimple getProperty2() {\n            return null;\n        }\n    }\n\n    @Schema(description = \"property\")\n    static class InlineSchemaPropertySimple {\n        public String bar;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/schemaResolution/SchemaResolutionResourceSimple.java",
    "content": "package io.swagger.v3.jaxrs2.schemaResolution;\n\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n@Path(\"test\")\npublic class SchemaResolutionResourceSimple {\n\n\n    @GET\n    @Path(\"/inlineSchemaFirst\")\n    @ApiResponse(description = \"InlineSchemaFirst Response API\", content = @Content(schema = @Schema(implementation = InlineSchemaFirst.class)))\n    public Response inlineSchemaFirst() {\n        return null;\n    }\n\n\n    @GET\n    @Path(\"/inlineSchemaSecond\")\n    public void inlineSchemaFirst(@Schema(description = \"InlineSchemaSecond API\") InlineSchemaFirst inlineSchemaFirst) {\n    }\n\n\n\n    static class InlineSchemaFirst {\n\n        // public String foo;\n\n        @Schema(description = \"InlineSchemaFirst property 1\", nullable = true)\n        public InlineSchemaPropertyFirst property1;\n    }\n\n    @Schema(description = \"property\", example = \"example\")\n    static class InlineSchemaPropertyFirst {\n        public String bar;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/util/ServletUtilsTest.java",
    "content": "package io.swagger.v3.jaxrs2.util;\n\nimport org.testng.annotations.Test;\n\nimport javax.ws.rs.core.MultivaluedHashMap;\nimport java.net.URLEncoder;\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport static java.nio.charset.StandardCharsets.UTF_8;\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertTrue;\nimport static org.testng.Assert.assertNotNull;\n\npublic class ServletUtilsTest {\n\n    @Test(description = \"convert query parameters to multivaluedmap\")\n    public void convertWithRightOutputSize() throws Exception {\n\n        Map<String, String[]> params = new HashMap<>();\n        params.put(\"key1\", new String[]{\"value1\", \"value2\"});\n        params.put(\"key2\", new String[]{\"value2\", \"value3\", \"value4\", \"value4\"});\n\n        MultivaluedHashMap<String, String> multivaluedMap = ServletUtils.getQueryParams(params);\n        assertEquals(multivaluedMap.size(), 2);\n        assertEquals(multivaluedMap.get(\"key1\").size(), 2);\n        assertEquals(multivaluedMap.get(\"key2\").size(), 4);\n        assertTrue(multivaluedMap.containsKey(\"key1\"));\n        assertTrue(multivaluedMap.containsKey(\"key2\"));\n    }\n\n    @Test(description = \"convert query parameters to multivaluedmap with decoded values\")\n    public void convertWithDecodedValues() throws Exception {\n\n        Map<String, String[]> params = new HashMap<>();\n        params.put(URLEncoder.encode(\"key1&\", UTF_8.name()), new String[]{\"value1\", URLEncoder.encode(\"value2?\", UTF_8.name())});\n        params.put(\"key2\", new String[]{URLEncoder.encode(\"value2\", UTF_8.name()), \"value3\", \"value4\", \"value4\"});\n        assertEquals(params.get(\"key1%26\"), new String[]{\"value1\", \"value2%3F\"});\n\n        MultivaluedHashMap<String, String> multivaluedHashMap = ServletUtils.getQueryParams(params);\n        assertEquals(multivaluedHashMap.size(), 2);\n        assertNotNull(multivaluedHashMap.get(\"key1&\"));\n        assertEquals(multivaluedHashMap.get(\"key1&\").size(), 2);\n        assertEquals(multivaluedHashMap.get(\"key1&\"), Arrays.asList(\"value1\", \"value2?\"));\n        assertEquals(multivaluedHashMap.get(\"key2\"), Arrays.asList(\"value2\", \"value3\", \"value4\", \"value4\"));\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/java/org/my/project/resources/ResourceInPackageB.java",
    "content": "package org.my.project.resources;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport java.util.ArrayList;\n\n@Path(\"/packageB\")\npublic class ResourceInPackageB {\n    @Operation(operationId = \"test.\")\n    @GET\n    public void getTest(@Parameter(name = \"test\") ArrayList<String> tenantId) {\n        return;\n    }\n}"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/BinaryParameterResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /binary:\n    post:\n      summary: Create new item\n      description: Post operation with entity in a body\n      operationId: createItem\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/Item\"\n        required: true\n      responses:\n        \"201\":\n          headers:\n            Location:\n              style: simple\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Item\"\ncomponents:\n  schemas:\n    Item:\n      type: object\n      properties:\n        name:\n          type: string\n        value:\n          type: string\n        bytes:\n          type: string\n          format: byte\n          example: Ynl0ZQ==\n        binary:\n          type: string\n          format: binary\n          example: YmluYXJ5\n        byteNoAnnotation:\n          type: string\n          format: byte\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/examples/AnnotatedModelAndContentExample.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /test:\n    post:\n      operationId: testAnnotatedModel\n      requestBody:\n        description: Created user object\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/AnnotatedSubscription\"\n            examples:\n              Default Request 2:\n                summary: Subscription  Example 2\n                description: Default Request 2\n                value:\n                  subscriptionId: \"12\"\n                  subscriptionItem:\n                    subscriptionItemId: \"22\"\n              Default Request:\n                summary: Subscription  Example\n                description: Default Request\n                value:\n                  subscriptionId: \"1\"\n                  subscriptionItem:\n                    subscriptionItemId: \"2\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/AnnotatedSubscription\"\ncomponents:\n  schemas:\n    AnnotatedSubscriptionItem:\n      type: object\n      properties:\n        subscriptionItemId:\n          type: string\n      example:\n        subscriptionItemId: \"1\"\n    AnnotatedSubscription:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n        subscriptionItem:\n          $ref: \"#/components/schemas/AnnotatedSubscriptionItem\"\n      example:\n        subscriptionId: \"1\"\n        subscriptionItem:\n          subscriptionItemId: \"2\"\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/examples/AnnotatedModelExample.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /test:\n    post:\n      operationId: testAnnotatedModel\n      requestBody:\n        description: Created user object\n        content:\n          '*/*':\n            schema:\n              $ref: \"#/components/schemas/AnnotatedSubscription\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/AnnotatedSubscription\"\ncomponents:\n  schemas:\n    AnnotatedSubscriptionItem:\n      type: object\n      properties:\n        subscriptionItemId:\n          type: string\n      example:\n        subscriptionItemId: \"1\"\n    AnnotatedSubscription:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n        subscriptionItem:\n          $ref: \"#/components/schemas/AnnotatedSubscriptionItem\"\n      example:\n        subscriptionId: \"1\"\n        subscriptionItem:\n          subscriptionItemId: \"2\"\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/examples/ParameterExample.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /test:\n    post:\n      operationId: testRequestBody\n      parameters:\n      - in: query\n        description: subscription param\n        required: true\n        examples:\n          ex 2:\n            description: ex 2\n            value:\n              subscriptionId: \"12\"\n              subscriptionItem:\n                subscriptionItemId: \"22\"\n          ex 1:\n            description: ex 1\n            value:\n              subscriptionId: \"1\"\n              subscriptionItem:\n                subscriptionItemId: \"2\"\n        example: 1\n        content:\n          application/json:\n            schema:\n              type: string\n              description: the Sub\n              readOnly: true\n              example: Schema example\n            examples:\n              Default Request:\n                summary: Subscription  Example\n                description: Subscription Example Description\n                value:\n                  subscriptionId: \"1\"\n                  subscriptionItem:\n                    subscriptionItemId: \"2\"\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Subscription\"\ncomponents:\n  schemas:\n    SubscriptionItem:\n      type: object\n      properties:\n        subscriptionItemId:\n          type: string\n    Subscription:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n        subscriptionItem:\n          $ref: \"#/components/schemas/SubscriptionItem\"\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/examples/RequestBodyContentExample.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /test:\n    post:\n      operationId: testRequestBody\n      requestBody:\n        description: Created user object\n        content:\n          '*/*':\n            schema:\n              $ref: \"#/components/schemas/Subscription\"\n            examples:\n              Default Request:\n                summary: Subscription  Example\n                description: Default Request\n                value:\n                  subscriptionId: \"1\"\n                  subscriptionItem:\n                    subscriptionItemId: \"2\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Subscription\"\ncomponents:\n  schemas:\n    SubscriptionItem:\n      type: object\n      properties:\n        subscriptionItemId:\n          type: string\n    Subscription:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n        subscriptionItem:\n          $ref: \"#/components/schemas/SubscriptionItem\""
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/examples/RequestBodyContentExampleWithConsumes.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /test:\n    post:\n      operationId: testRequestBody\n      requestBody:\n        description: Created user object\n        content:\n          'application/json':\n            schema:\n              $ref: \"#/components/schemas/Subscription\"\n            examples:\n              Default Request:\n                summary: Subscription  Example\n                description: Default Request\n                value:\n                  subscriptionId: \"1\"\n                  subscriptionItem:\n                    subscriptionItemId: \"2\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Subscription\"\ncomponents:\n  schemas:\n    SubscriptionItem:\n      type: object\n      properties:\n        subscriptionItemId:\n          type: string\n    Subscription:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n        subscriptionItem:\n          $ref: \"#/components/schemas/SubscriptionItem\""
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/examples/RequestBodyContentExampleWithMediatype.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /test:\n    post:\n      operationId: testRequestBody\n      requestBody:\n        description: Created user object\n        content:\n          'application/json':\n            schema:\n              $ref: \"#/components/schemas/Subscription\"\n            examples:\n              Default Request:\n                summary: Subscription  Example\n                description: Default Request\n                value:\n                  subscriptionId: \"1\"\n                  subscriptionItem:\n                    subscriptionItemId: \"2\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Subscription\"\ncomponents:\n  schemas:\n    SubscriptionItem:\n      type: object\n      properties:\n        subscriptionItemId:\n          type: string\n    Subscription:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n        subscriptionItem:\n          $ref: \"#/components/schemas/SubscriptionItem\""
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/examples/RequestBodyContentExampleWithSchema.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /test:\n    post:\n      operationId: testRequestBody\n      requestBody:\n        description: Created user object\n        content:\n          '*/*':\n            schema:\n              type: string\n              description: the Sub\n              readOnly: true\n              example: Schema example\n            examples:\n              Default Request:\n                summary: Subscription  Example\n                description: Default Request\n                value: 3\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Subscription\"\ncomponents:\n  schemas:\n    SubscriptionItem:\n      type: object\n      properties:\n        subscriptionItemId:\n          type: string\n    Subscription:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n        subscriptionItem:\n          $ref: \"#/components/schemas/SubscriptionItem\"\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/examples/RequestBodyContentExampleWithSchemaImplementation.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /test:\n    post:\n      operationId: testRequestBody\n      requestBody:\n        description: Created user object\n        content:\n          '*/*':\n            schema:\n              $ref: \"#/components/schemas/Subscription\"\n            examples:\n              Default Request:\n                summary: Subscription  Example\n                description: Default Request\n                value:\n                  subscriptionId: \"1\"\n                  subscriptionItem:\n                    subscriptionItemId: \"2\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Subscription\"\ncomponents:\n  schemas:\n    SubscriptionItem:\n      type: object\n      properties:\n        subscriptionItemId:\n          type: string\n    Subscription:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n        subscriptionItem:\n          $ref: \"#/components/schemas/SubscriptionItem\""
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/examples/ResponseExample.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /test:\n    post:\n      description: subscribes a client to updates relevant to the requestor's account,\n        as identified by the input token.  The supplied url will be used as the delivery\n        address for response payloads\n      operationId: subscribe\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/SubscriptionResponse\"\n              examples:\n                Default Response:\n                  summary: Subscription Response Example\n                  description: Default Response\n                  value:\n                    subscriptionId: \"1\"\n                    subscriptionItem:\n                      subscriptionItemId: \"2\"\ncomponents:\n  schemas:\n    SubscriptionResponse:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/examples/ResponseExampleSchema.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /test:\n    post:\n      description: subscribes a client to updates relevant to the requestor's account,\n        as identified by the input token.  The supplied url will be used as the delivery\n        address for response payloads\n      operationId: subscribe\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                type: string\n                description: the generated UUID\n                format: uuid\n                readOnly: true\n                example: Schema example\n              examples:\n                Default Response:\n                  summary: Subscription Response Example\n                  description: Default Response\n                  value: SubscriptionResponse\ncomponents:\n  schemas:\n    SubscriptionResponse:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/examples/ResponseExampleSchemaImplementation.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /test:\n    post:\n      description: subscribes a client to updates relevant to the requestor's account,\n        as identified by the input token.  The supplied url will be used as the delivery\n        address for response payloads\n      operationId: subscribe\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Subscription\"\n              examples:\n                Default Response:\n                  summary: Subscription Response Example\n                  description: Default Response\n                  value:\n                    subscriptionId: \"1\"\n                    subscriptionItem:\n                      subscriptionItemId: \"2\"\ncomponents:\n  schemas:\n    SubscriptionItem:\n      type: object\n      properties:\n        subscriptionItemId:\n          type: string\n    SubscriptionResponse:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n    Subscription:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n        subscriptionItem:\n          $ref: \"#/components/schemas/SubscriptionItem\"\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/integration/openapi-configuration.json",
    "content": "{\n    \"resourcePackages\": [\n        \"com.my.project.resources\",\n        \"org.my.project.resources\"\n    ],\n    \"openAPI\": {\n        \"info\": {\n            \"version\": \"1.0\",\n            \"title\": \"Swagger Pet Sample App\",\n            \"description\": \"This is a TEST AAsample server Petstore server.  You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).  For this sample, you can use the api key `special-key` to test the authorization filters.\",\n            \"termsOfService\": \"http://swagger.io/terms/\",\n            \"contact\": {\n                \"email\": \"apiteam@swagger.io\"\n            },\n            \"license\": {\n                \"name\": \"Apache 2.0\",\n                \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/logback-test.xml",
    "content": "<configuration debug=\"false\" scan=\"false\" scanPeriod=\"10 seconds\">\n    <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleAppender\">\n        <filter class=\"ch.qos.logback.classic.filter.ThresholdFilter\">\n            <level>ERROR</level>\n        </filter>\n        <encoder>\n            <pattern>%d [%thread]%level %logger - %msg%n</pattern>\n        </encoder>\n    </appender>\n\n    <root level=\"INFO\">\n        <appender-ref ref=\"STDOUT\"/>\n    </root>\n</configuration>"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/EmptyPetResource.yaml",
    "content": "openapi: 3.0.1\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/FullPetResource.yaml",
    "content": "openapi: 3.0.1\ninfo:\n  title: Pet Resource Example\n  description: API Definition\n  termsOfService: Terms of service\n  contact:\n    name: Fred\n    url: http://gigantic-server.com\n    email: Fred@gigagantic-server.com\n  license:\n    name: Apache 2.0\n    url: http://foo.bar\n  version: \"2.0\"\nexternalDocs:\n  description: definition docs desc\nservers:\n- url: http://foo\n  description: server 1\nsecurity:\n- req 1:\n  - a\n  - b\n- req 2:\n  - b\n  - c\ntags:\n- name: Tag 1\n  description: desc 1\n  externalDocs:\n    description: docs desc\n- name: Tag 2\n  description: desc 2\n  externalDocs:\n    description: docs desc 2\n- name: Tag 3\n- name: Definition First Tag\n- name: Definition Second Tag full\n  description: desc definition\n- name: Fourth Tag Full\n  description: desc\n  externalDocs:\n    description: docs desc\n- name: Fifth Tag Full\n  description: desc class\n  externalDocs:\n    description: docs desc class\npaths:\n  /pet:\n    put:\n      summary: Update an existing pet\n      operationId: updatePet\n      requestBody:\n        description: Pet object that needs to be added to the store\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/Pet\"\n        required: true\n      responses:\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n        \"405\":\n          description: Validation exception\n    post:\n      summary: Add a new pet to the store\n      operationId: addPet\n      requestBody:\n        description: Pet object that needs to be added to the store\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/Pet\"\n          application/xml:\n            schema:\n              $ref: \"#/components/schemas/Pet\"\n        required: true\n      responses:\n        \"405\":\n          description: Invalid input\n  /pet/bodyid:\n    post:\n      summary: Add a new pet to the store passing an integer with generic parameter\n        annotation\n      operationId: addPetByInteger\n      requestBody:\n        description: Pet object that needs to be added to the store\n        content:\n          application/json:\n            schema:\n              type: integer\n              format: int32\n          application/xml:\n            schema:\n              type: integer\n              format: int32\n        required: true\n      responses:\n        \"405\":\n          description: Invalid input\n  /pet/bodyidnoannotation:\n    post:\n      summary: Add a new pet to the store passing an integer without parameter annotation\n      operationId: addPetByIntegerNoAnnotation\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: integer\n              format: int32\n          application/xml:\n            schema:\n              type: integer\n              format: int32\n      responses:\n        \"405\":\n          description: Invalid input\n  /pet/bodynoannotation:\n    post:\n      summary: Add a new pet to the store no annotation\n      operationId: addPetNoAnnotation\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/Pet\"\n          application/xml:\n            schema:\n              $ref: \"#/components/schemas/Pet\"\n      responses:\n        \"405\":\n          description: Invalid input\n  /pet/findByStatus:\n    get:\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        schema:\n          type: string\n      - name: skip\n        in: query\n        schema:\n          type: integer\n          format: int32\n      - name: limit\n        in: query\n        schema:\n          type: integer\n          format: int32\n      responses:\n        default:\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid status value\n  /pet/findByTags:\n    get:\n      summary: Finds Pets by tags\n      description: \"Multiple tags can be provided with comma separated strings. Use\\\n        \\ tag1, tag2, tag3 for testing.\"\n      operationId: findPetsByTags\n      parameters:\n      - name: tags\n        in: query\n        description: Tags to filter by\n        required: true\n        schema:\n          type: string\n      responses:\n        default:\n          description: Pets matching criteria\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid tag value\n      deprecated: true\n  /pet/{petId}:\n    get:\n      summary: Find pet by ID\n      description: Returns a pet when 0 < ID <= 10.  ID > 10 or nonintegers will simulate\n        API error conditions\n      operationId: getPetById\n      parameters:\n      - name: petId\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      responses:\n        default:\n          description: The pet\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  /complexcallback:\n    get:\n      summary: Simple get operation\n      operationId: getWithNoParameters_1\n      parameters:\n      - name: id\n        in: query\n        description: idParam\n        schema:\n          $ref: \"#/components/schemas/User\"\n      responses:\n        \"200\":\n          description: voila!\n      callbacks:\n        testCallback1:\n          http://www.url.com:\n            get:\n              summary: get all the reviews\n              operationId: getAllReviews\n              responses:\n                \"200\":\n                  description: successful operation\n                  content:\n                    application/json:\n                      schema:\n                        type: integer\n                        format: int32\n        testCallback2:\n          http://www.url2.com:\n            get:\n              summary: get a review\n              operationId: getAnSpecificReviews\n              responses:\n                \"200\":\n                  description: successful operation\n                  content:\n                    application/json:\n                      schema:\n                        $ref: \"#/components/schemas/User\"\n  /multiplecallback:\n    get:\n      summary: Simple get operation\n      operationId: getWithNoParameters\n      responses:\n        \"200\":\n          description: voila!\n      callbacks:\n        testCallback1:\n          http://www.url.com:\n            get:\n              summary: get all the reviews\n              operationId: getAllReviews\n              responses:\n                \"200\":\n                  description: successful operation\n                  content:\n                    application/json:\n                      schema:\n                        type: integer\n                        format: int32\n        testCallback2:\n          http://$request.query.url: {}\n  /repeatablecallback:\n    get:\n      summary: Simple get operation\n      operationId: getWithNoParameters_2\n      responses:\n        \"200\":\n          description: voila!\n      callbacks:\n        testCallback:\n          http://$requests.query.url: {}\n        testCallback1:\n          http://www.url.com:\n            get:\n              summary: get all the reviews\n              operationId: getAllReviews\n              responses:\n                \"200\":\n                  description: successful operation\n                  content:\n                    application/json:\n                      schema:\n                        type: integer\n                        format: int32\n        testCallback2:\n          http://$request.query.url: {}\n  /simplecallback:\n    get:\n      summary: Simple get operation\n      operationId: getWithNoParameters_3\n      responses:\n        \"200\":\n          description: voila!\n      callbacks:\n        testCallback1:\n          http://www.url.com:\n            get:\n              summary: get all the reviews\n              operationId: getAllReviews\n              responses:\n                \"200\":\n                  description: successful operation\n                  content:\n                    application/json:\n                      schema:\n                        type: integer\n                        format: int32\n  /example:\n    post:\n      description: subscribes a client to updates relevant to the requestor's account\n      operationId: subscribe\n      parameters:\n      - name: subscriptionId\n        in: path\n        required: true\n        style: simple\n        schema:\n          type: string\n          description: Schema\n          example: Subscription example\n        examples:\n          subscriptionId_1:\n            summary: Subscription number 12345\n            description: subscriptionId_1\n            value: 12345\n            externalValue: Subscription external value 1\n          subscriptionId_2:\n            summary: Subscription number 54321\n            description: subscriptionId_2\n            value: 54321\n            externalValue: Subscription external value 2\n        example: example\n      requestBody:\n        description: Created user object\n        content:\n          '*/*':\n            schema:\n              type: string\n              description: the generated UUID\n              format: uuid\n              readOnly: true\n              example: Schema example\n            examples:\n              Default Request:\n                summary: Subscription Request Example\n                description: Default Request\n                value: SubscriptionRequest\n                externalValue: Subscription Request Value\n        required: true\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                type: string\n                description: the generated UUID\n                format: uuid\n                readOnly: true\n                example: Schema example\n              examples:\n                Default Response:\n                  summary: Subscription Response Example\n                  description: Default Response\n                  value: SubscriptionResponse\n                  externalValue: Subscription Response value 1\n  /links:\n    get:\n      operationId: getUserWithAddress_1\n      parameters:\n      - name: userId\n        in: query\n        schema:\n          type: string\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\n          links:\n            address:\n              operationId: getAddress\n              parameters:\n                userId: $request.query.userId\n            user:\n              operationId: getUser\n              parameters:\n                userId: $request.query.userId\n  /sameOperationName:\n    get:\n      description: Same Operation Name\n      operationId: getUser\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n    delete:\n      description: Same Operation Name Duplicated\n      operationId: getUser_1\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n  /{petId}:\n    get:\n      summary: Find pet by ID\n      description: Returns a pet when 0 < ID <= 10.  ID > 10 or non integers will\n        simulate API error conditions\n      externalDocs:\n        description: External Annotation Documentation\n        url: http://url.me\n      operationId: petId\n      parameters:\n      - name: petId\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      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /fullyannotatedoperation/{petId}:\n    get:\n      summary: Find pet by ID\n      description: Returns a pet when 0 < ID <= 10.  ID > 10 or non integers will\n        simulate API error conditions\n      operationId: petId_1\n      parameters:\n      - name: petId\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      responses:\n        default:\n          description: The pet\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n  /interfaceoperation/{petId}:\n    get:\n      summary: Find pet by ID Operation in SubResource\n      description: Returns a pet in SubResource\n      operationId: getPetById_1\n      parameters:\n      - name: petId\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      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /notannotatedoperation:\n    get:\n      operationId: getUser_2\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n  /notannotatedoperationduplicated:\n    get:\n      operationId: getUser_3\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n  /operationsresource:\n    get:\n      summary: Find pet by ID\n      description: \"combinatedfullyannotatedoperation/{petId}\"\n      operationId: petId_2\n      parameters:\n      - name: petId\n        in: query\n        description: ID of pet that needs to be fetched\n        required: true\n        schema:\n          type: integer\n          format: int64\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: The pet\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n    put:\n      description: combinatedsameOperationName\n      operationId: combinated sameOperationName\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n    post:\n      operationId: getUser_5\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n    head:\n      description: combinatedsameOperationNameDuplicated\n      operationId: combinatedsameOperationNameDuplicated\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n  /operationsresource2:\n    get:\n      operationId: getUser_4\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n  /operationwithouannotation:\n    get:\n      operationId: getUser_6\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n  /serversoperation:\n    get:\n      description: Pets Example\n      operationId: Pets\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n      servers:\n      - url: http://foo2\n        description: server 2\n  /arrayschema:\n    post:\n      description: \"subscribes a client to updates relevant to the requestor's account,\\\n        \\ as identified by the input token.  The supplied url will be used as the\\\n        \\ delivery address for response payloads\"\n      operationId: subscribe_1\n      parameters:\n      - name: arrayParameter\n        in: query\n        required: true\n        explode: true\n        schema:\n          maxItems: 10\n          minItems: 1\n          uniqueItems: true\n          type: array\n          items:\n            $ref: \"#/components/schemas/SubscriptionResponse\"\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/SubscriptionResponse\"\n  /complexparameter:\n    get:\n      operationId: create User_1\n      parameters:\n      - name: phone\n        in: path\n        description: Phone\n        required: true\n        schema:\n          type: string\n      - name: id\n        in: query\n        description: idParam\n        schema:\n          type: string\n      - name: lastName\n        in: query\n        schema:\n          type: string\n      - name: address\n        in: query\n        description: address\n        schema:\n          $ref: \"#/components/schemas/User\"\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\n  /multiplenoannotatedparameter:\n    post:\n      operationId: create User\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /openapijaxrsannotatedparameter:\n    get:\n      operationId: create User_2\n      parameters:\n      - name: id\n        in: query\n        description: idParam\n        schema:\n          type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\n  /openapiwithcontentjaxrsannotatedparameter:\n    get:\n      operationId: create User_3\n      parameters:\n      - name: id\n        in: query\n        description: idParam\n        content:\n          '*/*':\n            schema:\n              type: string\n              description: Id Schema Definition\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\n  /openapiwithimplementationjaxrsannotatedparameter:\n    get:\n      operationId: create User_4\n      parameters:\n      - name: id\n        in: query\n        description: idParam\n        schema:\n          $ref: \"#/components/schemas/User\"\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\n  /parameters:\n    post:\n      description: \"subscribes a client to updates relevant to the requestor's account,\\\n        \\ as identified by the input token.  The supplied url will be used as the\\\n        \\ delivery address for response payloads\"\n      operationId: subscribe_3\n      parameters:\n      - name: subscriptionId\n        in: path\n        required: true\n        style: simple\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: formId\n        in: query\n        required: true\n        schema:\n          type: string\n        example: Example\n      - name: explodeFalse\n        in: query\n        required: true\n        explode: false\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: explodeTrue\n        in: query\n        required: true\n        explode: true\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: explodeAvoiding\n        in: query\n        required: true\n        schema:\n          type: string\n          description: the generated id\n          format: id\n          readOnly: true\n      - name: arrayParameter\n        in: query\n        required: true\n        explode: true\n        content:\n          application/json:\n            schema:\n              type: number\n              description: the generated id\n              readOnly: true\n          application/xml:\n            schema:\n              type: number\n              description: the generated id\n              readOnly: true\n      - name: arrayParameterImplementation\n        in: query\n        required: true\n        explode: true\n        schema:\n          maxItems: 10\n          minItems: 1\n          uniqueItems: true\n          type: array\n          items:\n            $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: arrayParameterImplementation2\n        in: query\n        required: true\n        explode: true\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: id\n        in: query\n        description: idParam\n        schema:\n          type: string\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/SubscriptionResponse\"\n  /repeatableparameter:\n    post:\n      description: \"subscribes a client to updates relevant to the requestor's account,\\\n        \\ as identified by the input token.  The supplied url will be used as the\\\n        \\ delivery address for response payloads\"\n      operationId: subscribe_2\n      parameters:\n      - name: subscriptionId\n        in: path\n        required: true\n        style: simple\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: formId\n        in: query\n        required: true\n        schema:\n          type: string\n        example: Example\n      - name: explodeFalse\n        in: query\n        required: true\n        explode: false\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: explodeTrue\n        in: query\n        required: true\n        explode: true\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: explodeAvoiding\n        in: query\n        required: true\n        schema:\n          type: string\n          description: the generated id\n          format: id\n          readOnly: true\n      - name: arrayParameter\n        in: query\n        required: true\n        explode: true\n        content:\n          application/json:\n            schema:\n              type: number\n              description: the generated id\n              readOnly: true\n          application/xml:\n            schema:\n              type: number\n              description: the generated id\n              readOnly: true\n      - name: arrayParameterImplementation\n        in: query\n        required: true\n        explode: true\n        schema:\n          maxItems: 10\n          minItems: 1\n          uniqueItems: true\n          type: array\n          items:\n            $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: arrayParameterImplementation2\n        in: query\n        required: true\n        explode: true\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/SubscriptionResponse\"\n  /singlejaxrsannotatedparameter:\n    get:\n      operationId: create User_5\n      parameters:\n      - name: id\n        in: query\n        schema:\n          type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\n  /singlenoannotatedparameter:\n    get:\n      operationId: create User_6\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\n  /methodWithRequestBodyAndTwoParameters:\n    post:\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: methodWithRequestBodyAndTwoParameters_3\n      parameters:\n      - name: name\n        in: query\n        schema:\n          type: string\n      - name: code\n        in: query\n        schema:\n          type: string\n      requestBody:\n        description: Created user object\n        content:\n          '*/*':\n            schema:\n              $ref: \"#/components/schemas/User\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithRequestBodyWithoutContentWithoutImplementation:\n    get:\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: methodWithRequestBodyWithoutContentWithoutImplementation_1\n      requestBody:\n        description: Created user object\n        content:\n          '*/*':\n            schema:\n              type: string\n              description: User description\n              example: User Description\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /requestbodymethodpriority:\n    post:\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: methodWithRequestBodyAndTwoParameters_1\n      requestBody:\n        description: Created user object on Method\n        content:\n          '*/*':\n            schema:\n              $ref: \"#/components/schemas/User\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /requestbodyparameterpriority:\n    post:\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: methodWithRequestBodyAndTwoParameters_2\n      requestBody:\n        description: Created user object inside Parameter\n        content:\n          '*/*':\n            schema:\n              $ref: \"#/components/schemas/User\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithOneSimpleRequestBody:\n    delete:\n      summary: Delete pet\n      description: Deleting pet.\n      operationId: methodWithOneSimpleRequestBody\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: integer\n              format: int32\n          application/xml:\n            schema:\n              type: integer\n              format: int32\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithRequestBodyWithoutAnnotation:\n    put:\n      summary: Modify user\n      description: Modifying user.\n      operationId: methodWithRequestBodyWithoutAnnotation\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              $ref: \"#/components/schemas/User\"\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithRequestBodyWithoutAnnotationAndTwoConsumes:\n    put:\n      summary: Modify pet\n      description: Modifying pet.\n      operationId: methodWithRequestBodyWithoutAnnotationAndTwoConsumes\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n          application/xml:\n            schema:\n              $ref: \"#/components/schemas/User\"\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithRequestBodyWithoutContent:\n    get:\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: methodWithRequestBodyWithoutContent\n      requestBody:\n        description: Created user object\n        content:\n          '*/*':\n            schema:\n              $ref: \"#/components/schemas/User\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithTwoRequestBodyWithAnnotationAndTwoConsumes:\n    post:\n      summary: Create pet\n      description: Creating pet.\n      operationId: methodWithTwoRequestBodyWithAnnotationAndTwoConsumes\n      requestBody:\n        description: Request Body User\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n          application/xml:\n            schema:\n              $ref: \"#/components/schemas/User\"\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithTwoRequestBodyWithoutAnnotationAndTwoConsumes:\n    post:\n      summary: Create pet\n      description: Creating pet.\n      operationId: methodWithTwoRequestBodyWithoutAnnotationAndTwoConsumes\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/Pet\"\n          application/xml:\n            schema:\n              $ref: \"#/components/schemas/Pet\"\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithoutRequestBodyAndTwoParameters:\n    delete:\n      summary: Delete user\n      description: This can only be done by the logged in user.\n      operationId: methodWithoutRequestBodyAndTwoParameters\n      parameters:\n      - name: name\n        in: query\n        schema:\n          type: string\n      - name: code\n        in: query\n        schema:\n          type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /complexresponse:\n    get:\n      summary: Find pets\n      description: Returns the Pets\n      operationId: getPets\n      responses:\n        \"200\":\n          description: Response inside Operation\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n        default:\n          description: Default Pet\n          content:\n            '*/*':\n              schema:\n                type: string\n                description: Default Pet\n                example: New Pet\n        \"404\":\n          description: Couldn't find pet\n  /implementationresponse:\n    get:\n      summary: Simple get operation\n      description: Defines a simple get operation with no inputs and a complex output\n        object\n      operationId: getWithPayloadResponse\n      responses:\n        \"200\":\n          description: voila!\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/SecondSampleResponseSchema\"\n        \"400\":\n          description: boo\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/GenericError\"\n      deprecated: true\n  \"/arrayresponseinmethod\":\n    get:\n      operationId: arrayResponseWithTypeImplementation\n      responses:\n        default:\n          content:\n            \"*/*\":\n              schema:\n                type: array\n                description: Array description\n                items:\n                  \"$ref\": \"#/components/schemas/PetInfo\"\n  \"/responseinmethod\":\n    get:\n      summary: Find pets\n      description: Returns the Pets\n      operationId: getPets_1\n      responses:\n        \"200\":\n          description: Status OK\n  /noimplementationresponseresource:\n    get:\n      operationId: getUser_7\n      parameters:\n      - name: userId\n        in: query\n        schema:\n          type: string\n      responses:\n        \"400\":\n          description: test description\n          links:\n            user:\n              operationId: getUser\n              parameters:\n                userId: $request.query.userId\n        \"200\":\n          description: 200 description\n          links:\n            pet:\n              operationId: getUser\n              parameters:\n                userId: $request.query.userId\n  /noresponse:\n    get:\n      summary: Find pets\n      description: Returns the Pets\n      operationId: getPets_2\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\n  /responseinoperation:\n    get:\n      summary: Find Users\n      description: Returns the Users\n      operationId: getUsers\n      responses:\n        \"200\":\n          description: Status OK\n  /priorityresponses:\n    get:\n      summary: Find pets\n      description: Returns the Pets\n      operationId: getPets_3\n      responses:\n        \"200\":\n          description: Inside Method Operation\n  /security:\n    get:\n      description: description\n      operationId: Operation Id\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n      security:\n      - security_key:\n        - write:pets\n        - read:pets\n      - myOauth2Security:\n        - write:pets\n    put:\n      description: description 3\n      operationId: Operation Id 3\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n      security:\n      - security_key:\n        - write:pets\n        - read:pets\n      - myOauth2Security:\n        - write:pets\n      - security_key3:\n        - write:pets\n        - read:pets\n    patch:\n      description: description 2\n      operationId: Operation Id 2\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n      security:\n      - security_key:\n        - write:pets\n        - read:pets\n      - myOauth2Security:\n        - write:pets\n      - security_key2:\n        - write:pets\n        - read:pets\n  /completetags:\n    get:\n      tags:\n      - Third Tag\n      - Second Tag\n      - Fourth Tag Full\n      - Example Tag\n      - Fifth Tag Full\n      - Sixth Tag\n      operationId: getTags\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /tagsinmethod:\n    get:\n      tags:\n      - Third Tag\n      - Second Tag\n      - Fourth Tag Full\n      operationId: getTags_1\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /tagoperation:\n    get:\n      tags:\n      - Example Tag\n      - Second Tag\n      operationId: getTags_2\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\ncomponents:\n  schemas:\n    Category:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Category\n    Pet:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          $ref: \"#/components/schemas/Category\"\n        name:\n          type: string\n        photoUrls:\n          type: array\n          xml:\n            wrapped: true\n          items:\n            type: string\n            xml:\n              name: photoUrl\n        tags:\n          type: array\n          xml:\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,pending,sold\"\n      xml:\n        name: Pet\n    Tag:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Tag\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n      xml:\n        name: User\n    SubscriptionResponse:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n    SampleResponseSchema:\n      type: object\n    SecondSampleResponseSchema:\n      type: object\n    GenericError:\n      type: object\n    PetInfo:\n      type: object\n      properties:\n        name:\n          type: string\n  securitySchemes:\n    myOauth2Security:\n      type: oauth2\n      description: myOauthSecurity Description\n      in: header\n      flows:\n        implicit:\n          authorizationUrl: http://x.com\n          scopes:\n            write:pets: modify pets in your account\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/OpenAPI31DefinitionResource.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: Pet Resource Example\n  description: API Definition\n  summary: API Summary\n  termsOfService: Terms of service\n  contact:\n    name: Fred\n    url: http://gigantic-server.com\n    email: Fred@gigagantic-server.com\n  license:\n    name: Apache 2.0\n    url: http://foo.bar\n    identifier: Apache\n  version: \"2.0\"\n\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/OpenAPIDefinitionResource.yaml",
    "content": "openapi: 3.0.1\ninfo:\n  title: Pet Resource Example\n  description: API Definition\n  termsOfService: Terms of service\n  contact:\n    name: Fred\n    url: http://gigantic-server.com\n    email: Fred@gigagantic-server.com\n  license:\n    name: Apache 2.0\n    url: http://foo.bar\n  version: \"2.0\"\nexternalDocs:\n  description: definition docs desc\nservers:\n- url: http://foo\n  description: server 1\n  variables:\n    var1:\n      description: var 1\n      default: \"1\"\n      enum:\n      - \"1\"\n      - \"2\"\n    var2:\n      description: var 2\n      default: \"1\"\n      enum:\n      - \"1\"\n      - \"2\"\nsecurity:\n- req 1:\n  - a\n  - b\n- req 2:\n  - b\n  - c\ntags:\n- name: Tag 1\n  description: desc 1\n  externalDocs:\n    description: docs desc\n- name: Tag 2\n  description: desc 2\n  externalDocs:\n    description: docs desc 2\n- name: Tag 3\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/SecurityResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /security:\n    get:\n      description: description\n      operationId: Operation Id\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n      security:\n      - security_key:\n        - write:pets\n        - read:pets\n      - myOauth2Security:\n        - write:pets\n    put:\n      description: description 3\n      operationId: Operation Id 3\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n      security:\n      - security_key:\n        - write:pets\n        - read:pets\n      - myOauth2Security:\n        - write:pets\n      - security_key3:\n        - write:pets\n        - read:pets\n    patch:\n      description: description 2\n      operationId: Operation Id 2\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n      security:\n      - security_key:\n        - write:pets\n        - read:pets\n      - myOauth2Security:\n        - write:pets\n      - security_key2:\n        - write:pets\n        - read:pets\ncomponents:\n  securitySchemes:\n    myOauth2Security:\n      type: oauth2\n      description: myOauthSecurity Description\n      in: header\n      flows:\n        implicit:\n          authorizationUrl: http://x.com\n          scopes:\n            write:pets: modify pets in your account\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/WebHookResource.yaml",
    "content": "openapi: 3.1.0\ncomponents:\n  schemas:\n    SubscriptionResponse:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\nwebhooks:\n  webhook2:\n    post:\n      summary: get all the reviews\n      operationId: getAllReviews\n      responses:\n        \"200\":\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type:\n                  - integer\n                  - number\n                format: int32\n                $comment: random comment\n                $id: http://yourdomain.com/schemas/myschema.json\n                dependentSchemas:\n                  pet:\n                    type: object\n                patternProperties:\n                  user:\n                    type: object\n  webhook1:\n    post:\n      description: \"subscribes a client to updates relevant to the requestor's account,\\\n        \\ as identified by the input token.  The supplied url will be used as the\\\n        \\ delivery address for response payloads\"\n      operationId: subscribe\n      parameters:\n        - name: subscriptionId\n          in: path\n          required: true\n          style: simple\n          schema:\n            type: string\n            $comment: schema $comment\n            $id: http://yourdomain.com/schemas/myschema.json\n        - name: explodeFalse\n          in: query\n          required: true\n          schema:\n            type:\n              - string\n              - number\n            if:\n              $ref: \"#/components/schemas/SubscriptionResponse\"\n            then:\n              $ref: \"#/components/schemas/SubscriptionResponse\"\n            else:\n              $ref: \"#/components/schemas/SubscriptionResponse\"\n            $anchor: parameter $anchor\n            $schema: parameter $schema\n            exclusiveMaximum: 100\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/callbacks/ComplexCallback31Resource.yaml",
    "content": "openapi: 3.1.0\npaths:\n  /complexcallback:\n    get:\n      summary: Simple get operation\n      operationId: getWithNoParameters\n      parameters:\n      - name: id\n        in: query\n        description: idParam\n        schema:\n          $ref: \"#/components/schemas/User\"\n      responses:\n        \"200\":\n          description: voila!\n      callbacks:\n        testCallback1:\n          http://www.url.com:\n            get:\n              summary: get all the reviews\n              operationId: getAllReviews\n              responses:\n                \"200\":\n                  description: successful operation\n                  content:\n                    application/json:\n                      schema:\n                        type:\n                        - integer\n                        - number\n                        format: int32\n                        $comment: random comment\n                        $id: http://yourdomain.com/schemas/myschema.json\n                        dependentSchemas:\n                          pet:\n                            type: object\n                        patternProperties:\n                          user:\n                            type: object\n        testCallback2:\n          http://www.url2.com:\n            get:\n              summary: get a review\n              operationId: getAnSpecificReviews\n              responses:\n                \"200\":\n                  description: successful operation\n                  content:\n                    application/json:\n                      schema:\n                        $ref: \"#/components/schemas/User\"\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          format: int32\n          description: User Status\n      xml:\n        name: User\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/callbacks/ComplexCallbackResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /complexcallback:\n    get:\n      summary: Simple get operation\n      operationId: getWithNoParameters\n      parameters:\n      - name: id\n        in: query\n        description: idParam\n        schema:\n          $ref: \"#/components/schemas/User\"\n      responses:\n        \"200\":\n          description: voila!\n      callbacks:\n        testCallback1:\n          http://www.url.com:\n            get:\n              summary: get all the reviews\n              operationId: getAllReviews\n              responses:\n                \"200\":\n                  description: successful operation\n                  content:\n                    application/json:\n                      schema:\n                        type: integer\n                        format: int32\n        testCallback2:\n          http://www.url2.com:\n            get:\n              summary: get a review\n              operationId: getAnSpecificReviews\n              responses:\n                \"200\":\n                  description: successful operation\n                  content:\n                    application/json:\n                      schema:\n                        $ref: \"#/components/schemas/User\"\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n      xml:\n        name: User\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/callbacks/MultipleCallbacksTestWithOperationResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /multiplecallback:\n    get:\n      summary: Simple get operation\n      operationId: getWithNoParameters\n      responses:\n        \"200\":\n          description: voila!\n      callbacks:\n        testCallback1:\n          http://www.url.com:\n            get:\n              summary: get all the reviews\n              operationId: getAllReviews\n              responses:\n                \"200\":\n                  description: successful operation\n                  content:\n                    application/json:\n                      schema:\n                        type: integer\n                        format: int32\n        testCallback2:\n          http://$request.query.url: {}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/callbacks/RepeatableCallbackResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /repeatablecallback:\n    get:\n      summary: Simple get operation\n      operationId: getWithNoParameters\n      responses:\n        \"200\":\n          description: voila!\n      callbacks:\n        testCallback:\n          http://$requests.query.url: {}\n        testCallback1:\n          http://www.url.com:\n            get:\n              summary: get all the reviews\n              operationId: getAllReviews\n              responses:\n                \"200\":\n                  description: successful operation\n                  content:\n                    application/json:\n                      schema:\n                        type: integer\n                        format: int32\n        testCallback2:\n          http://$request.query.url: {}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/callbacks/SimpleCallbackWithOperationResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /simplecallback:\n    get:\n      summary: Simple get operation\n      operationId: getWithNoParameters\n      responses:\n        \"200\":\n          description: voila!\n      callbacks:\n        testCallback1:\n          http://www.url.com:\n            get:\n              summary: get all the reviews\n              operationId: getAllReviews\n              responses:\n                \"200\":\n                  description: successful operation\n                  content:\n                    application/json:\n                      schema:\n                        type: integer\n                        format: int32\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/example/ExamplesResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /example:\n    post:\n      description: subscribes a client to updates relevant to the requestor's account\n      operationId: subscribe\n      parameters:\n      - name: subscriptionId\n        in: path\n        required: true\n        style: simple\n        schema:\n          type: string\n          description: Schema\n          example: Subscription example\n        examples:\n          subscriptionId_2:\n            summary: Subscription number 54321\n            description: subscriptionId_2\n            value: 54321\n            externalValue: Subscription external value 2\n          subscriptionId_1:\n            summary: Subscription number 12345\n            description: subscriptionId_1\n            value: 12345\n            externalValue: Subscription external value 1\n        example: example\n      requestBody:\n        description: Created user object\n        content:\n          '*/*':\n            schema:\n              type: string\n              description: the generated UUID\n              format: uuid\n              readOnly: true\n              example: Schema example\n            examples:\n              Default Request:\n                summary: Subscription Request Example\n                description: Default Request\n                value: SubscriptionRequest\n                externalValue: Subscription Request Value\n        required: true\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                type: string\n                description: the generated UUID\n                format: uuid\n                readOnly: true\n                example: Schema example\n              examples:\n                Default Response:\n                  summary: Subscription Response Example\n                  description: Default Response\n                  value: SubscriptionResponse\n                  externalValue: Subscription Response value 1\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n      xml:\n        name: User\n    SubscriptionResponse:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/links/LinksAndContent31Resource.yaml",
    "content": "openapi: 3.1.0\npaths:\n  /links:\n    get:\n      operationId: getUserWithAddress\n      parameters:\n        - name: userId\n          in: query\n          schema:\n            type: string\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                type: object\n                dependentSchemas:\n                  value:\n                    type:\n                      - string\n                      - number\n          links:\n            address:\n              operationId: getAddress\n              parameters:\n                userId: $request.query.userId\n            user:\n              operationId: getUser\n              parameters:\n                userId: $request.query.userId\n              x-one:\n                x-sample-extension: \"true\"\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/links/LinksResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /links:\n    get:\n      operationId: getUserWithAddress\n      parameters:\n      - name: userId\n        in: query\n        schema:\n          type: string\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\n          links:\n            address:\n              operationId: getAddress\n              parameters:\n                userId: $request.query.userId\n            user:\n              operationId: getUser\n              parameters:\n                userId: $request.query.userId\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/operation/AnnotatedSameNameOperationResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /sameOperationName:\n    get:\n      description: Same Operation Name\n      operationId: getUser\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n    delete:\n      description: Same Operation Name Duplicated\n      operationId: getUser_1\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/operation/ExternalDocumentationResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /{petId}:\n    get:\n      summary: Find pet by ID\n      description: Returns a pet when 0 < ID <= 10.  ID > 10 or non integers will\n        simulate API error conditions\n      externalDocs:\n        description: External Annotation Documentation\n        url: http://url.me\n      operationId: petId\n      parameters:\n      - name: petId\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      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/operation/FullyAnnotatedOperationResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /fullyannotatedoperation/{petId}:\n    get:\n      summary: Find pet by ID\n      description: Returns a pet when 0 < ID <= 10.  ID > 10 or non integers will\n        simulate API error conditions\n      operationId: petId\n      parameters:\n      - name: petId\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      responses:\n        default:\n          description: The pet\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\ncomponents:\n  schemas:\n    Category:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Category\n    Tag:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Tag\n    Pet:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          $ref: \"#/components/schemas/Category\"\n        name:\n          type: string\n        photoUrls:\n          type: array\n          xml:\n            wrapped: true\n          items:\n            type: string\n            xml:\n              name: photoUrl\n        tags:\n          type: array\n          xml:\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,pending,sold\n      xml:\n        name: Pet\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/operation/HiddenOperationResource.yaml",
    "content": "openapi: 3.0.1\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/operation/NotAnnotatedSameNameOperationResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /notannotatedoperation:\n    get:\n      operationId: getUser\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n  /notannotatedoperationduplicated:\n    get:\n      operationId: getUser_1\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/operation/OperationResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /operationsresource2:\n    get:\n      operationId: getUser\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n  /operationsresource:\n    get:\n      summary: Find pet by ID\n      description: combinatedfullyannotatedoperation/{petId}\n      operationId: petId\n      parameters:\n      - name: petId\n        in: query\n        description: ID of pet that needs to be fetched\n        required: true\n        schema:\n          type: integer\n          format: int64\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: The pet\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n        \"400\":\n          description: Invalid ID supplied\n        \"404\":\n          description: Pet not found\n    put:\n      description: combinatedsameOperationName\n      operationId: combinated sameOperationName\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n    post:\n      operationId: getUser_1\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n    head:\n      description: combinatedsameOperationNameDuplicated\n      operationId: combinatedsameOperationNameDuplicated\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n  /interfaceoperation/{petId}:\n    get:\n      summary: Find pet by ID Operation in SubResource\n      description: Returns a pet in SubResource\n      operationId: getPetById\n      parameters:\n      - name: petId\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      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\ncomponents:\n  schemas:\n    Category:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Category\n    Tag:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Tag\n    Pet:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          $ref: \"#/components/schemas/Category\"\n        name:\n          type: string\n        photoUrls:\n          type: array\n          xml:\n            wrapped: true\n          items:\n            type: string\n            xml:\n              name: photoUrl\n        tags:\n          type: array\n          xml:\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,pending,sold\n      xml:\n        name: Pet\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/operation/OperationWithoutAnnotationResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /operationwithouannotation:\n    get:\n      operationId: getUser\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                type: string\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/operation/ServerOperationResource.yaml",
    "content": "openapi: 3.0.1\nservers:\n- url: http://foo\n  description: server 1\npaths:\n  /serversoperation:\n    get:\n      description: Pets Example\n      operationId: Pets\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n      servers:\n      - url: http://foo2\n        description: server 2\ncomponents:\n  schemas:\n    Category:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Category\n    Tag:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Tag\n    Pet:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          $ref: \"#/components/schemas/Category\"\n        name:\n          type: string\n        photoUrls:\n          type: array\n          xml:\n            wrapped: true\n          items:\n            type: string\n            xml:\n              name: photoUrl\n        tags:\n          type: array\n          xml:\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,pending,sold\n      xml:\n        name: Pet\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/operation/SubResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /interfaceoperation/{petId}:\n    get:\n      summary: Find pet by ID Operation in SubResource\n      description: Returns a pet in SubResource\n      operationId: getPetById\n      parameters:\n      - name: petId\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      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/parameters/ArraySchemaResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /arrayschema:\n    post:\n      description: subscribes a client to updates relevant to the requestor's account,\n        as identified by the input token.  The supplied url will be used as the delivery\n        address for response payloads\n      operationId: subscribe\n      parameters:\n      - name: arrayParameter\n        in: query\n        required: true\n        explode: true\n        schema:\n          maxItems: 10\n          minItems: 1\n          uniqueItems: true\n          type: array\n          items:\n            $ref: \"#/components/schemas/SubscriptionResponse\"\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/SubscriptionResponse\"\ncomponents:\n  schemas:\n    SubscriptionResponse:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/parameters/ComplexParameterResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /complexparameter:\n    get:\n      operationId: create User\n      parameters:\n      - name: id\n        in: query\n        description: idParam\n        schema:\n          type: string\n      - name: lastName\n        in: query\n        schema:\n          type: string\n      - name: address\n        in: query\n        description: address\n        schema:\n          $ref: \"#/components/schemas/User\"\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n      xml:\n        name: User\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/parameters/ComplexParameterWithOperationResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /complexparameter:\n    get:\n      operationId: create User\n      parameters:\n      - name: phone\n        in: path\n        description: Phone\n        required: true\n        schema:\n          type: string\n      - name: id\n        in: query\n        description: idParam\n        schema:\n          type: string\n      - name: lastName\n        in: query\n        schema:\n          type: string\n      - name: address\n        in: query\n        description: address\n        schema:\n          $ref: \"#/components/schemas/User\"\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n      xml:\n        name: User\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/parameters/MultipleNotAnnotatedParameter.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /multiplenoannotatedparameter:\n    post:\n      operationId: create User\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/parameters/OpenAPIJaxRSAnnotatedParameter.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /openapijaxrsannotatedparameter:\n    get:\n      operationId: create User\n      parameters:\n      - name: id\n        in: query\n        description: idParam\n        schema:\n          type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n      xml:\n        name: User\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/parameters/OpenAPIWithContentJaxRSAnnotatedParameter.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /openapiwithcontentjaxrsannotatedparameter:\n    get:\n      operationId: create User\n      parameters:\n      - name: id\n        in: query\n        description: idParam\n        content:\n          '*/*':\n            schema:\n              type: string\n              description: Id Schema Definition\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n      xml:\n        name: User\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/parameters/OpenAPIWithImplementationJaxRSAnnotatedParameter.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /openapiwithimplementationjaxrsannotatedparameter:\n    get:\n      operationId: create User\n      parameters:\n      - name: id\n        in: query\n        description: idParam\n        schema:\n          $ref: \"#/components/schemas/User\"\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n      xml:\n        name: User\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/parameters/Parameters31Resource.yaml",
    "content": "openapi: 3.1.0\npaths:\n  /parameters:\n    post:\n      description: \"subscribes a client to updates relevant to the requestor's account,\\\n        \\ as identified by the input token.  The supplied url will be used as the\\\n        \\ delivery address for response payloads\"\n      operationId: subscribe\n      parameters:\n        - name: subscriptionId\n          in: path\n          required: true\n          style: simple\n          schema:\n            type: string\n            $comment: schema $comment\n            $id: http://yourdomain.com/schemas/myschema.json\n        - name: explodeFalse\n          in: query\n          required: true\n          schema:\n            type:\n              - string\n              - number\n            if:\n              $ref: \"#/components/schemas/SubscriptionResponse\"\n            then:\n              $ref: \"#/components/schemas/SubscriptionResponse\"\n            else:\n              $ref: \"#/components/schemas/SubscriptionResponse\"\n            $anchor: parameter $anchor\n            $schema: parameter $schema\n            exclusiveMaximum: 100\n        - name: explodeAvoiding\n          in: query\n          required: true\n          schema:\n            type: string\n            format: id\n            description: the generated id\n            exclusiveMaximum: 1000\n            exclusiveMinimum: 10\n            readOnly: true\n        - name: arrayParameter\n          in: query\n          required: true\n          explode: true\n          content:\n            application/json:\n              schema:\n                type: number\n                description: the generated id\n                readOnly: true\n            application/xml:\n              schema:\n                type: number\n                description: the generated id\n                readOnly: true\n        - name: arrayParameterImplementation\n          in: query\n          required: true\n          explode: true\n          schema:\n            type: array\n            contains: {}\n            items:\n              $ref: \"#/components/schemas/SubscriptionResponse\"\n            maxContains: 50\n            maxItems: 10\n            minContains: 1\n            minItems: 1\n            unevaluatedItems: {}\n            uniqueItems: true\n        - name: arrayParameterImplementation2\n          in: query\n          required: true\n          explode: true\n          schema:\n            $ref: \"#/components/schemas/SubscriptionResponse\"\n        - name: id\n          in: query\n          description: idParam\n          schema:\n            type: string\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                $id: http://yourdomain.com/schemas/myschema.json\n                dependentSchemas:\n                  pet:\n                    $ref: \"#/components/schemas/Pet\"\n                patternProperties:\n                  user:\n                    $ref: \"#/components/schemas/User\"\n                properties:\n                  extraObject:\n                    type: object\ncomponents:\n  schemas:\n    Category:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Category\n    Pet:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          $ref: \"#/components/schemas/Category\"\n        name:\n          type: string\n        photoUrls:\n          type: array\n          items:\n            type: string\n            xml:\n              name: photoUrl\n          xml:\n            wrapped: true\n        tags:\n          type: array\n          items:\n            $ref: \"#/components/schemas/Tag\"\n          xml:\n            wrapped: true\n        status:\n          type: string\n          description: pet status in the store\n          enum:\n            - \"available,pending,sold\"\n      xml:\n        name: Pet\n    Tag:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: tag\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          format: int32\n          description: User Status\n      xml:\n        name: User\n    SubscriptionResponse:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/parameters/ParametersResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /parameters:\n    post:\n      description: subscribes a client to updates relevant to the requestor's account,\n        as identified by the input token.  The supplied url will be used as the delivery\n        address for response payloads\n      operationId: subscribe\n      parameters:\n      - name: subscriptionId\n        in: path\n        required: true\n        style: simple\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: formId\n        in: query\n        required: true\n        schema:\n          type: string\n        example: Example\n      - name: explodeFalse\n        in: query\n        required: true\n        explode: false\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: explodeTrue\n        in: query\n        required: true\n        explode: true\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: explodeAvoiding\n        in: query\n        required: true\n        schema:\n          type: string\n          description: the generated id\n          format: id\n          readOnly: true\n      - name: arrayParameter\n        in: query\n        required: true\n        explode: true\n        content:\n          application/json:\n            schema:\n              type: number\n              description: the generated id\n              readOnly: true\n          application/xml:\n            schema:\n              type: number\n              description: the generated id\n              readOnly: true\n      - name: arrayParameterImplementation\n        in: query\n        required: true\n        explode: true\n        schema:\n          maxItems: 10\n          minItems: 1\n          uniqueItems: true\n          type: array\n          items:\n            $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: arrayParameterImplementation2\n        in: query\n        required: true\n        explode: true\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: id\n        in: query\n        description: idParam\n        schema:\n          type: string\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/SubscriptionResponse\"\ncomponents:\n  schemas:\n    SubscriptionResponse:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/parameters/RepeatableParametersResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /repeatableparameter:\n    post:\n      description: subscribes a client to updates relevant to the requestor's account,\n        as identified by the input token.  The supplied url will be used as the delivery\n        address for response payloads\n      operationId: subscribe\n      parameters:\n      - name: subscriptionId\n        in: path\n        required: true\n        style: simple\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: formId\n        in: query\n        required: true\n        schema:\n          type: string\n        example: Example\n      - name: explodeFalse\n        in: query\n        required: true\n        explode: false\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: explodeTrue\n        in: query\n        required: true\n        explode: true\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: explodeAvoiding\n        in: query\n        required: true\n        schema:\n          type: string\n          description: the generated id\n          format: id\n          readOnly: true\n      - name: arrayParameter\n        in: query\n        required: true\n        explode: true\n        content:\n          application/json:\n            schema:\n              type: number\n              description: the generated id\n              readOnly: true\n          application/xml:\n            schema:\n              type: number\n              description: the generated id\n              readOnly: true\n      - name: arrayParameterImplementation\n        in: query\n        required: true\n        explode: true\n        schema:\n          maxItems: 10\n          minItems: 1\n          uniqueItems: true\n          type: array\n          items:\n            $ref: \"#/components/schemas/SubscriptionResponse\"\n      - name: arrayParameterImplementation2\n        in: query\n        required: true\n        explode: true\n        schema:\n          $ref: \"#/components/schemas/SubscriptionResponse\"\n      responses:\n        default:\n          description: test description\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/SubscriptionResponse\"\ncomponents:\n  schemas:\n    SubscriptionResponse:\n      type: object\n      properties:\n        subscriptionId:\n          type: string\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/parameters/SingleJaxRSAnnotatedParameter.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /singlejaxrsannotatedparameter:\n    get:\n      operationId: create User\n      parameters:\n      - name: id\n        in: query\n        schema:\n          type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n      xml:\n        name: User\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/parameters/SingleNotAnnotatedParameter.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /singlenoannotatedparameter:\n    get:\n      operationId: create User\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n      xml:\n        name: User\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/requestbody/RequestBody31Resource.yaml",
    "content": "openapi: 3.1.0\npaths:\n  /methodWithRequestBodyAndTwoParameters:\n    post:\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: methodWithRequestBodyAndTwoParameters\n      parameters:\n        - name: name\n          in: query\n          schema:\n            type: string\n        - name: code\n          in: query\n          schema:\n            type: string\n      requestBody:\n        description: Created user object\n        content:\n          '*/*':\n            schema:\n              $ref: \"#/components/schemas/User\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithRequestBodyWithoutContentWithoutImplementation:\n    get:\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: methodWithRequestBodyWithoutContentWithoutImplementation\n      requestBody:\n        description: Created user object\n        content:\n          '*/*':\n            schema:\n              type:\n                - string\n                - number\n                - object\n              if:\n                type: object\n              then:\n                type: object\n              else:\n                type: object\n              $anchor: parameter $anchor\n              $schema: parameter $schema\n              description: User description\n              example: User Description\n              exclusiveMaximum: 100\n              exclusiveMinimum: 1\n              unevaluatedProperties:\n                type: object\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          format: int32\n          description: User Status\n      xml:\n        name: User\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/requestbody/RequestBodyMethodPriorityResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /requestbodymethodpriority:\n    post:\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: methodWithRequestBodyAndTwoParameters\n      requestBody:\n        description: Created user object on Method\n        content:\n          '*/*':\n            schema:\n              $ref: \"#/components/schemas/User\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n      xml:\n        name: User\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/requestbody/RequestBodyParameterPriorityResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /requestbodyparameterpriority:\n    post:\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: methodWithRequestBodyAndTwoParameters\n      requestBody:\n        description: Created user object inside Parameter\n        content:\n          '*/*':\n            schema:\n              $ref: \"#/components/schemas/User\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n      xml:\n        name: User\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/requestbody/RequestBodyResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /methodWithRequestBodyWithoutContent:\n    get:\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: methodWithRequestBodyWithoutContent\n      requestBody:\n        description: Created user object\n        content:\n          '*/*':\n            schema:\n              $ref: \"#/components/schemas/User\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithRequestBodyWithoutContentWithoutImplementation:\n    get:\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: methodWithRequestBodyWithoutContentWithoutImplementation\n      requestBody:\n        description: Created user object\n        content:\n          '*/*':\n            schema:\n              type: string\n              description: User description\n              example: User Description\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithRequestBodyWithoutAnnotation:\n    put:\n      summary: Modify user\n      description: Modifying user.\n      operationId: methodWithRequestBodyWithoutAnnotation\n      requestBody:\n        content:\n          '*/*':\n            schema:\n              $ref: \"#/components/schemas/User\"\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithoutRequestBodyAndTwoParameters:\n    delete:\n      summary: Delete user\n      description: This can only be done by the logged in user.\n      operationId: methodWithoutRequestBodyAndTwoParameters\n      parameters:\n      - name: name\n        in: query\n        schema:\n          type: string\n      - name: code\n        in: query\n        schema:\n          type: string\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithRequestBodyWithoutAnnotationAndTwoConsumes:\n    put:\n      summary: Modify pet\n      description: Modifying pet.\n      operationId: methodWithRequestBodyWithoutAnnotationAndTwoConsumes\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n          application/xml:\n            schema:\n              $ref: \"#/components/schemas/User\"\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithTwoRequestBodyWithoutAnnotationAndTwoConsumes:\n    post:\n      summary: Create pet\n      description: Creating pet.\n      operationId: methodWithTwoRequestBodyWithoutAnnotationAndTwoConsumes\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/Pet\"\n          application/xml:\n            schema:\n              $ref: \"#/components/schemas/Pet\"\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithTwoRequestBodyWithAnnotationAndTwoConsumes:\n    post:\n      summary: Create pet\n      description: Creating pet.\n      operationId: methodWithTwoRequestBodyWithAnnotationAndTwoConsumes\n      requestBody:\n        description: Request Body User\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/User\"\n          application/xml:\n            schema:\n              $ref: \"#/components/schemas/User\"\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithOneSimpleRequestBody:\n    delete:\n      summary: Delete pet\n      description: Deleting pet.\n      operationId: methodWithOneSimpleRequestBody\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: integer\n              format: int32\n          application/xml:\n            schema:\n              type: integer\n              format: int32\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n  /methodWithRequestBodyAndTwoParameters:\n    post:\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: methodWithRequestBodyAndTwoParameters\n      parameters:\n      - name: name\n        in: query\n        schema:\n          type: string\n      - name: code\n        in: query\n        schema:\n          type: string\n      requestBody:\n        description: Created user object\n        content:\n          '*/*':\n            schema:\n              $ref: \"#/components/schemas/User\"\n        required: true\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n      xml:\n        name: User\n    Category:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Category\n    Tag:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Tag\n    Pet:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          $ref: \"#/components/schemas/Category\"\n        name:\n          type: string\n        photoUrls:\n          type: array\n          xml:\n            wrapped: true\n          items:\n            type: string\n            xml:\n              name: photoUrl\n        tags:\n          type: array\n          xml:\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,pending,sold\n      xml:\n        name: Pet\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/responses/ComplexResponseResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /complexresponse:\n    get:\n      summary: Find pets\n      description: Returns the Pets\n      operationId: getPets\n      responses:\n        \"200\":\n          description: Response inside Operation\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/Pet\"\n        default:\n          description: Default Pet\n          content:\n            '*/*':\n              schema:\n                type: string\n                description: Default Pet\n                example: New Pet\n        \"404\":\n          description: Couldn't find pet\ncomponents:\n  schemas:\n    Category:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Category\n    Tag:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        name:\n          type: string\n      xml:\n        name: Tag\n    Pet:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        category:\n          $ref: \"#/components/schemas/Category\"\n        name:\n          type: string\n        photoUrls:\n          type: array\n          xml:\n            wrapped: true\n          items:\n            type: string\n            xml:\n              name: photoUrl\n        tags:\n          type: array\n          xml:\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,pending,sold\n      xml:\n        name: Pet\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/responses/ImplementationResponseResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /implementationresponse:\n    get:\n      summary: Simple get operation\n      description: Defines a simple get operation with no inputs and a complex output\n        object\n      operationId: getWithPayloadResponse\n      responses:\n        \"200\":\n          description: voila!\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/SecondSampleResponseSchema\"\n        \"400\":\n          description: boo\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/GenericError\"\n      deprecated: true\ncomponents:\n  schemas:\n    SecondSampleResponseSchema:\n      type: object\n    GenericError:\n      type: object\n    SampleResponseSchema:\n      type: object\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/responses/MethodArrayResponseResource.yaml",
    "content": "openapi: 3.1.0\npaths:\n  /arrayresponseinmethod:\n    get:\n      operationId: arrayResponseWithTypeImplementation\n      responses:\n        default:\n          content:\n            '*/*':\n              schema:\n                type: array\n                description: Array description\n                items:\n                  $ref: \"#/components/schemas/PetInfo\"\n                  description: Item description\ncomponents:\n  schemas:\n    PetInfo:\n      type: object\n      properties:\n        name:\n          type: string\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/responses/MethodResponseResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /responseinmethod:\n    get:\n      summary: Find pets\n      description: Returns the Pets\n      operationId: getPets\n      responses:\n        \"200\":\n          description: Status OK\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/responses/NoImplementationResponseResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /noimplementationresponseresource:\n    get:\n      operationId: getUser\n      parameters:\n      - name: userId\n        in: query\n        schema:\n          type: string\n      responses:\n        \"400\":\n          description: test description\n          links:\n            user:\n              operationId: getUser\n              parameters:\n                userId: $request.query.userId\n        \"200\":\n          description: 200 description\n          links:\n            pet:\n              operationId: getUser\n              parameters:\n                userId: $request.query.userId\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: string\n        username:\n          type: string\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/responses/NoResponseResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /noresponse:\n    get:\n      summary: Find pets\n      description: Returns the Pets\n      operationId: getPets\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*':\n              schema:\n                $ref: \"#/components/schemas/User\"\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: integer\n          format: int64\n        username:\n          type: string\n        firstName:\n          type: string\n        lastName:\n          type: string\n        email:\n          type: string\n        password:\n          type: string\n        phone:\n          type: string\n        userStatus:\n          type: integer\n          description: User Status\n          format: int32\n      xml:\n        name: User\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/responses/OperationResponseResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /responseinoperation:\n    get:\n      summary: Find Users\n      description: Returns the Users\n      operationId: getUsers\n      responses:\n        \"200\":\n          description: Status OK\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/responses/PriorityResponseResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /priorityresponses:\n    get:\n      summary: Find pets\n      description: Returns the Pets\n      operationId: getPets\n      responses:\n        \"200\":\n          description: Inside Method Operation\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/tags/CompleteTagResource.yaml",
    "content": "openapi: 3.0.1\ntags:\n- name: Definition First Tag\n- name: Definition Second Tag full\n  description: desc definition\n- name: Fourth Tag Full\n  description: desc\n  externalDocs:\n    description: docs desc\n- name: Fifth Tag Full\n  description: desc class\n  externalDocs:\n    description: docs desc class\npaths:\n  /completetags:\n    get:\n      tags:\n      - Third Tag\n      - Second Tag\n      - Fourth Tag Full\n      - Example Tag\n      - Fifth Tag Full\n      - Sixth Tag\n      operationId: getTags\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/tags/TagClassResource.yaml",
    "content": "openapi: 3.0.1\ntags:\n- name: Fourth Tag Full\n  description: desc class\n  externalDocs:\n    description: docs desc class\n- name: Fifth Tag Full\n  description: desc class\n  externalDocs:\n    description: docs desc class\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/tags/TagMethodResource.yaml",
    "content": "openapi: 3.0.1\ntags:\n- name: Fourth Tag Full\n  description: desc\n  externalDocs:\n    description: docs desc\npaths:\n  /tagsinmethod:\n    get:\n      tags:\n      - Third Tag\n      - Second Tag\n      - Fourth Tag Full\n      operationId: getTags\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/tags/TagOpenAPIDefinitionResource.yaml",
    "content": "openapi: 3.0.1\ntags:\n- name: Definition First Tag\n- name: Definition Second Tag full\n  description: desc definition\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/resources/petstore/tags/TagOperationResource.yaml",
    "content": "openapi: 3.0.1\npaths:\n  /tagoperation:\n    get:\n      tags:\n      - Example Tag\n      - Second Tag\n      operationId: getTags\n      responses:\n        default:\n          description: default response\n          content:\n            '*/*': {}\n"
  },
  {
    "path": "modules/swagger-jaxrs2/src/test/webapp/WEB-INF/web.xml",
    "content": "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<web-app version=\"3.0\" xmlns=\"http://java.sun.com/xml/ns/javaee\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd\">\n\n    <servlet>\n        <servlet-name>jersey</servlet-name>\n        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>\n        <init-param>\n            <param-name>jersey.config.server.wadl.disableWadl</param-name>\n            <param-value>true</param-value>\n        </init-param>\n        <init-param>\n            <param-name>jersey.config.server.provider.packages</param-name>\n            <param-value>\n                io.swagger.v3.jaxrs2.integration.resources,io.swagger.v3.jaxrs2.it.resources\n            </param-value>\n        </init-param>\n        <init-param>\n            <param-name>openApi.configuration.prettyPrint</param-name>\n            <param-value>true</param-value>\n        </init-param>\n        <init-param>\n            <param-name>jersey.config.server.provider.classnames</param-name>\n            <param-value>org.glassfish.jersey.media.multipart.MultiPartFeature</param-value>\n        </init-param>\n        <load-on-startup>1</load-on-startup>\n    </servlet>\n\n    <servlet>\n        <servlet-name>oas</servlet-name>\n        <servlet-class>io.swagger.v3.jaxrs2.integration.OpenApiServlet</servlet-class>\n\n        <init-param>\n            <param-name>jersey.config.server.wadl.disableWadl</param-name>\n            <param-value>true</param-value>\n        </init-param>\n        <init-param>\n            <param-name>jersey.config.server.provider.packages</param-name>\n            <param-value>\n                io.swagger.v3.jaxrs2.integration.resources,io.swagger.v3.jaxrs2.it.resources\n            </param-value>\n        </init-param>\n        <init-param>\n            <param-name>openApi.configuration.prettyPrint</param-name>\n            <param-value>true</param-value>\n        </init-param>\n\n        <init-param>\n            <param-name>openApi.configuration.openAPI31</param-name>\n            <param-value>true</param-value>\n        </init-param>\n\n        <init-param>\n            <param-name>openApi.configuration.convertToOpenAPI31</param-name>\n            <param-value>true</param-value>\n        </init-param>\n    </servlet>\n\n    <servlet>\n        <servlet-name>bootstrap</servlet-name>\n        <servlet-class>io.swagger.v3.jaxrs2.BootstrapServlet</servlet-class>\n    </servlet>\n\n    <servlet-mapping>\n        <servlet-name>jersey</servlet-name>\n        <url-pattern>/*</url-pattern>\n    </servlet-mapping>\n\n    <servlet-mapping>\n        <servlet-name>oas</servlet-name>\n        <url-pattern>/oas/*</url-pattern>\n    </servlet-mapping>\n\n    <servlet-mapping>\n        <servlet-name>bootstrap</servlet-name>\n        <url-pattern>/bootstrap</url-pattern>\n    </servlet-mapping>\n\n</web-app>\n"
  },
  {
    "path": "modules/swagger-jaxrs2-servlet-initializer/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <artifactId>swagger-project</artifactId>\n        <groupId>io.swagger.core.v3</groupId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../../</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-jaxrs2-servlet-initializer</artifactId>\n    <name>swagger-jaxrs2-servlet-initializer</name>\n    <description>swagger-servlet-initializer</description>\n    <build>\n        <sourceDirectory>src/main/java</sourceDirectory>\n        <defaultGoal>install</defaultGoal>\n        <testResources>\n            <testResource>\n                <directory>src/test/resources</directory>\n            </testResource>\n        </testResources>\n        <plugins>\n            <plugin>\n                <groupId>biz.aQute.bnd</groupId>\n                <artifactId>bnd-maven-plugin</artifactId>\n                <configuration>\n                    <bnd>\n                        Export-Package: io.swagger.v3.jaxrs2.integration\n                    </bnd>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <configuration>\n                    <archive>\n                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>\n                        <manifestEntries>\n                            <Automatic-Module-Name>io.swagger.v3.jaxrs2.integration</Automatic-Module-Name>\n                        </manifestEntries>\n                    </archive>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>build-helper-maven-plugin</artifactId>\n                <version>3.5.0</version>\n                <configuration>\n                    <portNames>\n                        <portName>jetty.port</portName>\n                        <portName>jetty.port.stop</portName>\n                    </portNames>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>reserve-port</id>\n                        <phase>pre-integration-test</phase>\n                        <goals>\n                            <goal>reserve-network-port</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-failsafe-plugin</artifactId>\n                <version>${failsafe-plugin-version}</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>integration-test</goal>\n                            <goal>verify</goal>\n                        </goals>\n                        <configuration>\n                            <systemPropertyVariables>\n                                <jetty.port>${jetty.port}</jetty.port>\n                            </systemPropertyVariables>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.eclipse.jetty</groupId>\n                <artifactId>jetty-maven-plugin</artifactId>\n                <configuration>\n                    <scanIntervalSeconds>10</scanIntervalSeconds>\n                    <httpConnector><port>${jetty.port}</port></httpConnector>\n                    <stopKey>a</stopKey>\n                    <stopPort>${jetty.port.stop}</stopPort>\n                    <useTestScope>true</useTestScope>\n                    <webAppSourceDirectory>${project.basedir}/src/test/webapp</webAppSourceDirectory>\n                </configuration>\n                <dependencies>\n                    <dependency>\n                        <groupId>io.swagger.core.v3</groupId>\n                        <artifactId>swagger-jaxrs2</artifactId>\n                        <version>${project.version}</version>\n                    </dependency>\n                </dependencies>\n                <executions>\n                    <execution>\n                        <id>start-jetty</id>\n                        <phase>pre-integration-test</phase>\n                        <goals>\n                            <goal>start</goal>\n                        </goals>\n                        <configuration>\n                            <scanIntervalSeconds>0</scanIntervalSeconds>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>stop-jetty</id>\n                        <phase>post-integration-test</phase>\n                        <goals>\n                            <goal>stop</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>jakarta.ws.rs</groupId>\n            <artifactId>jakarta.ws.rs-api</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>jakarta.servlet</groupId>\n            <artifactId>jakarta.servlet-api</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-classic</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-core</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2</artifactId>\n            <version>${project.version}</version>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.testng</groupId>\n            <artifactId>testng</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>io.rest-assured</groupId>\n            <artifactId>rest-assured</artifactId>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>javax.xml.bind</groupId>\n                    <artifactId>jaxb-api</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.apache.httpcomponents</groupId>\n                    <artifactId>httpmime</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.mockito</groupId>\n            <artifactId>mockito-core</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.glassfish.jersey.core</groupId>\n            <artifactId>jersey-server</artifactId>\n            <version>${jersey2-version}</version>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.javassist</groupId>\n                    <artifactId>javassist</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "modules/swagger-jaxrs2-servlet-initializer/src/main/java/io/swagger/v3/jaxrs2/integration/SwaggerServletInitializer.java",
    "content": "package io.swagger.v3.jaxrs2.integration;\n\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.Webhooks;\nimport io.swagger.v3.oas.integration.IgnoredPackages;\nimport io.swagger.v3.oas.integration.OpenApiConfigurationException;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\n\nimport javax.servlet.ServletContainerInitializer;\nimport javax.servlet.ServletContext;\nimport javax.servlet.ServletException;\nimport javax.servlet.annotation.HandlesTypes;\nimport javax.ws.rs.ApplicationPath;\nimport javax.ws.rs.Path;\nimport java.util.HashSet;\nimport java.util.LinkedHashSet;\nimport java.util.Set;\nimport java.util.stream.Collectors;\n\n/**\n * deprecated since 2.1.2. Please use io.swagger.v3.jaxrs2.integration.SwaggerServletInitializer in\n * swagger-jaxrs2-servlet-initializer-v2\n */\n@Deprecated\n@HandlesTypes({Path.class, OpenAPIDefinition.class, ApplicationPath.class, Webhooks.class})\npublic class SwaggerServletInitializer implements ServletContainerInitializer {\n\n    static final Set<String> ignored = new HashSet();\n\n    static {\n        ignored.addAll(IgnoredPackages.ignored);\n    }\n\n    public SwaggerServletInitializer() {\n    }\n\n    @Override\n    public void onStartup(Set<Class<?>> classes, ServletContext servletContext) throws ServletException {\n        if (classes != null && ! classes.isEmpty()) {\n            Set<Class<?>> resources = new LinkedHashSet();\n            classes.stream()\n                    .filter(c -> ignored.stream().noneMatch(i -> c.getName().startsWith(i)))\n                    .forEach(resources::add);\n            if (!resources.isEmpty()) {\n                // init context\n                try {\n                    SwaggerConfiguration oasConfig = new SwaggerConfiguration()\n                            .resourceClasses(resources.stream().map(Class::getName).collect(Collectors.toSet()));\n\n                    new JaxrsOpenApiContextBuilder()\n                            .openApiConfiguration(oasConfig)\n                            .buildContext(true);\n                } catch (OpenApiConfigurationException e) {\n                    throw new RuntimeException(e.getMessage(), e);\n                }\n            }\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2-servlet-initializer/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer",
    "content": "io.swagger.v3.jaxrs2.integration.SwaggerServletInitializer"
  },
  {
    "path": "modules/swagger-jaxrs2-servlet-initializer-v2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <artifactId>swagger-project</artifactId>\n        <groupId>io.swagger.core.v3</groupId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../../</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-jaxrs2-servlet-initializer-v2</artifactId>\n    <name>swagger-jaxrs2-servlet-initializer-v2</name>\n    <description>swagger-servlet-initializer-v2</description>\n    <build>\n        <sourceDirectory>src/main/java</sourceDirectory>\n        <defaultGoal>install</defaultGoal>\n        <testResources>\n            <testResource>\n                <directory>src/test/resources</directory>\n            </testResource>\n        </testResources>\n        <plugins>\n            <plugin>\n                <groupId>biz.aQute.bnd</groupId>\n                <artifactId>bnd-maven-plugin</artifactId>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <configuration>\n                    <archive>\n                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>\n                        <manifestEntries>\n                            <Automatic-Module-Name>io.swagger.v3.jaxrs2.integration.servlet</Automatic-Module-Name>\n                        </manifestEntries>\n                    </archive>\n            </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>build-helper-maven-plugin</artifactId>\n                <version>3.5.0</version>\n                <configuration>\n                    <portNames>\n                        <portName>jetty.port</portName>\n                        <portName>jetty.port.stop</portName>\n                    </portNames>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>reserve-port</id>\n                        <phase>pre-integration-test</phase>\n                        <goals>\n                            <goal>reserve-network-port</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-failsafe-plugin</artifactId>\n                <version>${failsafe-plugin-version}</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>integration-test</goal>\n                            <goal>verify</goal>\n                        </goals>\n                        <configuration>\n                            <systemPropertyVariables>\n                                <jetty.port>${jetty.port}</jetty.port>\n                            </systemPropertyVariables>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.eclipse.jetty</groupId>\n                <artifactId>jetty-maven-plugin</artifactId>\n                <configuration>\n                    <scanIntervalSeconds>10</scanIntervalSeconds>\n                    <httpConnector><port>${jetty.port}</port></httpConnector>\n                    <stopKey>a</stopKey>\n                    <stopPort>${jetty.port.stop}</stopPort>\n                    <useTestScope>true</useTestScope>\n                    <webAppSourceDirectory>${project.basedir}/src/test/webapp</webAppSourceDirectory>\n                </configuration>\n                <dependencies>\n                    <dependency>\n                        <groupId>io.swagger.core.v3</groupId>\n                        <artifactId>swagger-jaxrs2</artifactId>\n                        <version>${project.version}</version>\n                    </dependency>\n                </dependencies>\n                <executions>\n                    <execution>\n                        <id>start-jetty</id>\n                        <phase>pre-integration-test</phase>\n                        <goals>\n                            <goal>start</goal>\n                        </goals>\n                        <configuration>\n                            <scanIntervalSeconds>0</scanIntervalSeconds>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>stop-jetty</id>\n                        <phase>post-integration-test</phase>\n                        <goals>\n                            <goal>stop</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>jakarta.ws.rs</groupId>\n            <artifactId>jakarta.ws.rs-api</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>jakarta.servlet</groupId>\n            <artifactId>jakarta.servlet-api</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-classic</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-core</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2</artifactId>\n            <version>${project.version}</version>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.testng</groupId>\n            <artifactId>testng</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>io.rest-assured</groupId>\n            <artifactId>rest-assured</artifactId>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>javax.xml.bind</groupId>\n                    <artifactId>jaxb-api</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.apache.httpcomponents</groupId>\n                    <artifactId>httpmime</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.mockito</groupId>\n            <artifactId>mockito-core</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.glassfish.jersey.core</groupId>\n            <artifactId>jersey-server</artifactId>\n            <version>${jersey2-version}</version>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.javassist</groupId>\n                    <artifactId>javassist</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "modules/swagger-jaxrs2-servlet-initializer-v2/src/main/java/io/swagger/v3/jaxrs2/integration/servlet/SwaggerServletInitializer.java",
    "content": "package io.swagger.v3.jaxrs2.integration.servlet;\n\nimport io.swagger.v3.jaxrs2.integration.JaxrsOpenApiContextBuilder;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.Webhooks;\nimport io.swagger.v3.oas.integration.IgnoredPackages;\nimport io.swagger.v3.oas.integration.OpenApiConfigurationException;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\n\nimport javax.servlet.ServletContainerInitializer;\nimport javax.servlet.ServletContext;\nimport javax.servlet.ServletException;\nimport javax.servlet.annotation.HandlesTypes;\nimport javax.ws.rs.ApplicationPath;\nimport javax.ws.rs.Path;\nimport java.util.HashSet;\nimport java.util.LinkedHashSet;\nimport java.util.Set;\nimport java.util.stream.Collectors;\n\n/**\n *\n * @since 2.1.2\n */\n@HandlesTypes({Path.class, OpenAPIDefinition.class, ApplicationPath.class, Webhooks.class})\npublic class SwaggerServletInitializer implements ServletContainerInitializer {\n\n    static final Set<String> ignored = new HashSet();\n\n    static {\n        ignored.addAll(IgnoredPackages.ignored);\n    }\n\n    public SwaggerServletInitializer() {\n    }\n\n    @Override\n    public void onStartup(Set<Class<?>> classes, ServletContext servletContext) throws ServletException {\n        if (classes != null && ! classes.isEmpty()) {\n            Set<Class<?>> resources = new LinkedHashSet();\n            classes.stream()\n                    .filter(c -> ignored.stream().noneMatch(i -> c.getName().startsWith(i)))\n                    .forEach(resources::add);\n            if (!resources.isEmpty()) {\n                // init context\n                try {\n                    SwaggerConfiguration oasConfig = new SwaggerConfiguration()\n                            .resourceClasses(resources.stream().map(Class::getName).collect(Collectors.toSet()));\n\n                    new JaxrsOpenApiContextBuilder()\n                            .openApiConfiguration(oasConfig)\n                            .buildContext(true);\n                } catch (OpenApiConfigurationException e) {\n                    throw new RuntimeException(e.getMessage(), e);\n                }\n            }\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-jaxrs2-servlet-initializer-v2/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer",
    "content": "io.swagger.v3.jaxrs2.integration.servlet.SwaggerServletInitializer\n"
  },
  {
    "path": "modules/swagger-maven-plugin/README.md",
    "content": "# swagger-maven-plugin\n\n* Resolves project openAPI specification and saves the result in JSON, YAML or both formats.\nAll parameters except `outputFileName`, `outputFormat`, `skip`, `encoding` and `outputPath` correspond\nto `swagger` [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties) with same name.\n\n## Jakarta namespace support\n\nSince version 2.1.7 Swagger Core supports also Jakarta namespace, with a parallel set of artifacts with `-jakarta` suffix, providing the same functionality as the \"standard\" `javax` namespace ones.\nPlease check [Wiki](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Getting-started) for more details\n\nBoth `javax` and `jakarta` examples are provided below \n\n## Configuration example\n\n### `javax` namespace\n\n```xml\n<project>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>io.swagger.core.v3</groupId>\n                <artifactId>swagger-maven-plugin</artifactId>\n                <version>2.2.45</version>\n                <configuration>\n                    <outputFileName>openapi</outputFileName>\n                    <outputPath>${project.build.directory}/generatedtest</outputPath>\n                    <outputFormat>JSONANDYAML</outputFormat>\n                    <resourcePackages>\n                        <package>test.petstore</package>\n                    </resourcePackages>\n                    <prettyPrint>TRUE</prettyPrint>\n                </configuration>\n                <executions>\n                    <execution>\n                        <phase>compile</phase>\n                        <goals>\n                            <goal>resolve</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2</artifactId>\n            <version>2.2.45</version>\n        </dependency>\n\n        <dependency>\n            <groupId>javax.ws.rs</groupId>\n            <artifactId>javax.ws.rs-api</artifactId>\n            <version>2.1</version>\n        </dependency>\n        <dependency>\n            <groupId>javax.servlet</groupId>\n            <artifactId>javax.servlet-api</artifactId>\n            <version>3.1.0</version>\n        </dependency>\n    </dependencies>\n</project>\n```\n\n### `jakarta` namespace\n\n```xml\n<project>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>io.swagger.core.v3</groupId>\n                <artifactId>swagger-maven-plugin-jakarta</artifactId>\n                <version>2.2.45</version>\n                <configuration>\n                    <outputFileName>openapi</outputFileName>\n                    <outputPath>${project.build.directory}/generatedtest</outputPath>\n                    <outputFormat>JSONANDYAML</outputFormat>\n                    <resourcePackages>\n                        <package>test.petstore</package>\n                    </resourcePackages>\n                    <prettyPrint>TRUE</prettyPrint>\n                </configuration>\n                <executions>\n                    <execution>\n                        <phase>compile</phase>\n                        <goals>\n                            <goal>resolve</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2-jakarta</artifactId>\n            <version>2.2.45</version>\n        </dependency>\n\n        <dependency>\n            <groupId>jakarta.ws.rs</groupId>\n            <artifactId>jakarta.ws.rs-api</artifactId>\n            <version>3.0.0</version>\n        </dependency>\n        <dependency>\n            <groupId>jakarta.servlet</groupId>\n            <artifactId>jakarta.servlet-api</artifactId>\n            <version>5.0.0</version>\n        </dependency>\n    </dependencies>\n</project>\n```\n\n## Configuration example with provided Swagger configuration file\n\n### `javax` namespace\n \n ```xml\n<project>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>io.swagger.core.v3</groupId>\n                <artifactId>swagger-maven-plugin</artifactId>\n                <version>2.2.45</version>\n                <configuration>\n                    <outputFileName>openapi</outputFileName>\n                    <outputPath>${project.build.directory}/generatedtest</outputPath>\n                    <configurationFilePath>${project.basedir}/src/main/resources/configurationFile.yaml</configurationFilePath>\n                </configuration>\n                <executions>\n                    <execution>\n                        <phase>compile</phase>\n                        <goals>\n                            <goal>resolve</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n    ...\n ``` \n\n### `jakarta` namespace\n\n ```xml\n<project>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>io.swagger.core.v3</groupId>\n                <artifactId>swagger-maven-plugin-jakarta</artifactId>\n                <version>2.2.45</version>\n                <configuration>\n                    <outputFileName>openapi</outputFileName>\n                    <outputPath>${project.build.directory}/generatedtest</outputPath>\n                    <configurationFilePath>${project.basedir}/src/main/resources/configurationFile.yaml</configurationFilePath>\n                </configuration>\n                <executions>\n                    <execution>\n                        <phase>compile</phase>\n                        <goals>\n                            <goal>resolve</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n    ...\n ``` \n\n#### Parameters\nParameter | Description | Required      | Default\n--------- | ----------- |---------------| -------\n`outputPath`|output path where file(s) are saved| true          |\n`outputFileName`|file name (no extension)| false         |`openapi`\n`outputFormat`|file format (`JSON`, `YAML`, `JSONANDYAML`| false         |`JSON`\n`skip`|if `TRUE` skip execution| false         |`FALSE`\n`encoding`|encoding of output file(s)| false         |\n`resourcePackages`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |\n`resourceClasses`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |\n`prettyPrint`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |`TRUE`\n`sortOutput`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |`FALSE`\n`alwaysResolveAppPath`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |`FALSE`\n`skipResolveAppPath`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |`FALSE`\n`openapiFilePath`|path to openapi file to be merged with resolved specification, see [config](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |\n`configurationFilePath`|path to swagger config file to be merged with resolved specification, see [config](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration)| false         |\n`filterClass`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |\n`readerClass`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |\n`scannerClass`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |\n`readAllResources`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |\n`ignoredRoutes`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |\n`objectMapperProcessorClass`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |\n`defaultResponseCode`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |\n`groupsValidationStrategy`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|\n`validatorProcessorClass`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)|false|\n`modelConverterClasses`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |\n`contextId`|see [Context](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#context)| false         |${project.artifactId}\n`openapi31`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| false         |\n`schemaResolution`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| DEFAULT       |\n`openAPIVersion`|see [configuration property](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties)| `3.0.1/3.1.0` |\n\n***\n\nSince version 2.0.8, `configurationFilePath` parameter is available, allowing to specify a path to a [swagger configuration file](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration); If single maven configuration parameters (e.g. `prettyPrint`) are also defined, these will overwrite any value set in configuration file; the same applies to `openapiFilePath` which takes precedence over `openAPI` field in configuration file.\n\nSince version 2.1.6, `sortOutput` parameter is available, allowing to sort object properties and map keys alphabetically.\nSince version 2.1.6, `objectMapperProcessorClass` allows to configure also the ObjectMapper instance used to serialize the resolved OpenAPI\nSince version 2.1.9, `alwaysResolveAppPath` parameter is available, allowing to trigger resolving of Application Path from annotation also not in runtime (e.g. using servlet in separate application, or in maven plugin at build time, etc)\nSince version 2.2.12, `openapi31` parameter is available, if set to true the resolved spec will be processed into a 3.1.0 specification by resolving according to OAS 3.1 rules\nSince version 2.1.15, `skipResolveAppPath` parameter is available, allowing to skip resolving of Application Path from annotation\nSince version 2.2.17, `defaultResponseCode` parameter is available, allowing to set the code used when resolving responses with no http status code annotation\nSince version 2.2.24, `schemaResolution` parameter is available, allowing to specify how object schemas and object properties within schemas are resolved for OAS 3.0 specification\nSince version 2.2.28, `openAPIVersion` parameter is available, allowing to specify the version of the OpenAPI specification to be used for the resolved spec.\nSince version 2.2.29, `groupsValidationStrategy` parameter is available, allowing to specify the strategy for resolving Validation annotations (`never`, `always`, `neverIfNoContext`).\nSince version 2.2.29, `validatorProcessorClass` parameter is available, allowing to specify a custom validator processor class, implementation of `io.swagger.v3.core.util.ValidatorProcessor`.\n"
  },
  {
    "path": "modules/swagger-maven-plugin/pom.xml",
    "content": "<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <parent>\n        <groupId>io.swagger.core.v3</groupId>\n        <artifactId>swagger-project</artifactId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../..</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-maven-plugin</artifactId>\n    <packaging>maven-plugin</packaging>\n    <name>swagger-maven-plugin</name>\n    <description>swagger-maven-plugin</description>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.codehaus.plexus</groupId>\n                <artifactId>plexus-component-metadata</artifactId>\n                <version>2.1.1</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>generate-metadata</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-plugin-plugin</artifactId>\n                <version>3.7.0</version>\n            </plugin>\n            <plugin>\n                <groupId>io.swagger.core.v3</groupId>\n                <artifactId>swagger-eclipse-transformer-maven-plugin</artifactId>\n                <version>${project.version}</version>\n                <configuration>\n                    <attach>false</attach>\n                    <classifier>jakarta</classifier>\n                    <outputDirectory>${project.basedir}/../swagger-project-jakarta/modules/${project.artifactId}-jakarta/transformed</outputDirectory>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>transform-jakarta</id>\n                        <goals>\n                            <goal>run</goal>\n                        </goals>\n                        <phase>package</phase>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-plugin-api</artifactId>\n            <version>${maven.version}</version>\n            <scope>provided</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-component-annotations</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-classworlds</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-core</artifactId>\n            <version>${maven.version}</version>\n            <scope>provided</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.plugin-tools</groupId>\n            <artifactId>maven-plugin-annotations</artifactId>\n            <version>3.15.1</version>\n            <scope>provided</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.apache.maven</groupId>\n                    <artifactId>maven-artifact</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.codehaus.plexus</groupId>\n            <artifactId>plexus-archiver</artifactId>\n            <version>4.10.0</version>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.apache.commons</groupId>\n                    <artifactId>commons-compress</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.plugin-testing</groupId>\n            <artifactId>maven-plugin-testing-harness</artifactId>\n            <version>3.3.0</version>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>junit</groupId>\n                    <artifactId>junit</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-component-annotations</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-archiver</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.commons</groupId>\n            <artifactId>commons-lang3</artifactId>\n            <version>${commons-lang-version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.codehaus.plexus</groupId>\n            <artifactId>plexus-utils</artifactId>\n            <version>3.6.0</version>\n        </dependency>\n        <dependency>\n            <groupId>org.codehaus.plexus</groupId>\n            <artifactId>plexus-component-annotations</artifactId>\n            <version>2.2.0</version>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>${junit.version}</version>\n            <scope>test</scope>\n        </dependency>\n        <!-- Required to avoid\n             java.lang.ClassNotFoundException: org.apache.maven.execution.MavenExecutionResult\n            when mvn test is run.\n        -->\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-compat</artifactId>\n            <version>${maven.version}</version>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>com.github.tomakehurst</groupId>\n            <artifactId>wiremock</artifactId>\n            <version>2.27.2</version>\n            <scope>test</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>com.jayway.jsonpath</groupId>\n                    <artifactId>json-path</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.eclipse.jetty</groupId>\n                    <artifactId>jetty-server</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.eclipse.jetty</groupId>\n                    <artifactId>jetty-servlet</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.eclipse.jetty</groupId>\n                    <artifactId>jetty-servlets</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.eclipse.jetty</groupId>\n                    <artifactId>jetty-webapp</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.eclipse.jetty</groupId>\n                    <artifactId>jetty-proxy</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>commons-codec</groupId>\n                    <artifactId>commons-codec</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>com.github.jknack</groupId>\n                    <artifactId>handlebars-helpers</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>com.github.jknack</groupId>\n                    <artifactId>handlebars</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.commons</groupId>\n            <artifactId>commons-compress</artifactId>\n            <version>${commons-compress-version}</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.eclipse.jetty</groupId>\n            <artifactId>jetty-server</artifactId>\n            <version>${wiremock-jetty-version}</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.eclipse.jetty</groupId>\n            <artifactId>jetty-servlet</artifactId>\n            <version>${wiremock-jetty-version}</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.eclipse.jetty</groupId>\n            <artifactId>jetty-servlets</artifactId>\n            <version>${wiremock-jetty-version}</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.eclipse.jetty</groupId>\n            <artifactId>jetty-webapp</artifactId>\n            <version>${wiremock-jetty-version}</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.eclipse.jetty</groupId>\n            <artifactId>jetty-proxy</artifactId>\n            <version>${wiremock-jetty-version}</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-classic</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-core</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>jakarta.ws.rs</groupId>\n            <artifactId>jakarta.ws.rs-api</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>com.github.jknack</groupId>\n            <artifactId>handlebars-helpers</artifactId>\n            <scope>test</scope>\n            <version>4.4.0</version>\n        </dependency>\n        <dependency>\n            <groupId>com.github.jknack</groupId>\n            <artifactId>handlebars</artifactId>\n            <scope>test</scope>\n            <version>4.4.0</version>\n        </dependency>\n    </dependencies>\n    <properties>\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n        <maven.version>3.9.9</maven.version>\n        <junit.version>4.13.2</junit.version>\n        <wiremock-jetty-version>9.4.57.v20241219</wiremock-jetty-version>\n        <commons-compress-version>1.27.1</commons-compress-version>\n    </properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/main/java/io/swagger/v3/plugin/maven/IncludeProjectDependenciesComponentConfigurator.java",
    "content": "package io.swagger.v3.plugin.maven;\n\nimport org.codehaus.plexus.classworlds.realm.ClassRealm;\nimport org.codehaus.plexus.component.annotations.Component;\nimport org.codehaus.plexus.component.configurator.AbstractComponentConfigurator;\nimport org.codehaus.plexus.component.configurator.ComponentConfigurationException;\nimport org.codehaus.plexus.component.configurator.ComponentConfigurator;\nimport org.codehaus.plexus.component.configurator.ConfigurationListener;\nimport org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter;\nimport org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;\nimport org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;\nimport org.codehaus.plexus.configuration.PlexusConfiguration;\n\nimport java.io.File;\nimport java.net.MalformedURLException;\nimport java.net.URL;\nimport java.util.ArrayList;\nimport java.util.List;\n\n/*\n * Thanks to original post by Brian Jackson (http://jaxzin.github.io/) http://maven.40175.n5.nabble.com/Adding-project-dependencies-and-generated-classes-to-classpath-of-my-plugin-tp110119p110121.html\n */\n@Component(role = ComponentConfigurator.class, hint = \"include-project-dependencies\")\npublic class IncludeProjectDependenciesComponentConfigurator extends AbstractComponentConfigurator {\n\n    @Override\n    public void configureComponent(Object component, PlexusConfiguration configuration,\n                                   ExpressionEvaluator expressionEvaluator, ClassRealm containerRealm,\n                                   ConfigurationListener listener)\n            throws ComponentConfigurationException {\n\n        addProjectDependenciesToClassRealm(expressionEvaluator, containerRealm);\n\n        ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter();\n        converter.processConfiguration(converterLookup, component, containerRealm, configuration,\n                expressionEvaluator, listener);\n    }\n\n    private void addProjectDependenciesToClassRealm(ExpressionEvaluator expressionEvaluator, ClassRealm containerRealm) throws ComponentConfigurationException {\n        List<String> compileClasspathElements;\n        try {\n            @SuppressWarnings(\"unchecked\")\n            List<String> evaluated = (List<String>) expressionEvaluator.evaluate(\"${project.compileClasspathElements}\");\n            compileClasspathElements = evaluated;\n        } catch (ExpressionEvaluationException e) {\n            throw new ComponentConfigurationException(\"There was a problem evaluating: ${project.compileClasspathElements}\", e);\n        }\n\n        // Add the project dependencies to the ClassRealm\n        final URL[] urls = buildURLs(compileClasspathElements);\n        for (URL url : urls) {\n            containerRealm.addURL(url);\n        }\n    }\n\n    private URL[] buildURLs(List<String> runtimeClasspathElements) throws ComponentConfigurationException {\n        // Add the projects classes and dependencies\n        List<URL> urls = new ArrayList<>(runtimeClasspathElements.size());\n        for (String element : runtimeClasspathElements) {\n            try {\n                final URL url = new File(element).toURI().toURL();\n                urls.add(url);\n            } catch (MalformedURLException e) {\n                throw new ComponentConfigurationException(\"Unable to access project dependency: \" + element, e);\n            }\n        }\n\n        // Add the plugin's dependencies (so Trove stuff works if Trove isn't on\n        return urls.toArray(new URL[urls.size()]);\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/main/java/io/swagger/v3/plugin/maven/SwaggerMojo.java",
    "content": "package io.swagger.v3.plugin.maven;\n\nimport com.fasterxml.jackson.core.util.DefaultPrettyPrinter;\nimport io.swagger.v3.core.filter.OpenAPISpecFilter;\nimport io.swagger.v3.core.filter.SpecFilter;\nimport io.swagger.v3.core.util.Configuration;\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.jaxrs2.integration.JaxrsOpenApiContextBuilder;\nimport io.swagger.v3.oas.integration.GenericOpenApiContextBuilder;\nimport io.swagger.v3.oas.integration.OpenApiConfigurationException;\nimport io.swagger.v3.oas.integration.SwaggerConfiguration;\nimport io.swagger.v3.oas.integration.api.OpenApiContext;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.media.Schema;\nimport org.apache.maven.plugin.AbstractMojo;\nimport org.apache.maven.plugin.MojoExecutionException;\nimport org.apache.maven.plugin.MojoFailureException;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\nimport org.apache.maven.project.MavenProject;\nimport org.codehaus.plexus.util.FileUtils;\nimport org.codehaus.plexus.util.StringUtils;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.nio.charset.Charset;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport java.util.*;\nimport java.util.function.BiFunction;\n\nimport static java.lang.String.format;\n\n@Mojo(\n    name = \"resolve\",\n    requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME,\n    defaultPhase = LifecyclePhase.COMPILE,\n    threadSafe = true,\n    configurator = \"include-project-dependencies\"\n)\npublic class SwaggerMojo extends AbstractMojo {\n\n    public enum Format {JSON, YAML, JSONANDYAML}\n\n    @Override\n    public void execute() throws MojoExecutionException, MojoFailureException {\n        if (skip) {\n            getLog().info( \"Skipping OpenAPI specification resolution\" );\n            return;\n        }\n        getLog().info( \"Resolving OpenAPI specification..\" );\n\n        if (project != null) {\n            String pEnc = project.getProperties().getProperty(\"project.build.sourceEncoding\");\n            if (StringUtils.isNotBlank(pEnc)) {\n                projectEncoding = pEnc;\n            }\n        }\n        if (StringUtils.isBlank(encoding)) {\n            encoding = projectEncoding;\n        }\n\n        // read swagger configuration if one was provided\n        Optional<SwaggerConfiguration> swaggerConfiguration =\n                readStructuredDataFromFile(configurationFilePath, SwaggerConfiguration.class, \"configurationFilePath\");\n\n        // read openApi config, if one was provided\n        Optional<OpenAPI> openAPIInput =\n                readStructuredDataFromFile(openapiFilePath, OpenAPI.class, \"openapiFilePath\");\n\n        config = mergeConfig(openAPIInput.orElse(null), swaggerConfiguration.orElse(new SwaggerConfiguration()));\n\n        setDefaultsIfMissing(config);\n\n        try {\n            GenericOpenApiContextBuilder builder = new JaxrsOpenApiContextBuilder()\n                    .openApiConfiguration(config);\n            if (StringUtils.isNotBlank(contextId)) {\n                builder.ctxId(contextId);\n            }\n            OpenApiContext context = builder.buildContext(true);\n            OpenAPI openAPI = context.read();\n\n            if (StringUtils.isNotBlank(config.getFilterClass())) {\n                try {\n                    OpenAPISpecFilter filterImpl = (OpenAPISpecFilter) this.getClass().getClassLoader().loadClass(config.getFilterClass()).newInstance();\n                    SpecFilter f = new SpecFilter();\n                    openAPI = f.filter(openAPI, filterImpl, new HashMap<>(), new HashMap<>(),\n                            new HashMap<>());\n                } catch (Exception e) {\n                    getLog().error(\"Error applying filter to API specification\", e);\n                    throw new MojoExecutionException(\"Error applying filter to API specification: \" + e.getMessage(), e);\n                }\n            }\n\n            String openapiJson = null;\n            String openapiYaml = null;\n            if (Format.JSON.equals(outputFormat) || Format.JSONANDYAML.equals(outputFormat)) {\n                if (config.isPrettyPrint() != null && config.isPrettyPrint()) {\n                    openapiJson = context.getOutputJsonMapper().writer(new DefaultPrettyPrinter()).writeValueAsString(openAPI);\n                } else {\n                    openapiJson = context.getOutputJsonMapper().writeValueAsString(openAPI);\n                }\n            }\n            if (Format.YAML.equals(outputFormat) || Format.JSONANDYAML.equals(outputFormat)) {\n                if (config.isPrettyPrint() != null && config.isPrettyPrint()) {\n                    openapiYaml = context.getOutputYamlMapper().writer(new DefaultPrettyPrinter()).writeValueAsString(openAPI);\n                } else {\n                    openapiYaml = context.getOutputYamlMapper().writeValueAsString(openAPI);\n                }\n            }\n            Path path = Paths.get(outputPath, \"temp\");\n            final File parentFile = path.toFile().getParentFile();\n            if (parentFile != null) {\n                parentFile.mkdirs();\n            }\n\n            if (openapiJson != null) {\n                path = Paths.get(outputPath, outputFileName + \".json\");\n                Files.write(path, openapiJson.getBytes(Charset.forName(encoding)));\n                getLog().info( \"JSON output: \" + path.toFile().getCanonicalPath());\n            }\n            if (openapiYaml != null) {\n                path = Paths.get(outputPath, outputFileName + \".yaml\");\n                Files.write(path, openapiYaml.getBytes(Charset.forName(encoding)));\n                getLog().info( \"YAML output: \" + path.toFile().getCanonicalPath());\n            }\n\n        } catch (OpenApiConfigurationException e) {\n            getLog().error( \"Error resolving API specification\" , e);\n            throw new MojoFailureException(e.getMessage(), e);\n        } catch (IOException e) {\n            getLog().error( \"Error writing API specification\" , e);\n            throw new MojoExecutionException(\"Failed to write API definition\", e);\n        } catch (Exception e) {\n            getLog().error( \"Error resolving API specification\" , e);\n            throw new MojoExecutionException(e.getMessage(), e);\n        }\n    }\n\n    private void setDefaultsIfMissing(SwaggerConfiguration config) {\n\n        if (prettyPrint == null) {\n            prettyPrint = Boolean.FALSE;\n        }\n        if (readAllResources == null) {\n            readAllResources = Boolean.TRUE;\n        }\n        if (sortOutput == null) {\n            sortOutput = Boolean.FALSE;\n        }\n        if (alwaysResolveAppPath == null) {\n            alwaysResolveAppPath = Boolean.FALSE;\n        }\n        if (skipResolveAppPath == null) {\n            skipResolveAppPath = Boolean.FALSE;\n        }\n        if (openapi31 == null) {\n            openapi31 = Boolean.FALSE;\n        }\n        if (convertToOpenAPI31 == null) {\n            convertToOpenAPI31 = Boolean.FALSE;\n        }\n        if (config.isPrettyPrint() == null) {\n            config.prettyPrint(prettyPrint);\n        }\n        if (config.isReadAllResources() == null) {\n            config.readAllResources(readAllResources);\n        }\n        if (config.isSortOutput() == null) {\n            config.sortOutput(sortOutput);\n        }\n        if (config.isAlwaysResolveAppPath() == null) {\n            config.alwaysResolveAppPath(alwaysResolveAppPath);\n        }\n        if (config.isSkipResolveAppPath() == null) {\n            config.skipResolveAppPath(skipResolveAppPath);\n        }\n        if (config.isOpenAPI31() == null) {\n            config.setOpenAPI31(openapi31);\n        }\n        if (config.isConvertToOpenAPI31() == null) {\n            config.setConvertToOpenAPI31(convertToOpenAPI31);\n        }\n\n    }\n\n    /**\n     * Read the content of given file as either json or yaml and maps it to given class\n     *\n     * @param filePath    to read content from\n     * @param outputClass to map to\n     * @param configName  for logging, what user config will be read\n     * @param <T>         mapped type\n     * @return empty optional if not path was given or the file was empty, read instance otherwis\n     * @throws MojoFailureException if given path is not file, could not be read or is not proper json or yaml\n     */\n    private <T> Optional<T> readStructuredDataFromFile(String filePath, Class<T> outputClass, String configName)\n            throws MojoFailureException {\n        try {\n            // ignore if config is not provided\n            if (StringUtils.isBlank(filePath)) {\n                return Optional.empty();\n            }\n\n            Path pathObj = Paths.get(filePath);\n\n            // if file does not exist or is not an actual file, finish with error\n            if (!pathObj.toFile().exists() || !pathObj.toFile().isFile()) {\n                throw new IllegalArgumentException(\n                        format(\"passed path does not exist or is not a file: '%s'\", filePath));\n            }\n\n            String fileContent = new String(Files.readAllBytes(pathObj), encoding);\n\n            // if provided file is empty, log warning and finish\n            if (StringUtils.isBlank(fileContent)) {\n                getLog().warn(format(\"It seems that file '%s' defined in config %s is empty\",\n                        pathObj.toString(), configName));\n                return Optional.empty();\n            }\n\n            // get mappers in the order based on file extension\n            List<BiFunction<String, Class<T>, T>> mappers = getSortedMappers(pathObj);\n\n            T instance = null;\n            List<Throwable> caughtExs = new ArrayList<>();\n\n            // iterate through mappers and see if one is able to parse\n            for (BiFunction<String, Class<T>, T> mapper : mappers) {\n                try {\n                    instance = mapper.apply(fileContent, outputClass);\n                    break;\n                } catch (Exception e) {\n                    caughtExs.add(e);\n                }\n            }\n\n            // if no mapper could read the content correctly, finish with error\n            if (instance == null) {\n                if (caughtExs.isEmpty()) {\n                    caughtExs.add(new IllegalStateException(\"undefined state\"));\n                }\n\n\n                // we give more importance to the first exception, it was produced by the preferred mapper\n                Throwable caughtEx = caughtExs.get(0);\n                getLog().error(format(\"Could not read file '%s' for config %s\", pathObj, configName), caughtEx);\n\n                if(caughtExs.size() > 1){\n                    for (Throwable ex : caughtExs.subList(1, caughtExs.size())) {\n                        getLog().warn(format(\"Also could not read file '%s' for config %s with alternate mapper\", pathObj, configName), ex);\n                    }\n                }\n\n                throw new IllegalStateException(caughtEx.getMessage(), caughtEx);\n            }\n\n            return Optional.of(instance);\n        } catch (Exception e) {\n            getLog().error(format(\"Error reading/deserializing config %s file\", configName), e);\n            throw new MojoFailureException(e.getMessage(), e);\n        }\n    }\n\n    /**\n     * Get sorted list of mappers based on given filename.\n     * <p>\n     * Will sort the 2 supported mappers: json and yaml based on what file extension is used.\n     *\n     * @param pathObj to get extension from.\n     * @param <T>     mapped type\n     * @return list of mappers\n     */\n    private <T> List<BiFunction<String, Class<T>, T>> getSortedMappers(Path pathObj) {\n        String ext = FileUtils.extension(pathObj.toString());\n        boolean yamlPreferred = false;\n        if (ext.equalsIgnoreCase(\"yaml\") || ext.equalsIgnoreCase(\"yml\")) {\n            yamlPreferred = true;\n        }\n\n        List<BiFunction<String, Class<T>, T>> list = new ArrayList<>(2);\n\n        list.add((content, typeClass) -> {\n            try {\n                return Json.mapper().readValue(content, typeClass);\n            } catch (IOException e) {\n                throw new IllegalStateException(e);\n            }\n        });\n        list.add((content, typeClass) -> {\n            try {\n                return Yaml.mapper().readValue(content, typeClass);\n            } catch (IOException e) {\n                throw new IllegalStateException(e);\n            }\n        });\n\n        if (yamlPreferred) {\n            Collections.reverse(list);\n        }\n\n        return Collections.unmodifiableList(list);\n    }\n\n    private SwaggerConfiguration mergeConfig(OpenAPI openAPIInput, SwaggerConfiguration config) {\n        // overwrite all settings provided by other maven config\n        if (StringUtils.isNotBlank(filterClass)) {\n            config.filterClass(filterClass);\n        }\n        if (isCollectionNotBlank(ignoredRoutes)) {\n            config.ignoredRoutes(ignoredRoutes);\n        }\n        if (prettyPrint != null) {\n            config.prettyPrint(prettyPrint);\n        }\n        if (sortOutput != null) {\n            config.sortOutput(sortOutput);\n        }\n        if (alwaysResolveAppPath != null) {\n            config.alwaysResolveAppPath(alwaysResolveAppPath);\n        }\n        if (skipResolveAppPath != null) {\n            config.skipResolveAppPath(skipResolveAppPath);\n        }\n        if (readAllResources != null) {\n            config.readAllResources(readAllResources);\n        }\n        if (StringUtils.isNotBlank(readerClass)) {\n            config.readerClass(readerClass);\n        }\n        if (StringUtils.isNotBlank(scannerClass)) {\n            config.scannerClass(scannerClass);\n        }\n        if (isCollectionNotBlank(resourceClasses)) {\n            config.resourceClasses(resourceClasses);\n        }\n        if (openAPIInput != null) {\n            config.openAPI(openAPIInput);\n        }\n        if (isCollectionNotBlank(resourcePackages)) {\n            config.resourcePackages(resourcePackages);\n        }\n        if (StringUtils.isNotBlank(objectMapperProcessorClass)) {\n            config.objectMapperProcessorClass(objectMapperProcessorClass);\n        }\n        if (StringUtils.isNotBlank(defaultResponseCode)) {\n            config.defaultResponseCode(defaultResponseCode);\n        }\n\n        if (StringUtils.isNotBlank(defaultResponseCode)) {\n            config.defaultResponseCode(defaultResponseCode);\n        }\n        if (StringUtils.isNotBlank(validatorProcessorClass)) {\n            config.validatorProcessorClass(validatorProcessorClass);\n        }\n        if (StringUtils.isNotBlank(groupsValidationStrategy)) {\n            config.groupsValidationStrategy(Configuration.GroupsValidationStrategy.valueOf(groupsValidationStrategy));\n        }\n        if (isCollectionNotBlank(modelConverterClasses)) {\n            config.modelConverterClasses(modelConverterClasses);\n        }\n        if (openapi31 != null) {\n            config.openAPI31(openapi31);\n        }\n\n        if (StringUtils.isNotBlank(schemaResolution)) {\n            config.schemaResolution(Schema.SchemaResolution.valueOf(schemaResolution));\n        }\n\n        if (StringUtils.isNotBlank(openAPIVersion)) {\n            config.openAPIVersion(openAPIVersion);\n        }\n\n        return config;\n    }\n\n    private boolean isCollectionNotBlank(Collection<?> collection) {\n        return collection != null && !collection.isEmpty();\n    }\n\n    @Parameter( property = \"resolve.outputFileName\", defaultValue = \"openapi\")\n    private String outputFileName = \"openapi\";\n\n    @Parameter( property = \"resolve.outputPath\" )\n    private String outputPath;\n\n    @Parameter( property = \"resolve.outputFormat\", defaultValue = \"JSON\")\n    private Format outputFormat = Format.JSON;\n\n    @Parameter( property = \"resolve.resourcePackages\" )\n    private Set<String> resourcePackages;\n    @Parameter( property = \"resolve.resourceClasses\" )\n    private Set<String> resourceClasses;\n    @Parameter( property = \"resolve.modelConverterClasses\" )\n    private LinkedHashSet<String> modelConverterClasses;\n    @Parameter( property = \"resolve.filterClass\" )\n    private String filterClass;\n    @Parameter( property = \"resolve.readerClass\" )\n    private String readerClass;\n    @Parameter( property = \"resolve.scannerClass\" )\n    private String scannerClass;\n    /**\n     * @since 2.0.6\n     */\n    @Parameter( property = \"resolve.objectMapperProcessorClass\" )\n    private String objectMapperProcessorClass;\n    /**\n     * @since 2.2.17\n     */\n    @Parameter( property = \"resolve.defaultResponseCode\" )\n    private String defaultResponseCode;\n\n    /**\n     * @since 2.2.29\n     */\n    @Parameter( property = \"resolve.validatorProcessorClass\" )\n    private String validatorProcessorClass;\n\n    /**\n     * @since 2.2.19\n     */\n    @Parameter( property = \"resolve.groupsValidationStrategy\" )\n    private String groupsValidationStrategy;\n\n    @Parameter(property = \"resolve.prettyPrint\")\n    private Boolean prettyPrint;\n    @Parameter(property = \"resolve.readAllResources\")\n    private Boolean readAllResources;\n    @Parameter( property = \"resolve.ignoredRoutes\" )\n    private Collection<String> ignoredRoutes;\n    /**\n     * @since 2.0.6\n     */\n    @Parameter(property = \"resolve.contextId\", defaultValue = \"${project.artifactId}\")\n    private String contextId;\n\n    @Parameter( property = \"resolve.skip\" )\n    private Boolean skip = Boolean.FALSE;\n\n    @Parameter( property = \"resolve.openapiFilePath\")\n    private String openapiFilePath;\n\n    /**\n     * @since 2.0.8\n     */\n    @Parameter(property = \"resolve.configurationFilePath\")\n    private String configurationFilePath;\n\n    @Parameter(defaultValue = \"${project}\", readonly = true)\n    private MavenProject project;\n\n    @Parameter( property = \"resolve.encoding\" )\n    private String encoding;\n\n    /**\n     * @since 2.1.6\n     */\n    @Parameter(property = \"resolve.sortOutput\")\n    private Boolean sortOutput;\n\n    /**\n     * @since 2.1.9\n     */\n    @Parameter(property = \"resolve.alwaysResolveAppPath\")\n    private Boolean alwaysResolveAppPath;\n\n    /**\n     * @since 2.1.15\n     */\n    @Parameter(property = \"resolve.skipResolveAppPath\")\n    private Boolean skipResolveAppPath;\n\n    /**\n     * @since 2.2.0\n     */\n    @Parameter(property = \"resolve.openapi31\")\n    private Boolean openapi31;\n\n    /**\n     * @since 2.2.12\n     */\n    @Parameter(property = \"resolve.convertToOpenAPI31\")\n    private Boolean convertToOpenAPI31;\n\n    /**\n     * @since 2.2.24\n     */\n    @Parameter(property = \"resolve.schemaResolution\")\n    private String schemaResolution;\n\n    /**\n     * @since 2.2.28\n     */\n    @Parameter(property = \"resolve.openAPIVersion\")\n    private String openAPIVersion;\n\n    private String projectEncoding = \"UTF-8\";\n    private SwaggerConfiguration config;\n\n    public String getOutputPath() {\n        return outputPath;\n    }\n\n    public String getOpenapiFilePath() {\n        return openapiFilePath;\n    }\n\n    String getConfigurationFilePath() {\n        return configurationFilePath;\n    }\n\n    void setContextId(String contextId) {\n        this.contextId = contextId;\n    }\n\n    SwaggerConfiguration getInternalConfiguration() {\n        return config;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/ASwaggerMavenIntegrationTest.java",
    "content": "package io.swagger.v3.plugin.maven;\n\nimport io.swagger.v3.core.util.Json;\nimport io.swagger.v3.core.util.Json31;\nimport io.swagger.v3.core.util.Yaml;\nimport io.swagger.v3.core.util.Yaml31;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.apache.commons.io.FileUtils;\nimport org.apache.commons.lang3.RandomStringUtils;\nimport org.codehaus.plexus.configuration.PlexusConfiguration;\n\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport java.util.function.Consumer;\n\npublic abstract class ASwaggerMavenIntegrationTest extends BetterAbstractMojoTestCase {\n\n    protected void setUp() throws Exception {\n        // required for mojo lookups to work\n        super.setUp();\n    }\n\n    protected void tearDown() throws Exception {\n        super.tearDown();\n    }\n\n    SwaggerMojo runTest(File pom) throws Exception {\n        return runTest(pom, this::validateOpenApiContent);\n    }\n\n    SwaggerMojo runTest(File pom, Consumer<OpenAPI> validator) throws Exception {\n        assertNotNull(pom);\n        assertTrue(pom.exists());\n\n        SwaggerMojo swaggerMojo = (SwaggerMojo) lookupConfiguredMojo(pom, \"resolve\");\n        // set random context id to not mix states with multiple tests\n        swaggerMojo.setContextId(RandomStringUtils.randomAscii(32));\n        assertNotNull(swaggerMojo);\n\n        swaggerMojo.execute();\n\n        final PlexusConfiguration config = extractPluginConfiguration(\"swagger-maven-plugin\", pom);\n        String outputPath = swaggerMojo.getOutputPath();\n        String outputFile = config.getChild(\"outputFileName\").getValue();\n        if (outputFile == null) {\n            outputFile = \"openapi\";\n        }\n        boolean isOpenAPI31 = swaggerMojo.getInternalConfiguration() != null && Boolean.TRUE.equals(swaggerMojo.getInternalConfiguration().isOpenAPI31());\n        String format = config.getChild(\"outputFormat\").getValue();\n        if (format.toLowerCase().equals(\"yaml\") || format.toLowerCase().equals(\"jsonandyaml\")) {\n            Path path = Paths.get(outputPath, outputFile + \".yaml\");\n            File file = path.toFile();\n            assertTrue(Files.isRegularFile(path));\n            String content = FileUtils.readFileToString(file, \"UTF-8\");\n            final OpenAPI openAPI;\n            if (isOpenAPI31) {\n                openAPI = Yaml31.mapper().readValue(content, OpenAPI.class);\n            } else {\n                openAPI = Yaml.mapper().readValue(content, OpenAPI.class);\n            }\n            assertNotNull(openAPI);\n            validator.accept(openAPI);\n        }\n        if (format.toLowerCase().equals(\"json\") || format.toLowerCase().equals(\"jsonandyaml\")) {\n            Path path = Paths.get(outputPath, outputFile + \".json\");\n            File file = path.toFile();\n            assertTrue(Files.isRegularFile(path));\n            String content = FileUtils.readFileToString(file, \"UTF-8\");\n            final OpenAPI openAPI;\n            if (isOpenAPI31) {\n                openAPI = Json31.mapper().readValue(content, OpenAPI.class);\n            } else {\n                openAPI = Json.mapper().readValue(content, OpenAPI.class);\n            }\n            assertNotNull(openAPI);\n            validator.accept(openAPI);\n        }\n        return swaggerMojo;\n    }\n\n    void validateOpenApiContent(OpenAPI openAPI) {\n        assertEquals(2, openAPI.getServers().get(0).getVariables().size());\n        assertNotNull(openAPI.getInfo());\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/BetterAbstractMojoTestCase.java",
    "content": "package io.swagger.v3.plugin.maven;\n\nimport org.apache.maven.DefaultMaven;\nimport org.apache.maven.Maven;\nimport org.apache.maven.execution.*;\nimport org.apache.maven.plugin.Mojo;\nimport org.apache.maven.plugin.testing.AbstractMojoTestCase;\nimport org.apache.maven.project.MavenProject;\nimport org.apache.maven.project.ProjectBuilder;\nimport org.apache.maven.project.ProjectBuildingRequest;\nimport org.eclipse.aether.DefaultRepositorySystemSession;\nimport org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;\nimport org.eclipse.aether.repository.LocalRepository;\n\nimport java.io.File;\nimport java.util.Collections;\n\n/*\n * Copied from https://github.com/ahgittin/license-audit-maven-plugin\n */\n\n/**\n * Use this as you would {@link AbstractMojoTestCase},\n * where you want more of the standard maven defaults to be set\n * (and where the {@link AbstractMojoTestCase} leaves them as null or empty).\n * This includes:\n * <li> local repo, repo sessions and managers configured\n * <li> maven default remote repos installed (NB: this does not use your ~/.m2 local settings)\n * <li> system properties are copies\n * <p>\n * No changes to subclass code is needed; this simply intercepts the {@link #newMavenSession(MavenProject)} method\n * used by the various {@link #lookupMojo(String, File)} methods.\n * <p>\n * This also provides new methods, {@link #newMavenSession()} to conveniently create a maven session,\n * and {@link #lookupConfiguredMojo(File, String)} so you don't have to always build the project yourself.\n */\npublic abstract class BetterAbstractMojoTestCase extends AbstractMojoTestCase {\n\n    protected MavenSession newMavenSession() {\n        try {\n            MavenExecutionRequest request = new DefaultMavenExecutionRequest();\n            MavenExecutionResult result = new DefaultMavenExecutionResult();\n\n            // populate sensible defaults, including repository basedir and remote repos\n            MavenExecutionRequestPopulator populator;\n            populator = getContainer().lookup(MavenExecutionRequestPopulator.class);\n            populator.populateDefaults(request);\n\n            // this is needed to allow java profiles to get resolved; i.e. avoid during project builds:\n            // [ERROR] Failed to determine Java version for profile java-1.5-detected @ org.apache.commons:commons-parent:22, /Users/alex/.m2/repository/org/apache/commons/commons-parent/22/commons-parent-22.pom, line 909, column 14\n            request.setSystemProperties(System.getProperties());\n\n            // and this is needed so that the repo session in the maven session\n            // has a repo manager, and it points at the local repo\n            // (cf MavenRepositorySystemUtils.newSession() which is what is otherwise done)\n            DefaultMaven maven = (DefaultMaven) getContainer().lookup(Maven.class);\n            DefaultRepositorySystemSession repoSession =\n                    (DefaultRepositorySystemSession) maven.newRepositorySession(request);\n            repoSession.setLocalRepositoryManager(\n                    new SimpleLocalRepositoryManagerFactory().newInstance(repoSession,\n                            new LocalRepository(request.getLocalRepository().getBasedir())));\n\n            @SuppressWarnings(\"deprecation\")\n            MavenSession session = new MavenSession(getContainer(),\n                    repoSession,\n                    request, result);\n            return session;\n        } catch (Exception e) {\n            throw new RuntimeException(e);\n        }\n    }\n\n    /**\n     * Extends the super to use the new {@link #newMavenSession()} introduced here\n     * which sets the defaults one expects from maven; the standard test case leaves a lot of things blank\n     */\n    @Override\n    protected MavenSession newMavenSession(MavenProject project) {\n        MavenSession session = newMavenSession();\n        session.setCurrentProject(project);\n        session.setProjects(Collections.singletonList(project));\n        return session;\n    }\n\n    /**\n     * As {@link #lookupConfiguredMojo(MavenProject, String)} but taking the pom file\n     * and creating the {@link MavenProject}.\n     */\n    protected Mojo lookupConfiguredMojo(File pom, String goal) throws Exception {\n        assertNotNull(pom);\n        assertTrue(pom.exists());\n        this.getContainer().addComponent(new IncludeProjectDependenciesComponentConfigurator(), org.codehaus.plexus.component.configurator.ComponentConfigurator.class, \"include-project-dependencies\");\n        ProjectBuildingRequest buildingRequest = newMavenSession().getProjectBuildingRequest();\n        ProjectBuilder projectBuilder = lookup(ProjectBuilder.class);\n        MavenProject project = projectBuilder.build(pom, buildingRequest).getProject();\n\n        return lookupConfiguredMojo(project, goal);\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/SwaggerConfigFileTest.java",
    "content": "package io.swagger.v3.plugin.maven;\n\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.io.File;\nimport java.math.BigDecimal;\n\npublic class SwaggerConfigFileTest extends ASwaggerMavenIntegrationTest {\n\n\n    public void testResolveFromConfigIncludingOpenApi() throws Exception {\n        File pom = getTestFile(\"src/test/resources/pom.resolveToFileFromConfigAndOpenApi.xml\");\n\n        SwaggerMojo mojo = runTest(pom, openAPI -> {\n            assertEquals(1, openAPI.getServers().get(0).getVariables().size());\n            assertNotNull(openAPI.getInfo());\n        });\n        assertTrue(mojo.getInternalConfiguration().isPrettyPrint());\n        assertEquals(1, mojo.getInternalConfiguration().getResourcePackages().size());\n        assertEquals(\"io.swagger.v3.plugin.maven.petstore.petstore\", mojo.getInternalConfiguration().getResourcePackages().iterator().next());\n        assertEquals(1, mojo.getInternalConfiguration().getOpenAPI().getServers().get(0).getVariables().size());\n    }\n\n    public void testResolveFromConfig() throws Exception {\n        File pom = getTestFile(\"src/test/resources/pom.resolveToFileFromConfig.xml\");\n\n        SwaggerMojo mojo = runTest(pom);\n        assertTrue(mojo.getInternalConfiguration().isPrettyPrint());\n        assertEquals(1, mojo.getInternalConfiguration().getResourcePackages().size());\n        assertEquals(\"io.swagger.v3.plugin.maven.petstore.petstore\", mojo.getInternalConfiguration().getResourcePackages().iterator().next());\n        assertEquals(2, mojo.getInternalConfiguration().getOpenAPI().getServers().get(0).getVariables().size());\n    }\n\n    public void testResolveFromConfigWithOpenAPI31Option() throws Exception {\n        File pom = getTestFile(\"src/test/resources/pom.resolveToFileFromConfigWithOAS3.1Filter.xml\");\n        SwaggerMojo mojo = runTest(pom, openAPI -> {\n            assertEquals(\"3.1.0\", openAPI.getOpenapi());\n            assertNotNull(openAPI.getInfo());\n            assertNotNull(openAPI.getComponents());\n            assertNotNull(openAPI.getComponents().getSchemas());\n            assertNotNull(openAPI.getComponents().getSchemas().get(\"Address\"));\n            assertNotNull(openAPI.getComponents().getSchemas().get(\"Address\").getProperties());\n\n            Schema codeProperty = (Schema) openAPI.getComponents().getSchemas().get(\"Address\").getProperties().get(\"code\");\n\n            assertNotNull(codeProperty);\n            assertNotNull(codeProperty.getMaximum());\n            assertEquals(new BigDecimal(50), codeProperty.getMaximum());\n            assertNotNull(codeProperty.getExclusiveMaximumValue());\n            assertEquals(new BigDecimal(50), codeProperty.getExclusiveMaximumValue());\n        });\n        assertTrue(mojo.getInternalConfiguration().isPrettyPrint());\n        assertTrue(mojo.getInternalConfiguration().isOpenAPI31());\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/SwaggerResolveTest.java",
    "content": "package io.swagger.v3.plugin.maven;\n\nimport io.swagger.v3.oas.models.OpenAPI;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.io.File;\n\npublic class SwaggerResolveTest extends ASwaggerMavenIntegrationTest {\n\n    protected static Logger LOGGER = LoggerFactory.getLogger(SwaggerResolveTest.class);\n\n    public void testResolve() throws Exception {\n        File pom = getTestFile(\"src/test/resources/pom.resolveToFile.xml\");\n        checkOutput(runTest(pom));\n    }\n\n    public void testResolve31() throws Exception {\n        File pom = getTestFile(\"src/test/resources/pom.resolveToFile31.xml\");\n        checkOutput(runTest(pom, this::validateOpenApi31Content));\n    }\n\n    void validateOpenApi31Content(OpenAPI openAPI) {\n        assertEquals(\n                Boolean.TRUE,\n                openAPI\n                        .getPaths()\n                        .get(\"/pet31\")\n                        .getPut()\n                        .getResponses()\n                        .get(\"200\")\n                        .getContent()\n                        .get(\"application/xml\")\n                        .getSchema()\n                        .getReadOnly());\n    }\n\n    public void testResolveWithFilter() throws Exception {\n        File pom = getTestFile(\"src/test/resources/pom.resolveToFileWithFilter.xml\");\n        checkOutput(runTest(pom));\n    }\n\n    public void testResolveNoName() throws Exception {\n        File pom = getTestFile(\"src/test/resources/pom.resolveToFileNoName.xml\");\n        checkOutput(runTest(pom));\n    }\n\n    public void testResolveJsonAndYaml() throws Exception {\n        File pom = getTestFile(\"src/test/resources/pom.resolveToFileJsonAndYaml.xml\");\n        checkOutput(runTest(pom));\n    }\n\n    public void testResolveWithJsonInput() throws Exception {\n        File pom = getTestFile(\"src/test/resources/pom.resolveToFileFromJsonInput.xml\");\n        checkOutput(runTest(pom));\n    }\n\n    private void checkOutput(SwaggerMojo mojo) {\n        assertNull(mojo.getConfigurationFilePath());\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/EmptyPetResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore;\n\n/**\n * An Empty PetResource Class\n */\npublic class EmptyPetResource {\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/PetResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore;\n\nimport io.swagger.v3.plugin.maven.resources.QueryResultBean;\nimport io.swagger.v3.plugin.maven.resources.data.PetData;\nimport io.swagger.v3.plugin.maven.resources.exception.NotFoundException;\nimport io.swagger.v3.plugin.maven.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.BeanParam;\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n@Consumes(\"application/json\")\n@Path(\"/pet\")\n@Produces({\"application/json\", \"application/xml\"})\npublic class PetResource {\n    static PetData petData = new PetData();\n\n    @GET\n    @Path(\"/{petId}\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"Returns a pet when 0 < ID <= 10.  ID > 10 or nonintegers will simulate API error conditions\",\n            responses = {\n                    @ApiResponse(\n                            description = \"The pet\", content = @Content(\n                            schema = @Schema(implementation = Pet.class)\n                    )),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\")\n            })\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\"/*, _enum = \"range[1,10]\"*/, required = true)\n            @PathParam(\"petId\") final Long petId) throws NotFoundException {\n        Pet pet = petData.getPetById(petId);\n        if (null != pet) {\n            return Response.ok().entity(pet).build();\n        } else {\n            throw new NotFoundException(404, \"Pet not found\");\n        }\n    }\n\n    @POST\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPet(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) final Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodynoannotation\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Produces({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store no annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetNoAnnotation(final Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodyid\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store passing an integer with generic parameter annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetByInteger(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) final int petId) {\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @POST\n    @Path(\"/bodyidnoannotation\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    @Operation(summary = \"Add a new pet to the store passing an integer without parameter annotation\",\n            responses = {\n                    @ApiResponse(responseCode = \"405\", description = \"Invalid input\")\n            })\n    public Response addPetByIntegerNoAnnotation(final int petId) {\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @PUT\n    @Operation(summary = \"Update an existing pet\",\n            responses = {\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\"),\n                    @ApiResponse(responseCode = \"405\", description = \"Validation exception\")})\n    public Response updatePet(\n            @Parameter(description = \"Pet object that needs to be added to the store\", required = true) final Pet pet) {\n        petData.addPet(pet);\n        return Response.ok().entity(\"SUCCESS\").build();\n    }\n\n    @GET\n    @Path(\"/findByStatus\")\n    @Produces(\"application/xml\")\n    @Operation(summary = \"Finds Pets by status\",\n            description = \"Multiple status values can be provided with comma seperated strings\",\n            responses = {\n                    @ApiResponse(\n                            content = @Content(mediaType = \"application/json\",\n                                    schema = @Schema(implementation = Pet.class))),\n                    @ApiResponse(\n                            responseCode = \"400\", description = \"Invalid status value\"\n                    )}\n    )\n    public Response findPetsByStatus(\n            @Parameter(description = \"Status values that need to be considered for filter\", required = true) @QueryParam(\"status\") final String status,\n            @BeanParam final QueryResultBean qr\n    ) {\n        return Response.ok(petData.findPetByStatus(status)).build();\n    }\n\n    @GET\n    @Path(\"/findByTags\")\n    @Produces(\"application/json\")\n    @Operation(summary = \"Finds Pets by tags\",\n            description = \"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.\",\n            responses = {\n                    @ApiResponse(description = \"Pets matching criteria\",\n                            content = @Content(schema = @Schema(implementation = Pet.class))\n                    ),\n                    @ApiResponse(description = \"Invalid tag value\", responseCode = \"400\")\n            })\n    @Deprecated\n    public Response findPetsByTags(\n            @Parameter(description = \"Tags to filter by\", required = true) @QueryParam(\"tags\") final String tags) {\n        return Response.ok(petData.findPetByTags(tags)).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/callback/ComplexCallbackResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.callback;\n\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.callbacks.Callbacks;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\npublic class ComplexCallbackResource {\n    @Callbacks({\n            @Callback(\n                    name = \"testCallback1\",\n                    operation = @Operation(\n                            operationId = \"getAllReviews\",\n                            summary = \"get all the reviews\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    type = \"integer\",\n                                                    format = \"int32\")))),\n                    callbackUrlExpression = \"http://www.url.com\"),\n            @Callback(\n                    name = \"testCallback2\",\n                    operation = @Operation(\n                            operationId = \"getAnSpecificReviews\",\n                            summary = \"get a review\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    implementation = User.class)))),\n                    callbackUrlExpression = \"http://www.url2.com\")\n    })\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"getWithNoParameters\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\")\n            })\n    @GET\n    @Path(\"/complexcallback\")\n    public String simpleGet(@Parameter(description = \"idParam\", schema = @Schema(implementation = User.class))\n                            @QueryParam(\"id\") final String id) {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/callback/MultipleCallbacksTestWithOperationResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.callback;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.callbacks.Callbacks;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class MultipleCallbacksTestWithOperationResource {\n    @Callbacks({\n            @Callback(\n                    name = \"testCallback1\",\n                    operation = @Operation(\n                            operationId = \"getAllReviews\",\n                            summary = \"get all the reviews\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    type = \"integer\",\n                                                    format = \"int32\")))),\n                    callbackUrlExpression = \"http://www.url.com\"),\n            @Callback(name = \"testCallback2\", operation = @Operation(), callbackUrlExpression = \"http://$request.query.url\")\n    })\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"getWithNoParameters\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\")\n            })\n    @GET\n    @Path(\"/multiplecallback\")\n    public String simpleGet() {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/callback/RepeatableCallbackResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.callback;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class RepeatableCallbackResource {\n    @Callback(name = \"testCallback\", operation =\n    @Operation(), callbackUrlExpression = \"http://$requests.query.url\")\n    @Callback(\n            name = \"testCallback1\",\n            operation = @Operation(\n                    operationId = \"getAllReviews\",\n                    summary = \"get all the reviews\",\n                    method = \"get\",\n                    responses = @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"successful operation\",\n                            content = @Content(\n                                    mediaType = \"application/json\",\n                                    schema = @Schema(\n                                            type = \"integer\",\n                                            format = \"int32\")))),\n            callbackUrlExpression = \"http://www.url.com\")\n    @Callback(name = \"testCallback2\", operation =\n    @Operation(),\n            callbackUrlExpression = \"http://$request.query.url\")\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"getWithNoParameters\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\")\n            })\n    @GET\n    @Path(\"/repeatablecallback\")\n    public String simpleGet() {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/callback/SimpleCallbackWithOperationResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.callback;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.callbacks.Callback;\nimport io.swagger.v3.oas.annotations.callbacks.Callbacks;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\npublic class SimpleCallbackWithOperationResource {\n    @Callbacks({\n            @Callback(\n                    name = \"testCallback1\",\n                    operation = @Operation(\n                            operationId = \"getAllReviews\",\n                            summary = \"get all the reviews\",\n                            method = \"get\",\n                            responses = @ApiResponse(\n                                    responseCode = \"200\",\n                                    description = \"successful operation\",\n                                    content = @Content(\n                                            mediaType = \"application/json\",\n                                            schema = @Schema(\n                                                    type = \"integer\",\n                                                    format = \"int32\")))),\n                    callbackUrlExpression = \"http://www.url.com\")\n    })\n    @Operation(\n            summary = \"Simple get operation\",\n            operationId = \"getWithNoParameters\",\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\")\n            })\n    @GET\n    @Path(\"/simplecallback\")\n    public String simpleGet() {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/example/ExamplesResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.example;\n\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.ExampleObject;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\n/**\n * Examples Resource Scenario\n */\npublic class ExamplesResource {\n    @Path(\"/example\")\n    @POST\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account\",\n            parameters = {\n                    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n                            schema = @Schema(name = \"Schema\", description = \"Schema\", example = \"Subscription example\"),\n                            style = ParameterStyle.SIMPLE, example = \"example\",\n                            examples = {\n                                    @ExampleObject(name = \"subscriptionId_1\", value = \"12345\",\n                                            summary = \"Subscription number 12345\", externalValue = \"Subscription external value 1\"),\n                                    @ExampleObject(name = \"subscriptionId_2\", value = \"54321\",\n                                            summary = \"Subscription number 54321\", externalValue = \"Subscription external value 2\")\n                            })\n            },\n            responses = {\n                    @ApiResponse(\n                            description = \"test description\",\n                            content = @Content(\n                                    mediaType = \"*/*\",\n                                    schema = @Schema(\n                                            type = \"string\",\n                                            format = \"uuid\",\n                                            description = \"the generated UUID\",\n                                            accessMode = Schema.AccessMode.READ_ONLY,\n                                            example = \"Schema example\"\n                                    ),\n                                    examples = {\n                                            @ExampleObject(name = \"Default Response\", value = \"SubscriptionResponse\",\n                                                    summary = \"Subscription Response Example\", externalValue = \"Subscription Response value 1\")\n                                    }\n                            ))\n            })\n    public SubscriptionResponse subscribe(@RequestBody(description = \"Created user object\", required = true,\n            content = @Content(\n                    schema = @Schema(\n                            type = \"string\",\n                            format = \"uuid\",\n                            description = \"the generated UUID\",\n                            accessMode = Schema.AccessMode.READ_ONLY,\n                            example = \"Schema example\"),\n                    examples = {\n                            @ExampleObject(name = \"Default Request\", value = \"SubscriptionRequest\",\n                                    summary = \"Subscription Request Example\", externalValue = \"Subscription Request Value\")\n                    })) User user) {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/example/SubscriptionResponse.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.example;\n\npublic class SubscriptionResponse {\n    public String subscriptionId;\n}"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/link/LinksResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.link;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.links.Link;\nimport io.swagger.v3.oas.annotations.links.LinkParameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with Links\n */\npublic class LinksResource {\n    @Path(\"/links\")\n    @Operation(operationId = \"getUserWithAddress\",\n            responses = {\n                    @ApiResponse(description = \"test description\",\n                            content = @Content(mediaType = \"*/*\", schema = @Schema(ref = \"#/components/schemas/User\")),\n                            links = {\n                                    @Link(\n                                            name = \"address\",\n                                            operationId = \"getAddress\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\")),\n                                    @Link(\n                                            name = \"user\",\n                                            operationId = \"getUser\",\n                                            operationRef = \"#/components/links/MyLink\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\"))\n                            })}\n    )\n    @GET\n    public String getUser(@QueryParam(\"userId\")final String userId) {\n        return null;\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/openapidefintion/OpenAPIDefinitionResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.openapidefintion;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.info.Contact;\nimport io.swagger.v3.oas.annotations.info.Info;\nimport io.swagger.v3.oas.annotations.info.License;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\n/**\n * OpenAPIDefinition Example\n */\n@OpenAPIDefinition(\n        info = @Info(\n                title = \"Pet Resource Example\",\n                version = \"2.0\",\n                description = \"API Definition\",\n                termsOfService = \"Terms of service\",\n                license = @License(name = \"Apache 2.0\", url = \"http://foo.bar\"),\n                contact = @Contact(url = \"http://gigantic-server.com\", name = \"Fred\", email = \"Fred@gigagantic-server.com\")\n        ),\n        tags = {\n                @Tag(name = \"Tag 1\", description = \"desc 1\", externalDocs = @ExternalDocumentation(description = \"docs desc\")),\n                @Tag(name = \"Tag 2\", description = \"desc 2\", externalDocs = @ExternalDocumentation(description = \"docs desc 2\")),\n                @Tag(name = \"Tag 3\")\n        },\n        externalDocs = @ExternalDocumentation(description = \"definition docs desc\"),\n        security = {\n                @SecurityRequirement(name = \"req 1\", scopes = {\"a\", \"b\"}),\n                @SecurityRequirement(name = \"req 2\", scopes = {\"b\", \"c\"})\n        }\n)\npublic class OpenAPIDefinitionResource {\n    public void foo() {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/operation/AnnotatedSameNameOperationResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.operation;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.DELETE;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Default Operation without Annotation\n */\npublic class AnnotatedSameNameOperationResource {\n    @Path(\"/sameOperationName\")\n    @GET\n    @Operation(description = \"Same Operation Name\")\n    public String getUser() {\n        return new String();\n    }\n\n    @Path(\"//sameOperationName\")\n    @DELETE\n    @Operation(description = \"Same Operation Name Duplicated\")\n    public String getUser(final String id) {\n        return new String();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/operation/ExternalDocumentationResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.operation;\n\nimport io.swagger.v3.plugin.maven.resources.exception.NotFoundException;\nimport io.swagger.v3.plugin.maven.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with Operations Examples\n */\npublic class ExternalDocumentationResource {\n    @GET\n    @Path(\"/{petId}\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"Returns a pet when 0 < ID <= 10.  ID > 10 or non integers will simulate API error conditions\",\n            operationId = \"petId\",\n            externalDocs = @ExternalDocumentation(description = \"External in Operation\", url = \"http://url.me\"))\n    @ExternalDocumentation(description = \"External Annotation Documentation\", url = \"http://url.me\")\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\", required = true)\n            @PathParam(\"petId\") Long petId) throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/operation/FullyAnnotatedOperationResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.operation;\n\nimport io.swagger.v3.plugin.maven.resources.exception.NotFoundException;\nimport io.swagger.v3.plugin.maven.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with Operations Examples\n */\npublic class FullyAnnotatedOperationResource {\n    @GET\n    @Path(\"/fullyannotatedoperation/{petId}\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"Returns a pet when 0 < ID <= 10.  ID > 10 or non integers will simulate API error conditions\",\n            operationId = \"petId\",\n            responses = {\n                    @ApiResponse(\n                            description = \"The pet\", content = @Content(\n                            schema = @Schema(implementation = Pet.class)\n                    )),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\")\n            })\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\", required = true)\n            @PathParam(\"petId\")final Long petId) throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/operation/HiddenOperationResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.operation;\n\nimport io.swagger.v3.plugin.maven.resources.model.Pet;\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Hidden;\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Hidden Operation\n */\npublic class HiddenOperationResource {\n    @Path(\"/hiddenbyflag\")\n    @GET\n    @Operation(operationId = \"Pets\", description = \"Pets Example\", hidden = true)\n    public Pet getPet() {\n        return new Pet();\n    }\n\n    @Path(\"/hiddenbyannotation\")\n    @GET\n    @Operation(operationId = \"Users\", description = \"Users Example\")\n    @Hidden\n    public User getUser() {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/operation/InterfaceResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.operation;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Interface resource\n */\npublic interface InterfaceResource {\n    @GET\n    @Path(\"/interfaceoperation/{petId}\")\n    @Operation(summary = \"Find pet by ID Operation in Parent\",\n            description = \"Returns a pet in Parent\"\n    )\n    Response getPetById(@Parameter(description = \"ID of pet that needs to be fetched\", required = true)\n                        @PathParam(\"petId\") final Long petId);\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/operation/NotAnnotatedSameNameOperationResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Default Operation without Annotation\n */\npublic class NotAnnotatedSameNameOperationResource {\n    @Path(\"/notannotatedoperation\")\n    @GET\n    public String getUser() {\n        return new String();\n    }\n\n    @Path(\"/notannotatedoperationduplicated\")\n    @GET\n    public String getUser(final String id) {\n        return new String();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/operation/OperationResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.operation;\n\nimport io.swagger.v3.plugin.maven.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.HEAD;\nimport javax.ws.rs.NotFoundException;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with Complete Operations Examples\n */\npublic class OperationResource implements InterfaceResource {\n    @Override\n    @Operation(summary = \"Find pet by ID Operation in SubResource\",\n            description = \"Returns a pet in SubResource\"\n    )\n    public Response getPetById(final Long petId) {\n        return Response.ok().entity(new Pet()).build();\n    }\n\n    @GET\n    @Path(\"/operationsresource\")\n    @Operation(summary = \"Find pet by ID\",\n            description = \"combinatedfullyannotatedoperation/{petId}\",\n            operationId = \"petId\",\n            responses = {\n                    @ApiResponse(\n                            description = \"The pet\", content = @Content(\n                            schema = @Schema(implementation = Pet.class)\n                    )),\n                    @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                    @ApiResponse(responseCode = \"404\", description = \"Pet not found\")\n            })\n    public Response getPetById(\n            @Parameter(description = \"ID of pet that needs to be fetched\", required = true)\n            @QueryParam(\"petId\") final Long petId, final String message) throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n\n    @Path(\"/operationsresource\")\n    @POST\n    public String getUser(final String id) {\n        return new String();\n    }\n\n    @Path(\"/operationsresource\")\n    @PUT\n    @Operation(operationId = \"combinated sameOperationName\",\n            description = \"combinatedsameOperationName\")\n    public String getPerson() {\n        return new String();\n    }\n\n    @Path(\"/operationsresource\")\n    @HEAD\n    @Operation(operationId = \"combinatedsameOperationNameDuplicated\",\n            description = \"combinatedsameOperationNameDuplicated\")\n    public String getPerson(final String id) {\n        return new String();\n    }\n\n    @Path(\"/operationsresource2\")\n    @GET\n    public String getUser() {\n        return new String();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/operation/OperationWithoutAnnotationResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Default Operation without Annotation\n */\npublic class OperationWithoutAnnotationResource {\n    @Path(\"/operationwithouannotation\")\n    @GET\n    public String getUser() {\n        return new String();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/operation/ServerOperationResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.operation;\n\nimport io.swagger.v3.plugin.maven.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.servers.Server;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource With a Hidden Operation\n */\npublic class ServerOperationResource {\n    @Path(\"/serversoperation\")\n    @GET\n    @Operation(operationId = \"Pets\", description = \"Pets Example\",\n            servers = {\n                    @Server(description = \"server 2\", url = \"http://foo2\")\n            }\n    )\n    public Pet getPet() {\n        return new Pet();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/operation/SubResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.operation;\n\nimport io.swagger.v3.plugin.maven.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.core.Response;\n\n/**\n * SubResource\n */\n\npublic class SubResource implements InterfaceResource {\n    @Override\n    @Operation(summary = \"Find pet by ID Operation in SubResource\",\n            description = \"Returns a pet in SubResource\"\n    )\n    public Response getPetById(final Long petId) {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/parameter/ArraySchemaResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\npublic class ArraySchemaResource {\n    @Path(\"/arrayschema\")\n    @POST\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                    \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n            parameters = {\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameter\", required = true, explode = Explode.TRUE,\n                            array = @ArraySchema(maxItems = 10, minItems = 1,\n                                    schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class),\n                                    uniqueItems = true\n                            )\n                    ),\n            },\n            responses = {\n                    @ApiResponse(\n                            description = \"test description\", content = @Content(\n                            mediaType = \"*/*\",\n                            schema =\n                            @Schema(\n                                    implementation = ParametersResource.SubscriptionResponse.class)\n                    ))\n            })\n    @Consumes({\"application/json\", \"application/xml\"})\n    public ParametersResource.SubscriptionResponse subscribe() {\n        return null;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/parameter/ComplexParameterResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.parameter;\n\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a multiple annotated.\n */\npublic class ComplexParameterResource {\n\n    @Parameter(description = \"Phone definied in Field\")\n    private String phone;\n\n    public ComplexParameterResource(@Parameter(description = \"phone Param\", name = \"phone\") final String phone) {\n        this.phone = phone;\n    }\n\n    @GET\n    @Path(\"/complexparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@Parameter(description = \"idParam\") @QueryParam(\"id\") final String id,\n                         final String name, @QueryParam(\"lastName\") final String lastName,\n                         @Parameter(description = \"address\", schema = @Schema(implementation = User.class))\n                         @QueryParam(\"address\") final String address) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/parameter/ComplexParameterWithOperationResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.parameter;\n\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a multiple annotated.\n */\npublic class ComplexParameterWithOperationResource {\n\n    @Parameter(description = \"Phone definied in Field\")\n    private String phone;\n\n    public ComplexParameterWithOperationResource(@Parameter(description = \"phone Param\", name = \"phone\") final String phone) {\n        this.phone = phone;\n    }\n\n    @GET\n    @Path(\"/complexparameter\")\n    @Operation(operationId = \"create User\",\n            parameters = {\n                    @Parameter(description = \"Phone\", name = \"phone\", in = ParameterIn.PATH)\n            })\n    public User findUser(@Parameter(description = \"idParam\") @QueryParam(\"id\") final String id,\n                         final String name, @QueryParam(\"lastName\") final String lastName,\n                         @Parameter(description = \"address\", schema = @Schema(implementation = User.class))\n                         @QueryParam(\"address\") final String address) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/parameter/MultipleNotAnnotatedParameter.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\n/**\n * Class with a multiple not annotated parameter.\n */\npublic class MultipleNotAnnotatedParameter {\n    @POST\n    @Path(\"/multiplenoannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public void createUser(final String id, final String name) {\n\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/parameter/OpenAPIJaxRSAnnotatedParameter.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.parameter;\n\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a single parameter annotated with jaxrs and open api annotation.\n */\npublic class OpenAPIJaxRSAnnotatedParameter {\n    @GET\n    @Path(\"/openapijaxrsannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@Parameter(description = \"idParam\") @QueryParam(\"id\") final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/parameter/OpenAPIWithContentJaxRSAnnotatedParameter.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.parameter;\n\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a single parameter annotated with jaxrs and open api annotation.\n */\npublic class OpenAPIWithContentJaxRSAnnotatedParameter {\n    @GET\n    @Path(\"/openapiwithcontentjaxrsannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@Parameter(description = \"idParam\", content =\n    @Content(schema = @Schema(description = \"Id Schema Definition\", required = true, name = \"id\")))\n                         @QueryParam(\"id\") final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/parameter/OpenAPIWithImplementationJaxRSAnnotatedParameter.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.parameter;\n\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a single parameter annotated with jaxrs and open api annotation.\n */\npublic class OpenAPIWithImplementationJaxRSAnnotatedParameter {\n    @GET\n    @Path(\"/openapiwithimplementationjaxrsannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@Parameter(description = \"idParam\", schema = @Schema(implementation = User.class))\n                         @QueryParam(\"id\") final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/parameter/ParametersResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Resource with some Parameters examples\n */\npublic class ParametersResource {\n    @Path(\"/parameters\")\n    @POST\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                    \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n            parameters = {\n                    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n                            schema = @Schema(implementation = RepeatableParametersResource.SubscriptionResponse.class), style = ParameterStyle.SIMPLE),\n                    @Parameter(in = ParameterIn.QUERY, name = \"formId\", required = true,\n                            example = \"Example\"),\n                    @Parameter(in = ParameterIn.QUERY, name = \"explodeFalse\", required = true, explode = Explode.FALSE,\n                            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class)),\n                    @Parameter(in = ParameterIn.QUERY, name = \"explodeTrue\", required = true, explode = Explode.TRUE,\n                            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class)),\n                    @Parameter(in = ParameterIn.QUERY, name = \"explodeAvoiding\", required = true, explode = Explode.TRUE,\n                            schema = @Schema(\n                                    type = \"int\",\n                                    format = \"id\",\n                                    description = \"the generated id\",\n                                    accessMode = Schema.AccessMode.READ_ONLY\n                            )),\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameter\", required = true, explode = Explode.TRUE,\n                            array = @ArraySchema(maxItems = 10, minItems = 1,\n                                    schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class),\n                                    uniqueItems = true\n                            )\n                            ,\n                            schema = @Schema(\n                                    type = \"int\",\n                                    format = \"id\",\n                                    description = \"the generated id\",\n                                    accessMode = Schema.AccessMode.READ_ONLY),\n                            content = @Content(schema = @Schema(type = \"number\",\n                                    description = \"the generated id\",\n                                    accessMode = Schema.AccessMode.READ_ONLY))\n                    ),\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation\", required = true, explode = Explode.TRUE,\n                            array = @ArraySchema(maxItems = 10, minItems = 1,\n                                    schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class),\n                                    uniqueItems = true\n                            )\n                    ),\n                    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation2\", required = true, explode = Explode.TRUE,\n                            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class))\n\n            },\n            responses = {\n                    @ApiResponse(\n                            description = \"test description\", content = @Content(\n                            mediaType = \"*/*\",\n                            schema =\n                            @Schema(\n                                    implementation = ParametersResource.SubscriptionResponse.class)\n                    ))\n            })\n    @Consumes({\"application/json\", \"application/xml\"})\n    public ParametersResource.SubscriptionResponse subscribe(@Parameter(description = \"idParam\")\n                                                             @QueryParam(\"id\") final String id) {\n        return null;\n    }\n\n    static class SubscriptionResponse {\n        public String subscriptionId;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/parameter/RepeatableParametersResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.parameter;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.Parameter;\nimport io.swagger.v3.oas.annotations.enums.Explode;\nimport io.swagger.v3.oas.annotations.enums.ParameterIn;\nimport io.swagger.v3.oas.annotations.enums.ParameterStyle;\nimport io.swagger.v3.oas.annotations.media.ArraySchema;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\n\npublic class RepeatableParametersResource {\n    @Path(\"/repeatableparameter\")\n    @POST\n    @Parameter(in = ParameterIn.PATH, name = \"subscriptionId\", required = true,\n            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class), style = ParameterStyle.SIMPLE)\n    @Parameter(in = ParameterIn.QUERY, name = \"formId\", required = true,\n            example = \"Example\")\n    @Parameter(in = ParameterIn.QUERY, name = \"explodeFalse\", required = true, explode = Explode.FALSE,\n            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class))\n    @Parameter(in = ParameterIn.QUERY, name = \"explodeTrue\", required = true, explode = Explode.TRUE,\n            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class))\n    @Parameter(in = ParameterIn.QUERY, name = \"explodeAvoiding\", required = true, explode = Explode.TRUE,\n            schema = @Schema(\n                    type = \"int\",\n                    format = \"id\",\n                    description = \"the generated id\",\n                    accessMode = Schema.AccessMode.READ_ONLY\n            ))\n    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameter\", required = true, explode = Explode.TRUE,\n            array = @ArraySchema(maxItems = 10, minItems = 1,\n                    schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class),\n                    uniqueItems = true\n            )\n            ,\n            schema = @Schema(\n                    type = \"int\",\n                    format = \"id\",\n                    description = \"the generated id\",\n                    accessMode = Schema.AccessMode.READ_ONLY),\n            content = @Content(schema = @Schema(type = \"number\",\n                    description = \"the generated id\",\n                    accessMode = Schema.AccessMode.READ_ONLY))\n    )\n    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation\", required = true, explode = Explode.TRUE,\n            array = @ArraySchema(maxItems = 10, minItems = 1,\n                    schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class),\n                    uniqueItems = true\n            )\n    )\n    @Parameter(in = ParameterIn.QUERY, name = \"arrayParameterImplementation2\", required = true, explode = Explode.TRUE,\n            schema = @Schema(implementation = ParametersResource.SubscriptionResponse.class))\n    @Operation(\n            operationId = \"subscribe\",\n            description = \"subscribes a client to updates relevant to the requestor's account, as \" +\n                    \"identified by the input token.  The supplied url will be used as the delivery address for response payloads\",\n            responses = {\n                    @ApiResponse(\n                            description = \"test description\", content = @Content(\n                            mediaType = \"*/*\",\n                            schema =\n                            @Schema(\n                                    implementation = ParametersResource.SubscriptionResponse.class)\n                    ))\n            })\n    @Consumes({\"application/json\", \"application/xml\"})\n    public ParametersResource.SubscriptionResponse subscribe() {\n        return null;\n    }\n\n    static class SubscriptionResponse {\n        public String subscriptionId;\n    }\n}\n\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/parameter/SingleJaxRSAnnotatedParameter.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.parameter;\n\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Class with a single parameter annotated with jaxrs.\n */\npublic class SingleJaxRSAnnotatedParameter {\n    @GET\n    @Path(\"/singlejaxrsannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(@QueryParam(\"id\") final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/parameter/SingleNotAnnotatedParameter.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.parameter;\n\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Class with a single not annotated parameter.\n */\npublic class SingleNotAnnotatedParameter {\n    @GET\n    @Path(\"/singlenoannotatedparameter\")\n    @Operation(operationId = \"create User\")\n    public User findUser(final String id) {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/requestbody/RequestBodyMethodPriorityResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.requestbody;\n\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with RequestBody inside Operation and another in Method\n */\npublic class RequestBodyMethodPriorityResource {\n    @POST\n    @Path(\"/requestbodymethodpriority\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\",\n            requestBody = @RequestBody(description = \"Inside Operation\"))\n    @RequestBody(description = \"Created user object on Method\", required = true,\n            content = @Content(\n                    schema = @Schema(implementation = User.class)))\n    public Response methodWithRequestBodyAndTwoParameters(final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/requestbody/RequestBodyParameterPriorityResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.requestbody;\n\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with RequestBody inside Operation and another in Method\n */\npublic class RequestBodyParameterPriorityResource {\n    @POST\n    @Path(\"/requestbodyparameterpriority\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\",\n            requestBody = @RequestBody(description = \"Inside Operation\"))\n    @RequestBody(description = \"On method\")\n    public Response methodWithRequestBodyAndTwoParameters(\n            @RequestBody(description = \"Created user object inside Parameter\", required = true,\n                    content = @Content(\n                            schema = @Schema(implementation = User.class)))final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/requestbody/RequestBodyResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.requestbody;\n\nimport io.swagger.v3.plugin.maven.resources.model.Pet;\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.DELETE;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with RequestBody examples\n */\npublic class RequestBodyResource {\n    @GET\n    @Path(\"/methodWithRequestBodyWithoutContent\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response methodWithRequestBodyWithoutContent(\n            @RequestBody(description = \"Created user object\", required = true) final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @GET\n    @Path(\"/methodWithRequestBodyWithoutContentWithoutImplementation\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response methodWithRequestBodyWithoutContentWithoutImplementation(\n            @RequestBody(description = \"Created user object\", required = true,\n                    content = @Content(\n                            schema = @Schema(name = \"User\", description = \"User description\",\n                                    example = \"User Description\", required = true))) final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @POST\n    @Path(\"/methodWithRequestBodyAndTwoParameters\")\n    @Operation(summary = \"Create user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response methodWithRequestBodyAndTwoParameters(\n            @RequestBody(description = \"Created user object\", required = true,\n                    content = @Content(\n                            schema = @Schema(implementation = User.class))) final User user,\n            @QueryParam(\"name\") final String name, @QueryParam(\"code\") final String code) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @PUT\n    @Path(\"/methodWithRequestBodyWithoutAnnotation\")\n    @Operation(summary = \"Modify user\",\n            description = \"Modifying user.\")\n    public Response methodWithRequestBodyWithoutAnnotation(\n            final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @DELETE\n    @Path(\"/methodWithoutRequestBodyAndTwoParameters\")\n    @Operation(summary = \"Delete user\",\n            description = \"This can only be done by the logged in user.\")\n    public Response methodWithoutRequestBodyAndTwoParameters(\n            @QueryParam(\"name\") final String name, @QueryParam(\"code\") final String code) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @PUT\n    @Path(\"/methodWithRequestBodyWithoutAnnotationAndTwoConsumes\")\n    @Operation(summary = \"Modify pet\",\n            description = \"Modifying pet.\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    public Response methodWithRequestBodyWithoutAnnotationAndTwoConsumes(\n            final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @POST\n    @Path(\"/methodWithTwoRequestBodyWithoutAnnotationAndTwoConsumes\")\n    @Operation(summary = \"Create pet\",\n            description = \"Creating pet.\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    public Response methodWithTwoRequestBodyWithoutAnnotationAndTwoConsumes(\n            final Pet pet, final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @POST\n    @Path(\"/methodWithTwoRequestBodyWithAnnotationAndTwoConsumes\")\n    @Operation(summary = \"Create pet\",\n            description = \"Creating pet.\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    public Response methodWithTwoRequestBodyWithAnnotationAndTwoConsumes(\n            final @RequestBody(description = \"Request Body Pet\") Pet pet,\n            @RequestBody(description = \"Request Body User\") final User user) {\n        return Response.ok().entity(\"\").build();\n    }\n\n    @DELETE\n    @Path(\"/methodWithOneSimpleRequestBody\")\n    @Operation(summary = \"Delete pet\",\n            description = \"Deleting pet.\")\n    @Consumes({\"application/json\", \"application/xml\"})\n    public Response methodWithOneSimpleRequestBody(final int id) {\n        return Response.ok().entity(\"\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/responses/ComplexResponseResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.responses;\n\nimport io.swagger.v3.plugin.maven.resources.exception.NotFoundException;\nimport io.swagger.v3.plugin.maven.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource with some responses\n */\npublic class ComplexResponseResource {\n    @GET\n    @Path(\"/complexresponse\")\n    @Operation(summary = \"Find pets\",\n            description = \"Returns the Pets\",\n            responses = {\n                    @ApiResponse(description = \"Response inside Operation\", responseCode = \"200\",\n                            content = @Content(schema =\n                            @Schema(implementation = Pet.class))),\n                    @ApiResponse(description = \"Default Pet\",\n                            content = @Content(schema =\n                            @Schema(name = \"Default Pet\", description = \"Default Pet\",\n                            required = true, example = \"New Pet\")))\n            })\n    @ApiResponse(responseCode = \"404\", description = \"Couldn't find pet\")\n    public Pet getPets() throws NotFoundException {\n        return new Pet();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/responses/ImplementationResponseResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.responses;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource with a Response at Method Level\n */\npublic class ImplementationResponseResource {\n    @GET\n    @Path(\"/implementationresponse\")\n    @Operation(\n            summary = \"Simple get operation\",\n            description = \"Defines a simple get operation with no inputs and a complex output object\",\n            operationId = \"getWithPayloadResponse\",\n            deprecated = true,\n            responses = {\n                    @ApiResponse(\n                            responseCode = \"200\",\n                            description = \"voila!\",\n                            content = {\n                                    @Content(\n                                            mediaType = \"application/json\",\n                                            schema =\n                                            @Schema(\n                                                    implementation = ImplementationResponseResource.SampleResponseSchema.class)\n                                    ),\n                                    @Content(\n                                            mediaType = \"application/json\",\n                                            schema =\n                                            @Schema(\n                                                    implementation = ImplementationResponseResource.SecondSampleResponseSchema.class)\n                                    )\n                            }\n\n                    ),\n                    @ApiResponse(\n                            responseCode = \"400\",\n                            description = \"boo\",\n                            content = @Content(\n                                    mediaType = \"*/*\",\n                                    schema =\n                                    @Schema(implementation = ImplementationResponseResource.GenericError.class)\n                            )\n                    )\n            }\n    )\n\n    public void getResponses() {\n    }\n\n    static class SampleResponseSchema {\n        @Schema(description = \"the user id\")\n        private String id;\n    }\n\n    static class SecondSampleResponseSchema {\n        @Schema(description = \"the user id\")\n        private String id;\n    }\n\n    static class GenericError {\n        private int code;\n        private String message;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/responses/MethodResponseResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.responses;\n\nimport io.swagger.v3.plugin.maven.resources.exception.NotFoundException;\nimport io.swagger.v3.plugin.maven.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with a Response at Method Level\n */\npublic class MethodResponseResource {\n    @GET\n    @Path(\"/responseinmethod\")\n    @Operation(summary = \"Find pets\",\n            description = \"Returns the Pets\")\n    @ApiResponse(responseCode = \"200\", description = \"Status OK\")\n    public Response getPets() throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/responses/NoImplementationResponseResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.responses;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.links.Link;\nimport io.swagger.v3.oas.annotations.links.LinkParameter;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.QueryParam;\n\n/**\n * Resource with a Response at Method Level\n */\npublic class NoImplementationResponseResource {\n    @Path(\"/noimplementationresponseresource\")\n    @Operation(operationId = \"getUser\",\n            responses = {\n                    @ApiResponse(description = \"test description\", responseCode = \"400\",\n                            links = {\n                                    @Link(\n                                            name = \"user\",\n                                            operationId = \"getUser\",\n                                            operationRef = \"#/components/links/MyLink\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\"))\n                            }),\n                    @ApiResponse(description = \"200 description\", responseCode = \"200\",\n                            links = {\n                                    @Link(\n                                            name = \"pet\",\n                                            operationId = \"getUser\",\n                                            operationRef = \"#/components/links/MyLink\",\n                                            parameters = @LinkParameter(\n                                                    name = \"userId\",\n                                                    expression = \"$request.query.userId\"))\n                            })\n            }\n    )\n    @GET\n    public NoImplementationResponseResource.User getUser(@QueryParam(\"userId\") final String userId) {\n        return null;\n    }\n\n    static class User {\n        private String id;\n        private String username;\n\n        public String getId() {\n            return id;\n        }\n\n        public void setId(final String id) {\n            this.id = id;\n        }\n\n        public String getUsername() {\n            return username;\n        }\n\n        public void setUsername(final String username) {\n            this.username = username;\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/responses/NoResponseResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.responses;\n\nimport io.swagger.v3.plugin.maven.resources.exception.NotFoundException;\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\n\n/**\n * Resource with a Response at Method Level\n */\npublic class NoResponseResource {\n    @GET\n    @Path(\"/noresponse\")\n    @Operation(summary = \"Find pets\",\n            description = \"Returns the Pets\")\n    public User getPets() throws NotFoundException {\n        return new User();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/responses/OperationResponseResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.responses;\n\nimport io.swagger.v3.plugin.maven.resources.exception.NotFoundException;\nimport io.swagger.v3.plugin.maven.resources.model.User;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with the response in the Operation Annotation\n */\npublic class OperationResponseResource {\n    @GET\n    @Path(\"/responseinoperation\")\n    @Operation(summary = \"Find Users\",\n            description = \"Returns the Users\",\n            responses = {@ApiResponse(responseCode = \"200\", description = \"Status OK\")})\n    public Response getUsers() throws NotFoundException {\n        return Response.ok().entity(new User()).build();\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/responses/PriorityResponseResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.responses;\n\nimport io.swagger.v3.plugin.maven.resources.exception.NotFoundException;\nimport io.swagger.v3.plugin.maven.resources.model.Pet;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with a Response at Method Level and Operation Level.\n */\npublic class PriorityResponseResource {\n    @GET\n    @Path(\"/priorityresponses\")\n    @Operation(summary = \"Find pets\",\n            description = \"Returns the Pets\",\n            responses = {@ApiResponse(responseCode = \"200\", description = \"Inside Operation Response\")})\n    @ApiResponse(responseCode = \"200\", description = \"Inside Method Operation\")\n    public Response getPets() throws NotFoundException {\n        return Response.ok().entity(new Pet()).build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/security/SecurityResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.security;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;\nimport io.swagger.v3.oas.annotations.enums.SecuritySchemeType;\nimport io.swagger.v3.oas.annotations.security.OAuthFlow;\nimport io.swagger.v3.oas.annotations.security.OAuthFlows;\nimport io.swagger.v3.oas.annotations.security.OAuthScope;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.security.SecurityScheme;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.PATCH;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\n\n@SecurityScheme(name = \"myOauth2Security\",\n        type = SecuritySchemeType.OAUTH2,\n        in = SecuritySchemeIn.HEADER,\n        description = \"myOauthSecurity Description\",\n        flows = @OAuthFlows(implicit = @OAuthFlow(authorizationUrl = \"http://x.com\",\n                scopes = @OAuthScope(\n                        name = \"write:pets\",\n                        description = \"modify pets in your account\"))\n        )\n)\n@SecurityRequirement(name = \"security_key\",\n        scopes = {\"write:pets\", \"read:pets\"}\n)\n@SecurityRequirement(name = \"myOauth2Security\",\n        scopes = {\"write:pets\"}\n)\n@Path(\"/security\")\npublic class SecurityResource {\n    @GET\n    @Operation(operationId = \"Operation Id\",\n            description = \"description\")\n    @SecurityRequirement(name = \"security_key\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    )\n    public void getSecurity() {\n    }\n\n    @PATCH\n    @Operation(operationId = \"Operation Id 2\",\n            description = \"description 2\")\n    @SecurityRequirement(name = \"security_key2\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    )\n    public void getSecurity2() {\n    }\n\n    @PUT\n    @Operation(operationId = \"Operation Id 3\",\n            description = \"description 3\", security =\n    @SecurityRequirement(name = \"security_key3\",\n            scopes = {\"write:pets\", \"read:pets\"}\n    ))\n    public void setSecurity(String security) {\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/tags/CompleteTagResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n@OpenAPIDefinition(tags = {\n        @Tag(name = \"Definition First Tag\"),\n        @Tag(name = \"Definition Second Tag full\", description = \"desc definition\")\n})\n@Tag(name = \"Second Tag\")\n@Tag(name = \"Fourth Tag Full\", description = \"desc class\", externalDocs = @ExternalDocumentation(description = \"docs desc class\"))\n@Tag(name = \"Fifth Tag Full\", description = \"desc class\", externalDocs = @ExternalDocumentation(description = \"docs desc class\"))\n@Tag(name = \"Sixth Tag\")\npublic class CompleteTagResource {\n\n    @GET\n    @Path(\"/completetags\")\n    @Operation(tags = {\"Example Tag\", \"Second Tag\"})\n    @Tag(name = \"Third Tag\")\n    @Tag(name = \"Second Tag\")\n    @Tag(name = \"Fourth Tag Full\", description = \"desc\", externalDocs = @ExternalDocumentation(description = \"docs desc\"))\n    public Response getTags() {\n        return Response.ok().entity(\"ok\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/tags/TagClassResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\n/**\n * Class with Tag Annotations at Class level\n */\n@Tag(name = \"Second Tag\")\n@Tag(name = \"Fourth Tag Full\", description = \"desc class\", externalDocs = @ExternalDocumentation(description = \"docs desc class\"))\n@Tag(name = \"Fifth Tag Full\", description = \"desc class\", externalDocs = @ExternalDocumentation(description = \"docs desc class\"))\n@Tag(name = \"Sixth Tag\")\npublic class TagClassResource {\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/tags/TagMethodResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.ExternalDocumentation;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\npublic class TagMethodResource {\n    @GET\n    @Path(\"/tagsinmethod\")\n    @Tag(name = \"Third Tag\")\n    @Tag(name = \"Second Tag\")\n    @Tag(name = \"Fourth Tag Full\", description = \"desc\", externalDocs = @ExternalDocumentation(description = \"docs desc\"))\n    public Response getTags() {\n        return Response.ok().entity(\"ok\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/tags/TagOpenAPIDefinitionResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.OpenAPIDefinition;\nimport io.swagger.v3.oas.annotations.tags.Tag;\n\n/**\n * Tag in the OpenAPIDefinition annotation\n */\n@OpenAPIDefinition(tags = {\n        @Tag(name = \"Definition First Tag\"),\n        @Tag(name = \"Definition Second Tag full\", description = \"desc definition\")\n})\npublic class TagOpenAPIDefinitionResource {\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/tags/TagOperationResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore.tags;\n\nimport io.swagger.v3.oas.annotations.Operation;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.core.Response;\n\n/**\n * Resource with a Tag at Operation Level\n */\npublic class TagOperationResource {\n\n    @GET\n    @Path(\"/tagoperation\")\n    @Operation(tags = {\"Example Tag\", \"Second Tag\"})\n    public Response getTags() {\n        return Response.ok().entity(\"ok\").build();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore31/PetResource.java",
    "content": "package io.swagger.v3.plugin.maven.petstore.petstore31;\n\nimport io.swagger.v3.oas.annotations.Operation;\nimport io.swagger.v3.oas.annotations.media.Content;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport io.swagger.v3.oas.annotations.parameters.RequestBody;\nimport io.swagger.v3.oas.annotations.responses.ApiResponse;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.plugin.maven.resources.model.Pet;\n\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\n\n@Path(\"/pet31\")\n@Produces({\"application/json\", \"application/xml\"})\npublic class PetResource {\n  @PUT\n  @Operation(summary = \"Update an existing pet\",\n          tags = {\"pet\"},\n          security = {\n                @SecurityRequirement(name = \"petstore_auth\", scopes = {\"write:pets\", \"read:pets\"}),\n                @SecurityRequirement(name = \"mutual_tls\", scopes = {})\n          },\n          responses = {\n                  @ApiResponse(\n                          responseCode = \"200\",\n                          description = \"Successful operation\",\n                          useReturnTypeSchema = true,\n                          content = {\n                                  @Content(\n                                    mediaType = \"application/xml\",\n                                    schema = @Schema(\n                                            accessMode = Schema.AccessMode.READ_ONLY,\n                                            description = \"A Pet in XML Format\"\n                                    )\n                                  ),\n                                  @Content(\n                                          mediaType = \"application/json\",\n                                          schema = @Schema(\n                                                  accessMode = Schema.AccessMode.READ_ONLY,\n                                                  description = \"A Pet in JSON Format\"\n                                          )\n                                  )\n                          }\n                  ),\n                  @ApiResponse(responseCode = \"400\", description = \"Invalid ID supplied\"),\n                  @ApiResponse(responseCode = \"404\", description = \"Pet not found\"),\n                  @ApiResponse(responseCode = \"405\", description = \"Validation exception\") })\n  @Consumes({\"application/json\", \"application/xml\"})\n  public Pet updatePet(\n      @RequestBody(\n              description = \"Pet object that needs to be updated in the store\",\n              required = true,\n              content = {\n                      @Content(\n                              mediaType = \"application/json\",\n                              schema = @Schema(\n                                      accessMode = Schema.AccessMode.WRITE_ONLY,\n                                      description = \"A Pet in JSON Format\",\n                                      requiredProperties = {\"id\"}\n                              )\n                      ),\n                      @Content(\n                              mediaType = \"application/xml\",\n                              schema = @Schema(\n                                      accessMode = Schema.AccessMode.WRITE_ONLY,\n                                      description = \"A Pet in XML Format\",\n                                      requiredProperties = {\"id\"}\n                              )\n                      )\n              }\n      ) Pet pet) {\n    return null;\n  }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/MyFilter.java",
    "content": "package io.swagger.v3.plugin.maven.resources;\n\nimport io.swagger.v3.core.filter.AbstractSpecFilter;\nimport io.swagger.v3.core.model.ApiDescription;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\n\npublic class MyFilter extends AbstractSpecFilter {\n        private static Logger LOGGER = LoggerFactory.getLogger(MyFilter.class);\n\n        @Override\n        public Optional<OpenAPI> filterOpenAPI(\n                OpenAPI openAPI,\n                Map<String, List<String>> params,\n                Map<String, String> cookies,\n                Map<String, List<String>> headers) {\n            openAPI.getInfo().setTitle(\"UPDATEDBYFILTER\");\n            return Optional.of(openAPI);\n        }\n\n        @Override\n        public Optional<Operation> filterOperation(\n                Operation operation,\n                ApiDescription api,\n                Map<String, List<String>> params,\n                Map<String, String> cookies,\n                Map<String, List<String>> headers) {\n            // some processing\n            return Optional.of(operation);\n        }\n\n    }"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/QueryResultBean.java",
    "content": "package io.swagger.v3.plugin.maven.resources;\n\nimport javax.ws.rs.QueryParam;\n\npublic class QueryResultBean {\n    @QueryParam(\"skip\")\n    private Integer skip;\n\n    @QueryParam(\"limit\")\n    private Integer limit;\n\n    public Integer getSkip() {\n        return skip;\n    }\n\n    public void setSkip(Integer skip) {\n        this.skip = skip;\n    }\n\n    public Integer getLimit() {\n        return limit;\n    }\n\n    public void setLimit(Integer limit) {\n        this.limit = limit;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/data/PetData.java",
    "content": "package io.swagger.v3.plugin.maven.resources.data;\n\nimport io.swagger.v3.plugin.maven.resources.model.Category;\nimport io.swagger.v3.plugin.maven.resources.model.Pet;\nimport io.swagger.v3.plugin.maven.resources.model.Tag;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.stream.Collectors;\n\npublic class PetData {\n    static List<Pet> pets = new ArrayList<Pet>();\n    static List<Category> categories = new ArrayList<Category>();\n\n    static {\n        categories.add(createCategory(1, \"Dogs\"));\n        categories.add(createCategory(2, \"Cats\"));\n        categories.add(createCategory(3, \"Rabbits\"));\n        categories.add(createCategory(4, \"Lions\"));\n\n        pets.add(createPet(1, categories.get(1), \"Cat 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag1\", \"tag2\"}, \"available\"));\n        pets.add(createPet(2, categories.get(1), \"Cat 2\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag2\", \"tag3\"}, \"available\"));\n        pets.add(createPet(3, categories.get(1), \"Cat 3\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"pending\"));\n\n        pets.add(createPet(4, categories.get(0), \"Dog 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag1\", \"tag2\"}, \"available\"));\n        pets.add(createPet(5, categories.get(0), \"Dog 2\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag2\", \"tag3\"}, \"sold\"));\n        pets.add(createPet(6, categories.get(0), \"Dog 3\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"pending\"));\n\n        pets.add(createPet(7, categories.get(3), \"Lion 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag1\", \"tag2\"}, \"available\"));\n        pets.add(createPet(8, categories.get(3), \"Lion 2\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag2\", \"tag3\"}, \"available\"));\n        pets.add(createPet(9, categories.get(3), \"Lion 3\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"available\"));\n\n        pets.add(createPet(10, categories.get(2), \"Rabbit 1\", new String[]{\n                \"url1\", \"url2\"}, new String[]{\"tag3\", \"tag4\"}, \"available\"));\n    }\n\n    public Pet getPetById(long petId) {\n        for (Pet pet : pets) {\n            if (pet.getId() == petId) {\n                return pet;\n            }\n        }\n        return null;\n    }\n\n    public List<Pet> findPetByStatus(String status) {\n        String[] statues = status.split(\",\");\n        List<Pet> result = new ArrayList<Pet>();\n        for (Pet pet : pets) {\n            for (String s : statues) {\n                if (s.equals(pet.getStatus())) {\n                    result.add(pet);\n                }\n            }\n        }\n        return result;\n    }\n\n    public List<Pet> findPetByCategory(Category category) {\n        return pets.stream().filter(pet -> category.equals(pet.getCategory())).collect(Collectors.toList());\n    }\n\n    public List<Pet> findPetByTags(String tags) {\n        String[] tagList = tags.split(\",\");\n        List<Pet> result = new ArrayList<Pet>();\n        for (Pet pet : pets) {\n            if (null != pet.getTags()) {\n                for (Tag tag : pet.getTags()) {\n                    for (String tagListString : tagList) {\n                        if (tagListString.equals(tag.getName())) {\n                            result.add(pet);\n                        }\n                    }\n                }\n            }\n        }\n        return result;\n    }\n\n    public void addPet(Pet pet) {\n        if (pets.size() > 0) {\n            for (int i = pets.size() - 1; i >= 0; i--) {\n                if (pets.get(i).getId() == pet.getId()) {\n                    pets.remove(i);\n                }\n            }\n        }\n        pets.add(pet);\n    }\n\n    static Pet createPet(long id, Category cat, String name, String[] urls,\n                         String[] tags, String status) {\n        Pet pet = new Pet();\n        pet.setId(id);\n        pet.setCategory(cat);\n        pet.setName(name);\n        if (null != urls) {\n            List<String> urlObjs = new ArrayList<String>();\n            for (String urlString : urls) {\n                urlObjs.add(urlString);\n            }\n            pet.setPhotoUrls(urlObjs);\n        }\n        List<Tag> tagObjs = new ArrayList<Tag>();\n        int i = 0;\n        if (null != tags) {\n            for (String tagString : tags) {\n                i = i + 1;\n                Tag tag = new Tag();\n                tag.setId(i);\n                tag.setName(tagString);\n                tagObjs.add(tag);\n            }\n        }\n        pet.setTags(tagObjs);\n        pet.setStatus(status);\n        return pet;\n    }\n\n    static Category createCategory(long id, String name) {\n        Category category = new Category();\n        category.setId(id);\n        category.setName(name);\n        return category;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/data/UserData.java",
    "content": "package io.swagger.v3.plugin.maven.resources.data;\n\nimport io.swagger.v3.plugin.maven.resources.model.User;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class UserData {\n    static List<User> users = new ArrayList<User>();\n\n    static {\n        users.add(createUser(1, \"user1\", \"first name 1\", \"last name 1\",\n                \"email1@test.com\", \"123-456-7890\", 1));\n        users.add(createUser(2, \"user2\", \"first name 2\", \"last name 2\",\n                \"email2@test.com\", \"123-456-7890\", 2));\n        users.add(createUser(3, \"user3\", \"first name 3\", \"last name 3\",\n                \"email3@test.com\", \"123-456-7890\", 3));\n        users.add(createUser(4, \"user4\", \"first name 4\", \"last name 4\",\n                \"email4@test.com\", \"123-456-7890\", 1));\n        users.add(createUser(5, \"user5\", \"first name 5\", \"last name 5\",\n                \"email5@test.com\", \"123-456-7890\", 2));\n        users.add(createUser(6, \"user6\", \"first name 6\", \"last name 6\",\n                \"email6@test.com\", \"123-456-7890\", 3));\n        users.add(createUser(7, \"user7\", \"first name 7\", \"last name 7\",\n                \"email7@test.com\", \"123-456-7890\", 1));\n        users.add(createUser(8, \"user8\", \"first name 8\", \"last name 8\",\n                \"email8@test.com\", \"123-456-7890\", 2));\n        users.add(createUser(9, \"user9\", \"first name 9\", \"last name 9\",\n                \"email9@test.com\", \"123-456-7890\", 3));\n        users.add(createUser(10, \"user10\", \"first name 10\", \"last name 10\",\n                \"email10@test.com\", \"123-456-7890\", 1));\n        users.add(createUser(11, \"user?10\", \"first name ?10\", \"last name ?10\",\n                \"email101@test.com\", \"123-456-7890\", 1));\n\n    }\n\n    public User findUserByName(String username) {\n        for (User user : users) {\n            if (user.getUsername().equals(username)) {\n                return user;\n            }\n        }\n        return null;\n    }\n\n    public void addUser(User user) {\n        if (users.size() > 0) {\n            for (int i = users.size() - 1; i >= 0; i--) {\n                if (users.get(i).getUsername().equals(user.getUsername())) {\n                    users.remove(i);\n                }\n            }\n        }\n        users.add(user);\n    }\n\n    public boolean removeUser(String username) {\n        if (users.size() > 0) {\n            for (int i = users.size() - 1; i >= 0; i--) {\n                if (users.get(i).getUsername().equals(username)) {\n                    users.remove(i);\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n\n    private static User createUser(long id, String username, String firstName,\n                                   String lastName, String email, String phone, int userStatus) {\n        User user = new User();\n        user.setId(id);\n        user.setUsername(username);\n        user.setFirstName(firstName);\n        user.setLastName(lastName);\n        user.setEmail(email);\n        user.setPassword(\"XXXXXXXXXXX\");\n        user.setPhone(phone);\n        user.setUserStatus(userStatus);\n        return user;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/exception/ApiException.java",
    "content": "package io.swagger.v3.plugin.maven.resources.exception;\n\npublic class ApiException extends Exception {\n    private int code;\n\n    public ApiException(int code, String msg) {\n        super(msg);\n        this.code = code;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/exception/NotFoundException.java",
    "content": "package io.swagger.v3.plugin.maven.resources.exception;\n\npublic class NotFoundException extends ApiException {\n    private int code;\n\n    public NotFoundException(int code, String msg) {\n        super(code, msg);\n        this.code = code;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/Category.java",
    "content": "package io.swagger.v3.plugin.maven.resources.model;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Category\")\npublic class Category {\n    private long id;\n    private String name;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public Category() {\n    }\n\n    public Category(String name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/CustomGenerator.java",
    "content": "package io.swagger.v3.plugin.maven.resources.model;\n\nimport com.fasterxml.jackson.annotation.ObjectIdGenerator;\nimport com.fasterxml.jackson.annotation.ObjectIdGenerators;\n\npublic class CustomGenerator extends ObjectIdGenerators.PropertyGenerator {\n    private static final long serialVersionUID = 1L;\n\n    protected CustomGenerator(Class<?> scope) {\n        super(scope);\n    }\n\n    @Override\n    public ObjectIdGenerator<Object> forScope(Class<?> scope) {\n        return null;\n    }\n\n    @Override\n    public ObjectIdGenerator<Object> newForSerialization(Object context) {\n        return null;\n    }\n\n    @Override\n    public IdKey key(Object key) {\n        return null;\n    }\n\n    @Override\n    public Object generateId(Object forPojo) {\n        return null;\n    }\n}"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/ExtensionUser.java",
    "content": "package io.swagger.v3.plugin.maven.resources.model;\n\nimport io.swagger.v3.oas.annotations.extensions.Extension;\nimport io.swagger.v3.oas.annotations.extensions.ExtensionProperty;\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"User\")\n@Schema(\n        description = \"User\",\n        extensions = {\n                @Extension(name = \"x-user\", properties = {\n                        @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                @Extension(name = \"user-extensions\", properties = {\n                        @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                        @ExtensionProperty(name = \"address\", value = \"House\")})\n        }\n)\npublic class ExtensionUser {\n    private long id;\n    private String username;\n    private String firstName;\n    private String lastName;\n    private String email;\n    private String password;\n    private String phone;\n    private int userStatus;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"firstName\")\n    public String getFirstName() {\n        return firstName;\n    }\n\n    public void setFirstName(String firstName) {\n        this.firstName = firstName;\n    }\n\n    @XmlElement(name = \"username\")\n    public String getUsername() {\n        return username;\n    }\n\n    public void setUsername(String username) {\n        this.username = username;\n    }\n\n    @XmlElement(name = \"lastName\")\n    public String getLastName() {\n        return lastName;\n    }\n\n    public void setLastName(String lastName) {\n        this.lastName = lastName;\n    }\n\n    @XmlElement(name = \"email\")\n    public String getEmail() {\n        return email;\n    }\n\n    public void setEmail(String email) {\n        this.email = email;\n    }\n\n    @XmlElement(name = \"password\")\n    public String getPassword() {\n        return password;\n    }\n\n    public void setPassword(String password) {\n        this.password = password;\n    }\n\n    @XmlElement(name = \"phone\")\n    public String getPhone() {\n        return phone;\n    }\n\n    public void setPhone(String phone) {\n        this.phone = phone;\n    }\n\n    @XmlElement(name = \"userStatus\")\n    @Schema(\n            description = \"User Status\",\n            allowableValues = \"1-registered,2-active,3-closed\",\n            extensions = {\n                    @Extension(name = \"x-userStatus\", properties = {\n                            @ExtensionProperty(name = \"name\", value = \"Josh\")}),\n                    @Extension(name = \"userStatus-extensions\", properties = {\n                            @ExtensionProperty(name = \"lastName\", value = \"Hart\"),\n                            @ExtensionProperty(name = \"address\", value = \"House\")})\n            }\n    )\n    public int getUserStatus() {\n        return userStatus;\n    }\n\n    public void setUserStatus(int userStatus) {\n        this.userStatus = userStatus;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/JacksonBean.java",
    "content": "package io.swagger.v3.plugin.maven.resources.model;\n\nimport com.fasterxml.jackson.annotation.JsonCreator;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonUnwrapped;\nimport com.fasterxml.jackson.annotation.JsonValue;\n\npublic class JacksonBean {\n\n    private String id;\n    private String ignored;\n    private StringValueBean bean;\n    private NotFoundModel model;\n    private NotFoundModel model2;\n\n    @JsonIgnore\n    public String getIgnored() {\n        return ignored;\n    }\n\n    public void setIgnored(String ignored) {\n        this.ignored = ignored;\n    }\n\n    public void setId(String id) {\n        this.id = id;\n    }\n\n    public void setModel(NotFoundModel model) {\n        this.model = model;\n    }\n\n    public StringValueBean getBean() {\n        return bean;\n    }\n\n    public void setBean(StringValueBean bean) {\n        this.bean = bean;\n    }\n\n    @JsonProperty(\"identity\")\n    public String getId() {\n        return id;\n    }\n\n    @JsonUnwrapped\n    public NotFoundModel getModel() {\n        return model;\n    }\n\n    @JsonUnwrapped(prefix = \"pre\", suffix = \"suf\")\n    public NotFoundModel getModel2() {\n        return model2;\n    }\n\n    public void setModel2(NotFoundModel model2) {\n        this.model2 = model2;\n    }\n\n    public static class StringValueBean {\n\n        private final String value;\n\n        @JsonCreator\n        public StringValueBean(String value) {\n            this.value = value;\n        }\n\n        @JsonValue\n        public String getValue() {\n            return value;\n        }\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/ListOfStringsBeanParam.java",
    "content": "package io.swagger.v3.plugin.maven.resources.model;\n\nimport javax.ws.rs.QueryParam;\nimport java.util.List;\n\npublic class ListOfStringsBeanParam {\n    @QueryParam(value = \"listOfStrings\")\n    private List<String> list;\n\n    public List<String> getList() {\n        return list;\n    }\n\n    public void setList(List<String> list) {\n        this.list = list;\n    }\n}"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/ModelWithJsonIdentity.java",
    "content": "package io.swagger.v3.plugin.maven.resources.model;\n\nimport com.fasterxml.jackson.annotation.JsonIdentityInfo;\nimport com.fasterxml.jackson.annotation.JsonIdentityReference;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.ObjectIdGenerators;\n\npublic class ModelWithJsonIdentity {\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"name\")\n    @JsonProperty(\"PropertyGeneratorAsId\")\n    public SourceDefinition1 testPropertyGeneratorAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"name\")\n    @JsonProperty(\"PropertyGeneratorAsProperty\")\n    public SourceDefinition1 testPropertyGeneratorAsProperty;\n\n    public class SourceDefinition1 {\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"driverId\")\n    @JsonProperty(\"ChangedPropertyName\")\n    public SourceDefinition2 testChangedPropertyName;\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"driverId\")\n    @JsonProperty(\"ChangedPropertyName2\")\n    public SourceDefinition2 testChangedPropertyName2;\n\n    static public class SourceDefinition2 {\n        @JsonProperty(\"driverId\")\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class)\n    @JsonProperty(\"SourceWithoutPropertyAsId\")\n    public SourceDefinition3 testWithoutPropertyAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class)\n    @JsonProperty(\"SourceWithoutPropertyAsProperty\")\n    public SourceDefinition3 testWithoutPropertyAsProperty;\n\n    public class SourceDefinition3 {\n        @JsonProperty(\"driverId\")\n        public String driver;\n        public String name;\n\n        @JsonProperty(\"@id\")\n        public String id;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = \"testName1\")\n    @JsonProperty(\"IntSequenceGeneratorAsId\")\n    public SourceDefinition4 testIntSequenceGeneratorAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = \"testName2\")\n    @JsonProperty(\"IntSequenceGeneratorAsProperty\")\n    public SourceDefinition4 testIntSequenceGeneratorAsProperty;\n\n    public class SourceDefinition4 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class)\n    @JsonProperty(\"IntSequenceWithoutPropertyAsId\")\n    public SourceDefinition5 testIntSequenceWithoutPropertyAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class)\n    @JsonProperty(\"IntSequenceWithoutPropertyAsProperty\")\n    public SourceDefinition5 testIntSequenceWithoutPropertyAsProperty;\n\n    public class SourceDefinition5 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = \"UUID1\")\n    @JsonProperty(\"UUIDGeneratorAsId\")\n    public SourceDefinition6 testUUIDGeneratorAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = \"UUID2\")\n    @JsonProperty(\"UUIDGeneratorAsProperty\")\n    public SourceDefinition6 testUUIDGeneratorAsProperty;\n\n    public class SourceDefinition6 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class)\n    @JsonProperty(\"UUIDGeneratorWithoutPropertyAsId\")\n    public SourceDefinition7 testUUIDGeneratorWithoutPropertyAsId;\n\n    @JsonIdentityReference(alwaysAsId = false)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class)\n    @JsonProperty(\"UUIDGeneratorWithoutPropertyAsProperty\")\n    public SourceDefinition7 testUUIDGeneratorWithoutPropertyAsProperty;\n\n    public class SourceDefinition7 {\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = ObjectIdGenerators.None.class, property = \"testGeneratorsNone\")\n    @JsonProperty(\"GeneratorsNone\")\n    public SourceDefinition8 testGeneratorsNone;\n\n    public class SourceDefinition8 {\n        @JsonProperty(\"driverId\")\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityReference(alwaysAsId = true)\n    @JsonIdentityInfo(generator = CustomGenerator.class, property = \"name\")\n    @JsonProperty(\"CustomGenerator\")\n    public SourceDefinition9 testCustomGenerator;\n\n    public class SourceDefinition9 {\n        public String driver;\n        public String name;\n    }\n\n    @JsonIdentityInfo(generator = CustomGenerator.class, property = \"name\")\n    @JsonProperty(\"WithoutJsonIdentityReference\")\n    public SourceDefinition10 testWithoutJsonIdentityReference;\n\n    public class SourceDefinition10 {\n        public String driver;\n        public String name;\n    }\n}"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/ModelWithJsonIdentityCyclic.java",
    "content": "package io.swagger.v3.plugin.maven.resources.model;\n\nimport com.fasterxml.jackson.annotation.JsonIdentityInfo;\nimport com.fasterxml.jackson.annotation.JsonIdentityReference;\nimport com.fasterxml.jackson.annotation.ObjectIdGenerators;\n\nimport java.util.List;\n\npublic class ModelWithJsonIdentityCyclic {\n\n    public Long id;\n\n    public List<SourceDefinition> sourceDefinitions;\n\n    @JsonIdentityInfo(\n            generator = ObjectIdGenerators.PropertyGenerator.class,\n            property = \"name\")\n    public static class SourceDefinition {\n        public String driver;\n        public String name;\n\n        @JsonIdentityReference(alwaysAsId=true)\n        @JsonIdentityInfo(\n                generator = ObjectIdGenerators.PropertyGenerator.class,\n                property = \"id\")\n        public ModelWithJsonIdentityCyclic model;\n    }\n\n}"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/MultipleBaseBean.java",
    "content": "package io.swagger.v3.plugin.maven.resources.model;\n\n@io.swagger.v3.oas.annotations.media.Schema(\n        description = \"MultipleBaseBean\",\n        subTypes = { MultipleSub1Bean.class, MultipleSub2Bean.class }\n)\npublic class MultipleBaseBean {\n    public String beanType;\n    public int a;\n    public String b;\n}"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/MultipleSub1Bean.java",
    "content": "package io.swagger.v3.plugin.maven.resources.model;\n\n@io.swagger.v3.oas.annotations.media.Schema(\n        description = \"MultipleSub1Bean\"\n)\npublic class MultipleSub1Bean extends MultipleBaseBean {\n    public int c;\n}"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/MultipleSub2Bean.java",
    "content": "package io.swagger.v3.plugin.maven.resources.model;\n\n@io.swagger.v3.oas.annotations.media.Schema(\n        description = \"MultipleSub2Bean\"\n)\npublic class MultipleSub2Bean extends MultipleBaseBean {\n    public int d;\n}"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/NotFoundModel.java",
    "content": "package io.swagger.v3.plugin.maven.resources.model;\n\npublic class NotFoundModel {\n    int code;\n    String message;\n\n    public NotFoundModel() {\n    }\n\n    public NotFoundModel(int code, String message) {\n        this.code = code;\n        this.message = message;\n    }\n\n    public int getCode() {\n        return code;\n    }\n\n    public void setCode(int code) {\n        this.code = code;\n    }\n\n    public String getMessage() {\n        return message;\n    }\n\n    public void setMessage(String message) {\n        this.message = message;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/Pet.java",
    "content": "package io.swagger.v3.plugin.maven.resources.model;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlElementWrapper;\nimport javax.xml.bind.annotation.XmlRootElement;\nimport java.util.ArrayList;\nimport java.util.List;\n\n@XmlRootElement(name = \"Pet\")\npublic class Pet {\n    private long id;\n    private Category category;\n    private String name;\n    private List<String> photoUrls = new ArrayList<String>();\n    private List<Tag> tags = new ArrayList<Tag>();\n    private String status;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"category\")\n    public Category getCategory() {\n        return category;\n    }\n\n    public void setCategory(Category category) {\n        this.category = category;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    @XmlElementWrapper(name = \"photoUrls\")\n    @XmlElement(name = \"photoUrl\")\n    public List<String> getPhotoUrls() {\n        return photoUrls;\n    }\n\n    public void setPhotoUrls(List<String> photoUrls) {\n        this.photoUrls = photoUrls;\n    }\n\n    @XmlElementWrapper(name = \"tags\")\n    @XmlElement(name = \"tag\")\n    public List<Tag> getTags() {\n        return tags;\n    }\n\n    public void setTags(List<Tag> tags) {\n        this.tags = tags;\n    }\n\n    @XmlElement(name = \"status\")\n    @Schema(description = \"pet status in the store\", allowableValues = \"available,pending,sold\")\n    public String getStatus() {\n        return status;\n    }\n\n    public void setStatus(String status) {\n        this.status = status;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/Tag.java",
    "content": "package io.swagger.v3.plugin.maven.resources.model;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Tag\")\npublic class Tag {\n    private long id;\n    private String name;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"name\")\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/User.java",
    "content": "package io.swagger.v3.plugin.maven.resources.model;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"User\")\npublic class User {\n    private long id;\n    private String username;\n    private String firstName;\n    private String lastName;\n    private String email;\n    private String password;\n    private String phone;\n    private int userStatus;\n\n    @XmlElement(name = \"id\")\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    @XmlElement(name = \"firstName\")\n    public String getFirstName() {\n        return firstName;\n    }\n\n    public void setFirstName(String firstName) {\n        this.firstName = firstName;\n    }\n\n    @XmlElement(name = \"username\")\n    public String getUsername() {\n        return username;\n    }\n\n    public void setUsername(String username) {\n        this.username = username;\n    }\n\n    @XmlElement(name = \"lastName\")\n    public String getLastName() {\n        return lastName;\n    }\n\n    public void setLastName(String lastName) {\n        this.lastName = lastName;\n    }\n\n    @XmlElement(name = \"email\")\n    public String getEmail() {\n        return email;\n    }\n\n    public void setEmail(String email) {\n        this.email = email;\n    }\n\n    @XmlElement(name = \"password\")\n    public String getPassword() {\n        return password;\n    }\n\n    public void setPassword(String password) {\n        this.password = password;\n    }\n\n    @XmlElement(name = \"phone\")\n    public String getPhone() {\n        return phone;\n    }\n\n    public void setPhone(String phone) {\n        this.phone = phone;\n    }\n\n    @XmlElement(name = \"userStatus\")\n    @Schema(description = \"User Status\", allowableValues = \"1-registered,2-active,3-closed\")\n    public int getUserStatus() {\n        return userStatus;\n    }\n\n    public void setUserStatus(int userStatus) {\n        this.userStatus = userStatus;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/configurationFile.yaml",
    "content": "resourcePackages:\n  - io.swagger.v3.plugin.maven.petstore.petstore\nprettyPrint: true\ncacheTTL: 0\nopenAPI:\n  openapi: 3.0.1\n  servers:\n    - url: http://foo\n      description: server 1\n      variables:\n        var1:\n          description: var 1\n          enum:\n            - \"1\"\n            - \"2\"\n          default: \"1\"\n        var2:\n          description: var 2\n          enum:\n            - \"1\"\n            - \"2\"\n          default: \"1\"\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/configurationFile2.yaml",
    "content": "resourcePackages:\n  - io.swagger.v3.plugin.maven.petstore.petstore\nprettyPrint: true\nopenAPI31: true\nconvertToOpenAPI31: true\ncacheTTL: 0\nopenAPI:\n  openapi: 3.0.1\n  info:\n    version: 1.0.0\n    title: OpenAPI 3.0\n  servers:\n    - url: http://bar\n      description: server 1\n  paths: {}\n  components:\n    schemas:\n      Address:\n        type: object\n        properties:\n          street:\n            type: string\n            example: 437 Lytton\n          code:\n            type: integer\n            format: int32\n            minimum: 1\n            maximum: 50\n            exclusiveMaximum: true\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/logback-test.xml",
    "content": "<configuration debug=\"false\" scan=\"false\" scanPeriod=\"10 seconds\">\n    <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleAppender\">\n        <filter class=\"ch.qos.logback.classic.filter.ThresholdFilter\">\n            <level>ERROR</level>\n        </filter>\n        <encoder>\n            <pattern>%d [%thread]%level %logger - %msg%n</pattern>\n        </encoder>\n    </appender>\n\n    <root level=\"INFO\">\n        <appender-ref ref=\"STDOUT\"/>\n    </root>\n</configuration>"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/openapiinput.json",
    "content": "{\n  \"openapi\": \"3.0.1\",\n  \"servers\": [\n    {\n      \"url\": \"http://foo\",\n      \"description\": \"server 1\",\n      \"variables\": {\n        \"var1\": {\n          \"description\": \"var 1\",\n          \"enum\": [\n            \"1\",\n            \"2\"\n          ],\n          \"default\": \"1\"\n        },\n        \"var2\": {\n          \"description\": \"var 2\",\n          \"enum\": [\n            \"1\",\n            \"2\"\n          ],\n          \"default\": \"1\"\n        }\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/openapiinput.yaml",
    "content": "openapi: 3.0.1\nservers:\n- url: http://foo\n  description: server 1\n  variables:\n    var1:\n      description: var 1\n      enum:\n      - \"1\"\n      - \"2\"\n      default: \"1\"\n    var2:\n      description: var 2\n      enum:\n      - \"1\"\n      - \"2\"\n      default: \"1\"\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/openapiinput2.yaml",
    "content": "openapi: 3.0.1\nservers:\n  - url: http://bar\n    description: server 1\n    variables:\n      var1:\n        description: var 1\n        enum:\n          - \"1\"\n          - \"2\"\n        default: \"1\"\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/pom.resolveToFile.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>io.swagger.core.v3</groupId>\n    <artifactId>swagger-maven-plugin-test</artifactId>\n    <packaging>jar</packaging>\n    <version>1.0-SNAPSHOT</version>\n    <name>Test Resolve YAML</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>io.swagger.core.v3</groupId>\n                <artifactId>swagger-maven-plugin</artifactId>\n                <configuration>\n                    <outputFileName>spec</outputFileName>\n                    <outputPath>${project.basedir}/../../../target/generatedtest</outputPath>\n                    <openapiFilePath>${project.basedir}/../../../src/test/resources/openapiinput.yaml</openapiFilePath>\n                    <outputFormat>YAML</outputFormat>\n                    <resourcePackages>\n                        <package>io.swagger.v3.plugin.maven.petstore.petstore</package>\n                    </resourcePackages>\n                    <prettyPrint>TRUE</prettyPrint>\n                    <!--<filterClass>test.filter.Clazz</filterClass>-->\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n\n        <dependency>\n            <groupId>javax.ws.rs</groupId>\n            <artifactId>javax.ws.rs-api</artifactId>\n            <version>2.1</version>\n        </dependency>\n        <dependency>\n            <groupId>javax.servlet</groupId>\n            <artifactId>javax.servlet-api</artifactId>\n            <version>3.1</version>\n        </dependency>\n\n    </dependencies>\n    <properties>\n        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>\n    </properties>\n</project>"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/pom.resolveToFile31.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>io.swagger.core.v3</groupId>\n    <artifactId>swagger-maven-plugin-test</artifactId>\n    <packaging>jar</packaging>\n    <version>1.0-SNAPSHOT</version>\n    <name>Test Resolve YAML</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>io.swagger.core.v3</groupId>\n                <artifactId>swagger-maven-plugin</artifactId>\n                <configuration>\n                    <outputFileName>spec</outputFileName>\n                    <outputPath>${project.basedir}/../../../target/generatedtest</outputPath>\n                    <openapiFilePath>${project.basedir}/../../../src/test/resources/openapiinput.yaml</openapiFilePath>\n                    <outputFormat>YAML</outputFormat>\n                    <resourcePackages>\n                        <package>io.swagger.v3.plugin.maven.petstore.petstore31</package>\n                    </resourcePackages>\n                    <prettyPrint>TRUE</prettyPrint>\n                    <openapi31>TRUE</openapi31>\n                    <!--<filterClass>test.filter.Clazz</filterClass>-->\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n\n        <dependency>\n            <groupId>javax.ws.rs</groupId>\n            <artifactId>javax.ws.rs-api</artifactId>\n            <version>2.1</version>\n        </dependency>\n        <dependency>\n            <groupId>javax.servlet</groupId>\n            <artifactId>javax.servlet-api</artifactId>\n            <version>3.1</version>\n        </dependency>\n\n    </dependencies>\n    <properties>\n        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>\n    </properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/pom.resolveToFileFromConfig.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>io.swagger.core.v3</groupId>\n    <artifactId>swagger-maven-plugin-test</artifactId>\n    <packaging>jar</packaging>\n    <version>1.0-SNAPSHOT</version>\n    <name>Test Resolve YAML</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>io.swagger.core.v3</groupId>\n                <artifactId>swagger-maven-plugin</artifactId>\n                <configuration>\n                    <outputFileName>openapiconfig3</outputFileName>\n                    <outputPath>${project.basedir}/../../../target/generatedtest</outputPath>\n                    <configurationFilePath>${project.basedir}/../../../src/test/resources/configurationFile.yaml\n                    </configurationFilePath>\n                    <outputFormat>JSONANDYAML</outputFormat>\n                </configuration>\n\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n\n        <dependency>\n            <groupId>javax.ws.rs</groupId>\n            <artifactId>javax.ws.rs-api</artifactId>\n            <version>2.1</version>\n        </dependency>\n        <dependency>\n            <groupId>javax.servlet</groupId>\n            <artifactId>javax.servlet-api</artifactId>\n            <version>3.1</version>\n        </dependency>\n\n    </dependencies>\n    <properties>\n        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>\n    </properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/pom.resolveToFileFromConfigAndOpenApi.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>io.swagger.core.v3</groupId>\n    <artifactId>swagger-maven-plugin-test</artifactId>\n    <packaging>jar</packaging>\n    <version>1.0-SNAPSHOT</version>\n    <name>Test Resolve YAML</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>io.swagger.core.v3</groupId>\n                <artifactId>swagger-maven-plugin</artifactId>\n                <configuration>\n                    <outputFileName>openapiconfig2</outputFileName>\n                    <outputPath>${project.basedir}/../../../target/generatedtest</outputPath>\n                    <configurationFilePath>${project.basedir}/../../../src/test/resources/configurationFile.yaml\n                    </configurationFilePath>\n                    <openapiFilePath>${project.basedir}/../../../src/test/resources/openapiinput2.yaml</openapiFilePath>\n                    <outputFormat>JSONANDYAML</outputFormat>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n\n        <dependency>\n            <groupId>javax.ws.rs</groupId>\n            <artifactId>javax.ws.rs-api</artifactId>\n            <version>2.1</version>\n        </dependency>\n        <dependency>\n            <groupId>javax.servlet</groupId>\n            <artifactId>javax.servlet-api</artifactId>\n            <version>3.1</version>\n        </dependency>\n\n    </dependencies>\n    <properties>\n        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>\n    </properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/pom.resolveToFileFromConfigWithOAS3.1Filter.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>io.swagger.core.v3</groupId>\n    <artifactId>swagger-maven-plugin-test</artifactId>\n    <packaging>jar</packaging>\n    <version>1.0-SNAPSHOT</version>\n    <name>Test Resolve YAML</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>io.swagger.core.v3</groupId>\n                <artifactId>swagger-maven-plugin</artifactId>\n                <configuration>\n                    <outputFileName>openapiconfig2</outputFileName>\n                    <outputPath>${project.basedir}/../../../target/generatedtest</outputPath>\n                    <configurationFilePath>${project.basedir}/../../../src/test/resources/configurationFile2.yaml\n                    </configurationFilePath>\n                    <outputFormat>JSONANDYAML</outputFormat>\n                    <openapi31>true</openapi31>\n                    <convertToOpenAPI31>true</convertToOpenAPI31>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n\n        <dependency>\n            <groupId>javax.ws.rs</groupId>\n            <artifactId>javax.ws.rs-api</artifactId>\n            <version>2.1</version>\n        </dependency>\n        <dependency>\n            <groupId>javax.servlet</groupId>\n            <artifactId>javax.servlet-api</artifactId>\n            <version>3.1</version>\n        </dependency>\n\n    </dependencies>\n    <properties>\n        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>\n    </properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/pom.resolveToFileFromJsonInput.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>io.swagger.core.v3</groupId>\n    <artifactId>swagger-maven-plugin-test</artifactId>\n    <packaging>jar</packaging>\n    <version>1.0-SNAPSHOT</version>\n    <name>Test Resolve YAML</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>io.swagger.core.v3</groupId>\n                <artifactId>swagger-maven-plugin</artifactId>\n                <configuration>\n                    <outputFileName>openapiconfigjson</outputFileName>\n                    <outputPath>${project.basedir}/../../../target/generatedtest</outputPath>\n                    <openapiFilePath>${project.basedir}/../../../src/test/resources/openapiinput.json</openapiFilePath>\n                    <outputFormat>YAML</outputFormat>\n                    <resourcePackages>\n                        <package>io.swagger.v3.plugin.maven.petstore.petstore</package>\n                    </resourcePackages>\n                    <prettyPrint>TRUE</prettyPrint>\n                    <!--<filterClass>test.filter.Clazz</filterClass>-->\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n\n        <dependency>\n            <groupId>javax.ws.rs</groupId>\n            <artifactId>javax.ws.rs-api</artifactId>\n            <version>2.1</version>\n        </dependency>\n        <dependency>\n            <groupId>javax.servlet</groupId>\n            <artifactId>javax.servlet-api</artifactId>\n            <version>3.1</version>\n        </dependency>\n\n    </dependencies>\n    <properties>\n        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>\n    </properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/pom.resolveToFileJsonAndYaml.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>io.swagger.core.v3</groupId>\n    <artifactId>swagger-maven-plugin-test</artifactId>\n    <packaging>jar</packaging>\n    <version>1.0-SNAPSHOT</version>\n    <name>Test Resolve YAML</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>io.swagger.core.v3</groupId>\n                <artifactId>swagger-maven-plugin</artifactId>\n                <configuration>\n                    <outputFileName>openapi</outputFileName>\n                    <outputPath>${project.basedir}/../../../target/generatedtest</outputPath>\n                    <openapiFilePath>${project.basedir}/../../../src/test/resources/openapiinput.yaml</openapiFilePath>\n                    <outputFormat>JSONANDYAML</outputFormat>\n                    <resourcePackages>\n                        <package>io.swagger.v3.plugin.maven.petstore.petstore</package>\n                    </resourcePackages>\n                    <prettyPrint>TRUE</prettyPrint>\n                    <!--<filterClass>test.filter.Clazz</filterClass>-->\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n\n        <dependency>\n            <groupId>javax.ws.rs</groupId>\n            <artifactId>javax.ws.rs-api</artifactId>\n            <version>2.1</version>\n        </dependency>\n        <dependency>\n            <groupId>javax.servlet</groupId>\n            <artifactId>javax.servlet-api</artifactId>\n            <version>3.1</version>\n        </dependency>\n\n    </dependencies>\n</project>"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/pom.resolveToFileNoName.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>io.swagger.core.v3</groupId>\n    <artifactId>swagger-maven-plugin-test</artifactId>\n    <packaging>jar</packaging>\n    <version>1.0-SNAPSHOT</version>\n    <name>Test Resolve YAML</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>io.swagger.core.v3</groupId>\n                <artifactId>swagger-maven-plugin</artifactId>\n                <configuration>\n                    <outputPath>${project.basedir}/../../../target/generatedtest</outputPath>\n                    <openapiFilePath>${project.basedir}/../../../src/test/resources/openapiinput.yaml</openapiFilePath>\n                    <outputFormat>YAML</outputFormat>\n                    <resourcePackages>\n                        <package>io.swagger.v3.plugin.maven.petstore.petstore</package>\n                    </resourcePackages>\n                    <prettyPrint>TRUE</prettyPrint>\n                    <!--<filterClass>test.filter.Clazz</filterClass>-->\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n\n        <dependency>\n            <groupId>javax.ws.rs</groupId>\n            <artifactId>javax.ws.rs-api</artifactId>\n            <version>2.1</version>\n        </dependency>\n        <dependency>\n            <groupId>javax.servlet</groupId>\n            <artifactId>javax.servlet-api</artifactId>\n            <version>3.1</version>\n        </dependency>\n\n    </dependencies>\n</project>"
  },
  {
    "path": "modules/swagger-maven-plugin/src/test/resources/pom.resolveToFileWithFilter.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>io.swagger.core.v3</groupId>\n    <artifactId>swagger-maven-plugin-test</artifactId>\n    <packaging>jar</packaging>\n    <version>1.0-SNAPSHOT</version>\n    <name>Test Resolve YAML</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>io.swagger.core.v3</groupId>\n                <artifactId>swagger-maven-plugin</artifactId>\n                <configuration>\n                    <outputFileName>spec</outputFileName>\n                    <outputPath>${project.basedir}/../../../target/generatedtest</outputPath>\n                    <openapiFilePath>${project.basedir}/../../../src/test/resources/openapiinput.yaml</openapiFilePath>\n                    <outputFormat>YAML</outputFormat>\n                    <resourcePackages>\n                        <package>io.swagger.v3.plugin.maven.petstore.petstore</package>\n                    </resourcePackages>\n                    <prettyPrint>TRUE</prettyPrint>\n                    <filterClass>io.swagger.v3.plugin.maven.resources.MyFilter</filterClass>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n\n        <dependency>\n            <groupId>javax.ws.rs</groupId>\n            <artifactId>javax.ws.rs-api</artifactId>\n            <version>2.1</version>\n        </dependency>\n        <dependency>\n            <groupId>javax.servlet</groupId>\n            <artifactId>javax.servlet-api</artifactId>\n            <version>3.1</version>\n        </dependency>\n\n    </dependencies>\n    <properties>\n        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>\n    </properties>\n</project>"
  },
  {
    "path": "modules/swagger-models/CODE_COVERAGE.md",
    "content": "# Code Coverage Report generation\n\nTo generate the code coverage report, execute the following command:\n> mvn clean verify\n\nThis will generate code coverage report in each of the modules. In order to view the same, open the following file in your browser.\n> target/site/jacoco/index.html "
  },
  {
    "path": "modules/swagger-models/pom.xml",
    "content": "<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txmlns=\"http://maven.apache.org/POM/4.0.0\"\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <parent>\n        <groupId>io.swagger.core.v3</groupId>\n        <artifactId>swagger-project</artifactId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../..</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-models</artifactId>\n    <name>swagger-models</name>\n    <description>swagger-models</description>\n    <build>\n        <sourceDirectory>src/main/java</sourceDirectory>\n        <defaultGoal>install</defaultGoal>\n        <testResources>\n            <testResource>\n                <directory>src/test/resources</directory>\n            </testResource>\n        </testResources>\n        <plugins>\n            <plugin>\n                <groupId>biz.aQute.bnd</groupId>\n                <artifactId>bnd-maven-plugin</artifactId>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <configuration>\n                    <archive>\n                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>\n                        <manifestEntries>\n                            <Automatic-Module-Name>io.swagger.v3.oas.models</Automatic-Module-Name>\n                        </manifestEntries>\n                    </archive>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-surefire-plugin</artifactId>\n                <version>${surefire-version}</version>\n                <configuration>\n                    <argLine>-Djdk.attach.allowAttachSelf</argLine>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>com.fasterxml.jackson.core</groupId>\n            <artifactId>jackson-core</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.core</groupId>\n            <artifactId>jackson-databind</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.testng</groupId>\n            <artifactId>testng</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.jmockit</groupId>\n            <artifactId>jmockit</artifactId>\n            <version>${jmockit-version}</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.core</groupId>\n            <artifactId>jackson-annotations</artifactId>\n        </dependency>\n    </dependencies>\n\n\n    <properties>\n        <coverage.complexity.minimum>0.07</coverage.complexity.minimum>\n        <coverage.line.minimum>0.0</coverage.line.minimum>\n        <jmockit-version>1.49</jmockit-version>\n        <mockito-version>2.28.2</mockito-version>\n    </properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/Components.java",
    "content": "package io.swagger.v3.oas.models;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\nimport io.swagger.v3.oas.models.callbacks.Callback;\nimport io.swagger.v3.oas.models.examples.Example;\nimport io.swagger.v3.oas.models.headers.Header;\nimport io.swagger.v3.oas.models.links.Link;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.security.SecurityScheme;\n\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport java.util.Objects;\n\n/**\n * Components\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#components-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#components-object\"\n */\n\npublic class Components {\n\n    /**\n     * @since 2.1.6\n     */\n    public static final String COMPONENTS_SCHEMAS_REF = \"#/components/schemas/\";\n    private Map<String, Schema> schemas = null;\n    private Map<String, ApiResponse> responses = null;\n    private Map<String, Parameter> parameters = null;\n    private Map<String, Example> examples = null;\n    private Map<String, RequestBody> requestBodies = null;\n    private Map<String, Header> headers = null;\n    private Map<String, SecurityScheme> securitySchemes = null;\n    private Map<String, Link> links = null;\n    private Map<String, Callback> callbacks = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Map<String, PathItem> pathItems;\n\n    /**\n     * returns the schemas property from a Components instance.\n     *\n     * @return Map&lt;String, Schema&gt; schemas\n     **/\n\n    public Map<String, Schema> getSchemas() {\n        return schemas;\n    }\n\n    public void setSchemas(Map<String, Schema> schemas) {\n        this.schemas = schemas;\n    }\n\n    public Components schemas(Map<String, Schema> schemas) {\n        this.schemas = schemas;\n        return this;\n    }\n\n    public Components addSchemas(String key, Schema schemasItem) {\n        if (this.schemas == null) {\n            this.schemas = new LinkedHashMap<>();\n        }\n        this.schemas.put(key, schemasItem);\n        return this;\n    }\n\n    /**\n     * returns the responses property from a Components instance.\n     *\n     * @return Map&lt;String, ApiResponse&gt; responses\n     **/\n\n    public Map<String, ApiResponse> getResponses() {\n        return responses;\n    }\n\n    public void setResponses(Map<String, ApiResponse> responses) {\n        this.responses = responses;\n    }\n\n    public Components responses(Map<String, ApiResponse> responses) {\n        this.responses = responses;\n        return this;\n    }\n\n    public Components addResponses(String key, ApiResponse responsesItem) {\n        if (this.responses == null) {\n            this.responses = new LinkedHashMap<>();\n        }\n        this.responses.put(key, responsesItem);\n        return this;\n    }\n\n    /**\n     * returns the parameters property from a Components instance.\n     *\n     * @return Map&lt;String, Parameter&gt; parameters\n     **/\n\n    public Map<String, Parameter> getParameters() {\n        return parameters;\n    }\n\n    public void setParameters(Map<String, Parameter> parameters) {\n        this.parameters = parameters;\n    }\n\n    public Components parameters(Map<String, Parameter> parameters) {\n        this.parameters = parameters;\n        return this;\n    }\n\n    public Components addParameters(String key, Parameter parametersItem) {\n        if (this.parameters == null) {\n            this.parameters = new LinkedHashMap<>();\n        }\n        this.parameters.put(key, parametersItem);\n        return this;\n    }\n\n    /**\n     * returns the examples property from a Components instance.\n     *\n     * @return Map&lt;String, Example&gt; examples\n     **/\n\n    public Map<String, Example> getExamples() {\n        return examples;\n    }\n\n    public void setExamples(Map<String, Example> examples) {\n        this.examples = examples;\n    }\n\n    public Components examples(Map<String, Example> examples) {\n        this.examples = examples;\n        return this;\n    }\n\n    public Components addExamples(String key, Example examplesItem) {\n        if (this.examples == null) {\n            this.examples = new LinkedHashMap<>();\n        }\n        this.examples.put(key, examplesItem);\n        return this;\n    }\n\n    /**\n     * returns the requestBodies property from a Components instance.\n     *\n     * @return Map&lt;String, RequestBody&gt; requestBodies\n     **/\n\n    public Map<String, RequestBody> getRequestBodies() {\n        return requestBodies;\n    }\n\n    public void setRequestBodies(Map<String, RequestBody> requestBodies) {\n        this.requestBodies = requestBodies;\n    }\n\n    public Components requestBodies(Map<String, RequestBody> requestBodies) {\n        this.requestBodies = requestBodies;\n        return this;\n    }\n\n    public Components addRequestBodies(String key, RequestBody requestBodiesItem) {\n        if (this.requestBodies == null) {\n            this.requestBodies = new LinkedHashMap<>();\n        }\n        this.requestBodies.put(key, requestBodiesItem);\n        return this;\n    }\n\n    /**\n     * returns the headers property from a Components instance.\n     *\n     * @return Map&lt;String, Header&gt; headers\n     **/\n\n    public Map<String, Header> getHeaders() {\n        return headers;\n    }\n\n    public void setHeaders(Map<String, Header> headers) {\n        this.headers = headers;\n    }\n\n    public Components headers(Map<String, Header> headers) {\n        this.headers = headers;\n        return this;\n    }\n\n    public Components addHeaders(String key, Header headersItem) {\n        if (this.headers == null) {\n            this.headers = new LinkedHashMap<>();\n        }\n        this.headers.put(key, headersItem);\n        return this;\n    }\n\n    /**\n     * returns the securitySchemes property from a Components instance.\n     *\n     * @return Map&lt;String, SecurityScheme&gt; securitySchemes\n     **/\n\n    public Map<String, SecurityScheme> getSecuritySchemes() {\n        return securitySchemes;\n    }\n\n    public void setSecuritySchemes(Map<String, SecurityScheme> securitySchemes) {\n        this.securitySchemes = securitySchemes;\n    }\n\n    public Components securitySchemes(Map<String, SecurityScheme> securitySchemes) {\n        this.securitySchemes = securitySchemes;\n        return this;\n    }\n\n    public Components addSecuritySchemes(String key, SecurityScheme securitySchemesItem) {\n        if (this.securitySchemes == null) {\n            this.securitySchemes = new LinkedHashMap<>();\n        }\n        this.securitySchemes.put(key, securitySchemesItem);\n        return this;\n    }\n\n    /**\n     * returns the links property from a Components instance.\n     *\n     * @return Map&lt;String, Link&gt; links\n     **/\n\n    public Map<String, Link> getLinks() {\n        return links;\n    }\n\n    public void setLinks(Map<String, Link> links) {\n        this.links = links;\n    }\n\n    public Components links(Map<String, Link> links) {\n        this.links = links;\n        return this;\n    }\n\n    public Components addLinks(String key, Link linksItem) {\n        if (this.links == null) {\n            this.links = new LinkedHashMap<>();\n        }\n        this.links.put(key, linksItem);\n        return this;\n    }\n\n    /**\n     * returns the callbacks property from a Components instance.\n     *\n     * @return Map&lt;String, Callback&gt; callbacks\n     **/\n\n    public Map<String, Callback> getCallbacks() {\n        return callbacks;\n    }\n\n    public void setCallbacks(Map<String, Callback> callbacks) {\n        this.callbacks = callbacks;\n    }\n\n    public Components callbacks(Map<String, Callback> callbacks) {\n        this.callbacks = callbacks;\n        return this;\n    }\n\n    public Components addCallbacks(String key, Callback callbacksItem) {\n        if (this.callbacks == null) {\n            this.callbacks = new LinkedHashMap<>();\n        }\n        this.callbacks.put(key, callbacksItem);\n        return this;\n    }\n\n    /**\n     * returns the path items property from a Components instance.\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     * @return Map&lt;String, PathItem&gt; pathItems\n     **/\n    @OpenAPI31\n    public Map<String, PathItem> getPathItems() {\n        return pathItems;\n    }\n\n    @OpenAPI31\n    public void setPathItems(Map<String, PathItem> pathItems) {\n        this.pathItems = pathItems;\n    }\n\n    @OpenAPI31\n    public Components pathItems(Map<String, PathItem> pathItems) {\n        this.pathItems = pathItems;\n        return this;\n    }\n\n    @OpenAPI31\n    public Components addPathItem(String key, PathItem pathItem) {\n        if (this.pathItems == null) {\n            this.pathItems = new LinkedHashMap<>();\n        }\n        this.pathItems.put(key, pathItem);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        Components components = (Components) o;\n        return Objects.equals(this.schemas, components.schemas) &&\n                Objects.equals(this.responses, components.responses) &&\n                Objects.equals(this.parameters, components.parameters) &&\n                Objects.equals(this.examples, components.examples) &&\n                Objects.equals(this.requestBodies, components.requestBodies) &&\n                Objects.equals(this.headers, components.headers) &&\n                Objects.equals(this.securitySchemes, components.securitySchemes) &&\n                Objects.equals(this.links, components.links) &&\n                Objects.equals(this.callbacks, components.callbacks) &&\n                Objects.equals(this.extensions, components.extensions) &&\n                Objects.equals(this.pathItems, components.pathItems);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(schemas, responses, parameters, examples, requestBodies, headers, securitySchemes, links, callbacks, extensions, pathItems);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public Components extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Components {\\n\");\n\n        sb.append(\"    schemas: \").append(toIndentedString(schemas)).append(\"\\n\");\n        sb.append(\"    responses: \").append(toIndentedString(responses)).append(\"\\n\");\n        sb.append(\"    parameters: \").append(toIndentedString(parameters)).append(\"\\n\");\n        sb.append(\"    examples: \").append(toIndentedString(examples)).append(\"\\n\");\n        sb.append(\"    requestBodies: \").append(toIndentedString(requestBodies)).append(\"\\n\");\n        sb.append(\"    headers: \").append(toIndentedString(headers)).append(\"\\n\");\n        sb.append(\"    securitySchemes: \").append(toIndentedString(securitySchemes)).append(\"\\n\");\n        sb.append(\"    links: \").append(toIndentedString(links)).append(\"\\n\");\n        sb.append(\"    callbacks: \").append(toIndentedString(callbacks)).append(\"\\n\");\n        sb.append(\"    pathItems: \").append(toIndentedString(pathItems)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/ExternalDocumentation.java",
    "content": "package io.swagger.v3.oas.models;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\nimport java.util.Objects;\n\n/**\n * ExternalDocumentation\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#external-documentation-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#external-documentation-object\"\n */\n\npublic class ExternalDocumentation {\n    private String description = null;\n    private String url = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the description property from a ExternalDocumentation instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public ExternalDocumentation description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    /**\n     * returns the url property from a ExternalDocumentation instance.\n     *\n     * @return String url\n     **/\n\n    public String getUrl() {\n        return url;\n    }\n\n    public void setUrl(String url) {\n        this.url = url;\n    }\n\n    public ExternalDocumentation url(String url) {\n        this.url = url;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        ExternalDocumentation externalDocumentation = (ExternalDocumentation) o;\n        return Objects.equals(this.description, externalDocumentation.description) &&\n                Objects.equals(this.url, externalDocumentation.url) &&\n                Objects.equals(this.extensions, externalDocumentation.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(description, url, extensions);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public ExternalDocumentation extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class ExternalDocumentation {\\n\");\n\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"    url: \").append(toIndentedString(url)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/OpenAPI.java",
    "content": "package io.swagger.v3.oas.models;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\nimport io.swagger.v3.oas.models.info.Info;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.security.SecurityRequirement;\nimport io.swagger.v3.oas.models.security.SecurityScheme;\nimport io.swagger.v3.oas.models.servers.Server;\nimport io.swagger.v3.oas.models.tags.Tag;\n\nimport java.util.ArrayList;\nimport java.util.LinkedHashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Objects;\n\n/**\n * OpenAPI\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md\"\n */\n\npublic class OpenAPI {\n    private String openapi = \"3.0.1\";\n    private Info info = null;\n    private ExternalDocumentation externalDocs = null;\n    private List<Server> servers = null;\n    private List<SecurityRequirement> security = null;\n    private List<Tag> tags = null;\n    private Paths paths = null;\n    private Components components = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private String jsonSchemaDialect;\n\n    public OpenAPI() {}\n    public OpenAPI(SpecVersion specVersion) { this.specVersion = specVersion;}\n    private SpecVersion specVersion = SpecVersion.V30;\n\n    @JsonIgnore\n    public SpecVersion getSpecVersion() {\n        return this.specVersion;\n    }\n\n    public void setSpecVersion(SpecVersion specVersion) {\n        this.specVersion = specVersion;\n    }\n\n    public OpenAPI specVersion(SpecVersion specVersion) {\n        this.setSpecVersion(specVersion);\n        return this;\n    }\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private java.util.Map<String, PathItem> webhooks = null;\n\n    /**\n     * returns the openapi property from a OpenAPI instance.\n     *\n     * @return String openapi\n     **/\n\n    public String getOpenapi() {\n        return openapi;\n    }\n\n    public void setOpenapi(String openapi) {\n        this.openapi = openapi;\n    }\n\n    public OpenAPI openapi(String openapi) {\n        this.openapi = openapi;\n        return this;\n    }\n\n    /**\n     * returns the info property from a OpenAPI instance.\n     *\n     * @return Info info\n     **/\n\n    public Info getInfo() {\n        return info;\n    }\n\n    public void setInfo(Info info) {\n        this.info = info;\n    }\n\n    public OpenAPI info(Info info) {\n        this.info = info;\n        return this;\n    }\n\n    /**\n     * returns the externalDocs property from a OpenAPI instance.\n     *\n     * @return ExternalDocumentation externalDocs\n     **/\n\n    public ExternalDocumentation getExternalDocs() {\n        return externalDocs;\n    }\n\n    public void setExternalDocs(ExternalDocumentation externalDocs) {\n        this.externalDocs = externalDocs;\n    }\n\n    public OpenAPI externalDocs(ExternalDocumentation externalDocs) {\n        this.externalDocs = externalDocs;\n        return this;\n    }\n\n    /**\n     * Servers defined in the API\n     *\n     * @return List&lt;Server&gt; servers\n     **/\n\n    public List<Server> getServers() {\n        return servers;\n    }\n\n    public void setServers(List<Server> servers) {\n        this.servers = servers;\n    }\n\n    public OpenAPI servers(List<Server> servers) {\n        this.servers = servers;\n        return this;\n    }\n\n    public OpenAPI addServersItem(Server serversItem) {\n        if (this.servers == null) {\n            this.servers = new ArrayList<>();\n        }\n        this.servers.add(serversItem);\n        return this;\n    }\n\n    /**\n     * returns the security property from a OpenAPI instance.\n     *\n     * @return List&lt;SecurityRequirement&gt; security\n     **/\n\n    public List<SecurityRequirement> getSecurity() {\n        return security;\n    }\n\n    public void setSecurity(List<SecurityRequirement> security) {\n        this.security = security;\n    }\n\n    public OpenAPI security(List<SecurityRequirement> security) {\n        this.security = security;\n        return this;\n    }\n\n    public OpenAPI addSecurityItem(SecurityRequirement securityItem) {\n        if (this.security == null) {\n            this.security = new ArrayList<>();\n        }\n        this.security.add(securityItem);\n        return this;\n    }\n\n    /**\n     * returns the tags property from a OpenAPI instance.\n     *\n     * @return List&lt;Tag&gt; tags\n     **/\n\n    public List<Tag> getTags() {\n        return tags;\n    }\n\n    public void setTags(List<Tag> tags) {\n        this.tags = tags;\n    }\n\n    public OpenAPI tags(List<Tag> tags) {\n        this.tags = tags;\n        return this;\n    }\n\n    public OpenAPI addTagsItem(Tag tagsItem) {\n        if (this.tags == null) {\n            this.tags = new ArrayList<>();\n        }\n        this.tags.add(tagsItem);\n        return this;\n    }\n\n    /**\n     * returns the paths property from a OpenAPI instance.\n     *\n     * @return Paths paths\n     **/\n\n    public Paths getPaths() {\n        return paths;\n    }\n\n    public void setPaths(Paths paths) {\n        this.paths = paths;\n    }\n\n    public OpenAPI paths(Paths paths) {\n        this.paths = paths;\n        return this;\n    }\n\n    /**\n     * returns the components property from a OpenAPI instance.\n     *\n     * @return Components components\n     **/\n\n    public Components getComponents() {\n        return components;\n    }\n\n    public void setComponents(Components components) {\n        this.components = components;\n    }\n\n    public OpenAPI components(Components components) {\n        this.components = components;\n        return this;\n    }\n\n  /*\n   * helpers\n   */\n\n    public OpenAPI path(String name, PathItem path) {\n        if (this.paths == null) {\n            this.paths = new Paths();\n        }\n\n        this.paths.addPathItem(name, path);\n        return this;\n    }\n\n    public OpenAPI schema(String name, Schema schema) {\n        if (components == null) {\n            this.components = new Components();\n        }\n        components.addSchemas(name, schema);\n        return this;\n    }\n\n    public OpenAPI schemaRequirement(String name, SecurityScheme securityScheme) {\n        if (components == null) {\n            this.components = new Components();\n        }\n        components.addSecuritySchemes(name, securityScheme);\n        return this;\n    }\n\n    /**\n     * returns the webhooks property from a OpenAPI instance.\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     * @return Map&lt;String, PathItem&gt; webhooks\n     **/\n\n    @OpenAPI31\n    public Map<String, PathItem> getWebhooks() {\n        return webhooks;\n    }\n\n    @OpenAPI31\n    public void setWebhooks(Map<String, PathItem> webhooks) {\n        this.webhooks = webhooks;\n    }\n\n    @OpenAPI31\n    public OpenAPI webhooks(Map<String, PathItem> webhooks) {\n        this.webhooks = webhooks;\n        return this;\n    }\n\n    @OpenAPI31\n    public OpenAPI addWebhooks(String key, PathItem pathItem) {\n        if (this.webhooks == null) {\n            this.webhooks = new LinkedHashMap<>();\n        }\n        this.webhooks.put(key, pathItem);\n        return this;\n    }\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public String getJsonSchemaDialect() {\n        return jsonSchemaDialect;\n    }\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setJsonSchemaDialect(String jsonSchemaDialect) {\n        this.jsonSchemaDialect = jsonSchemaDialect;\n    }\n\n    @OpenAPI31\n    public OpenAPI jsonSchemaDialect(String jsonSchemaDialect) {\n        this.jsonSchemaDialect = jsonSchemaDialect;\n        return this;\n    }\n\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        OpenAPI openAPI = (OpenAPI) o;\n        return Objects.equals(this.openapi, openAPI.openapi) &&\n                Objects.equals(this.info, openAPI.info) &&\n                Objects.equals(this.externalDocs, openAPI.externalDocs) &&\n                Objects.equals(this.servers, openAPI.servers) &&\n                Objects.equals(this.security, openAPI.security) &&\n                Objects.equals(this.tags, openAPI.tags) &&\n                Objects.equals(this.paths, openAPI.paths) &&\n                Objects.equals(this.components, openAPI.components) &&\n                Objects.equals(this.webhooks, openAPI.webhooks) &&\n                Objects.equals(this.extensions, openAPI.extensions) &&\n                Objects.equals(this.jsonSchemaDialect, openAPI.jsonSchemaDialect);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(openapi, info, externalDocs, servers, security, tags, paths, components, webhooks, extensions, jsonSchemaDialect);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public OpenAPI extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class OpenAPI {\\n\");\n\n        sb.append(\"    openapi: \").append(toIndentedString(openapi)).append(\"\\n\");\n        sb.append(\"    info: \").append(toIndentedString(info)).append(\"\\n\");\n        sb.append(\"    externalDocs: \").append(toIndentedString(externalDocs)).append(\"\\n\");\n        sb.append(\"    servers: \").append(toIndentedString(servers)).append(\"\\n\");\n        sb.append(\"    security: \").append(toIndentedString(security)).append(\"\\n\");\n        sb.append(\"    tags: \").append(toIndentedString(tags)).append(\"\\n\");\n        sb.append(\"    paths: \").append(toIndentedString(paths)).append(\"\\n\");\n        sb.append(\"    components: \").append(toIndentedString(components)).append(\"\\n\");\n        if (specVersion == SpecVersion.V31) sb.append(\"    webhooks: \").append(toIndentedString(webhooks)).append(\"\\n\");\n        if (specVersion == SpecVersion.V31) sb.append(\"    jsonSchemaDialect: \").append(toIndentedString(jsonSchemaDialect)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/Operation.java",
    "content": "package io.swagger.v3.oas.models;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\nimport io.swagger.v3.oas.models.callbacks.Callback;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.parameters.RequestBody;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.security.SecurityRequirement;\nimport io.swagger.v3.oas.models.servers.Server;\n\nimport java.util.ArrayList;\nimport java.util.LinkedHashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Objects;\n\n/**\n * Operation\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#operation-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#operation-object\"\n */\n\npublic class Operation {\n    private List<String> tags = null;\n    private String summary = null;\n    private String description = null;\n    private ExternalDocumentation externalDocs = null;\n    private String operationId = null;\n    private List<Parameter> parameters = null;\n    private RequestBody requestBody = null;\n    private ApiResponses responses = null;\n    private Map<String, Callback> callbacks = null;\n    private Boolean deprecated = null;\n    private List<SecurityRequirement> security = null;\n    private List<Server> servers = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the tags property from a Operation instance.\n     *\n     * @return List&lt;String&gt; tags\n     **/\n\n    public List<String> getTags() {\n        return tags;\n    }\n\n    public void setTags(List<String> tags) {\n        this.tags = tags;\n    }\n\n    public Operation tags(List<String> tags) {\n        this.tags = tags;\n        return this;\n    }\n\n    public Operation addTagsItem(String tagsItem) {\n        if (this.tags == null) {\n            this.tags = new ArrayList<>();\n        }\n        this.tags.add(tagsItem);\n        return this;\n    }\n\n    /**\n     * returns the summary property from a Operation instance.\n     *\n     * @return String summary\n     **/\n\n    public String getSummary() {\n        return summary;\n    }\n\n    public void setSummary(String summary) {\n        this.summary = summary;\n    }\n\n    public Operation summary(String summary) {\n        this.summary = summary;\n        return this;\n    }\n\n    /**\n     * returns the description property from a Operation instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public Operation description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    /**\n     * returns the externalDocs property from a Operation instance.\n     *\n     * @return ExternalDocumentation externalDocs\n     **/\n\n    public ExternalDocumentation getExternalDocs() {\n        return externalDocs;\n    }\n\n    public void setExternalDocs(ExternalDocumentation externalDocs) {\n        this.externalDocs = externalDocs;\n    }\n\n    public Operation externalDocs(ExternalDocumentation externalDocs) {\n        this.externalDocs = externalDocs;\n        return this;\n    }\n\n    /**\n     * returns the operationId property from a Operation instance.\n     *\n     * @return String operationId\n     **/\n\n    public String getOperationId() {\n        return operationId;\n    }\n\n    public void setOperationId(String operationId) {\n        this.operationId = operationId;\n    }\n\n    public Operation operationId(String operationId) {\n        this.operationId = operationId;\n        return this;\n    }\n\n    /**\n     * returns the parameters property from a Operation instance.\n     *\n     * @return List&lt;Parameter&gt; parameters\n     **/\n\n    public List<Parameter> getParameters() {\n        return parameters;\n    }\n\n    public void setParameters(List<Parameter> parameters) {\n        this.parameters = parameters;\n    }\n\n    public Operation parameters(List<Parameter> parameters) {\n        this.parameters = parameters;\n        return this;\n    }\n\n    public Operation addParametersItem(Parameter parametersItem) {\n        if (this.parameters == null) {\n            this.parameters = new ArrayList<>();\n        }\n        this.parameters.add(parametersItem);\n        return this;\n    }\n\n    /**\n     * returns the requestBody property from a Operation instance.\n     *\n     * @return RequestBody requestBody\n     **/\n\n    public RequestBody getRequestBody() {\n        return requestBody;\n    }\n\n    public void setRequestBody(RequestBody requestBody) {\n        this.requestBody = requestBody;\n    }\n\n    public Operation requestBody(RequestBody requestBody) {\n        this.requestBody = requestBody;\n        return this;\n    }\n\n    /**\n     * returns the responses property from a Operation instance.\n     *\n     * @return ApiResponses responses\n     **/\n\n    public ApiResponses getResponses() {\n        return responses;\n    }\n\n    public void setResponses(ApiResponses responses) {\n        this.responses = responses;\n    }\n\n    public Operation responses(ApiResponses responses) {\n        this.responses = responses;\n        return this;\n    }\n\n    /**\n     * returns the callbacks property from a Operation instance.\n     *\n     * @return Callbacks callbacks\n     **/\n\n    public Map<String, Callback> getCallbacks() {\n        return callbacks;\n    }\n\n    public void setCallbacks(Map<String, Callback> callbacks) {\n        this.callbacks = callbacks;\n    }\n\n    public Operation callbacks(Map<String, Callback> callbacks) {\n        this.callbacks = callbacks;\n        return this;\n    }\n\n    public Operation addCallback(String key, Callback callback) {\n        if (this.callbacks == null) {\n            this.callbacks = new LinkedHashMap<>();\n        }\n        this.callbacks.put(key, callback);\n        return this;\n    }\n\n    /**\n     * returns the deprecated property from a Operation instance.\n     *\n     * @return Boolean deprecated\n     **/\n\n    public Boolean getDeprecated() {\n        return deprecated;\n    }\n\n    public void setDeprecated(Boolean deprecated) {\n        this.deprecated = deprecated;\n    }\n\n    public Operation deprecated(Boolean deprecated) {\n        this.deprecated = deprecated;\n        return this;\n    }\n\n    /**\n     * returns the security property from a Operation instance.\n     *\n     * @return List&lt;SecurityRequirement&gt; security\n     **/\n\n    public List<SecurityRequirement> getSecurity() {\n        return security;\n    }\n\n    public void setSecurity(List<SecurityRequirement> security) {\n        this.security = security;\n    }\n\n    public Operation security(List<SecurityRequirement> security) {\n        this.security = security;\n        return this;\n    }\n\n    public Operation addSecurityItem(SecurityRequirement securityItem) {\n        if (this.security == null) {\n            this.security = new ArrayList<>();\n        }\n        this.security.add(securityItem);\n        return this;\n    }\n\n    /**\n     * returns the servers property from a Operation instance.\n     *\n     * @return List&lt;Server&gt; servers\n     **/\n\n    public List<Server> getServers() {\n        return servers;\n    }\n\n    public void setServers(List<Server> servers) {\n        this.servers = servers;\n    }\n\n    public Operation servers(List<Server> servers) {\n        this.servers = servers;\n        return this;\n    }\n\n    public Operation addServersItem(Server serversItem) {\n        if (this.servers == null) {\n            this.servers = new ArrayList<>();\n        }\n        this.servers.add(serversItem);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        Operation operation = (Operation) o;\n        return Objects.equals(this.tags, operation.tags) &&\n                Objects.equals(this.summary, operation.summary) &&\n                Objects.equals(this.description, operation.description) &&\n                Objects.equals(this.externalDocs, operation.externalDocs) &&\n                Objects.equals(this.operationId, operation.operationId) &&\n                Objects.equals(this.parameters, operation.parameters) &&\n                Objects.equals(this.requestBody, operation.requestBody) &&\n                Objects.equals(this.responses, operation.responses) &&\n                Objects.equals(this.callbacks, operation.callbacks) &&\n                Objects.equals(this.deprecated, operation.deprecated) &&\n                Objects.equals(this.security, operation.security) &&\n                Objects.equals(this.servers, operation.servers) &&\n                Objects.equals(this.extensions, operation.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(tags, summary, description, externalDocs, operationId, parameters, requestBody, responses, callbacks, deprecated, security, servers, extensions);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public Operation extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Operation {\\n\");\n\n        sb.append(\"    tags: \").append(toIndentedString(tags)).append(\"\\n\");\n        sb.append(\"    summary: \").append(toIndentedString(summary)).append(\"\\n\");\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"    externalDocs: \").append(toIndentedString(externalDocs)).append(\"\\n\");\n        sb.append(\"    operationId: \").append(toIndentedString(operationId)).append(\"\\n\");\n        sb.append(\"    parameters: \").append(toIndentedString(parameters)).append(\"\\n\");\n        sb.append(\"    requestBody: \").append(toIndentedString(requestBody)).append(\"\\n\");\n        sb.append(\"    responses: \").append(toIndentedString(responses)).append(\"\\n\");\n        sb.append(\"    callbacks: \").append(toIndentedString(callbacks)).append(\"\\n\");\n        sb.append(\"    deprecated: \").append(toIndentedString(deprecated)).append(\"\\n\");\n        sb.append(\"    security: \").append(toIndentedString(security)).append(\"\\n\");\n        sb.append(\"    servers: \").append(toIndentedString(servers)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/PathItem.java",
    "content": "package io.swagger.v3.oas.models;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\nimport io.swagger.v3.oas.models.parameters.Parameter;\nimport io.swagger.v3.oas.models.servers.Server;\n\nimport java.util.ArrayList;\nimport java.util.LinkedHashMap;\nimport java.util.List;\nimport java.util.Map;\n\n/**\n * PathItem\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#path-item-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#path-item-object\"\n */\n\npublic class PathItem {\n    private String summary = null;\n    private String description = null;\n    private Operation get = null;\n    private Operation put = null;\n    private Operation post = null;\n    private Operation delete = null;\n    private Operation options = null;\n    private Operation head = null;\n    private Operation patch = null;\n    private Operation trace = null;\n    private List<Server> servers = null;\n    private List<Parameter> parameters = null;\n    private String $ref = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the summary property from a PathItem instance.\n     *\n     * @return String summary\n     **/\n\n    public String getSummary() {\n        return summary;\n    }\n\n    public void setSummary(String summary) {\n        this.summary = summary;\n    }\n\n    public PathItem summary(String summary) {\n        this.summary = summary;\n        return this;\n    }\n\n    /**\n     * returns the description property from a PathItem instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public PathItem description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    /**\n     * returns the get property from a PathItem instance.\n     *\n     * @return Operation get\n     **/\n\n    public Operation getGet() {\n        return get;\n    }\n\n    public void setGet(Operation get) {\n        this.get = get;\n    }\n\n    public PathItem get(Operation get) {\n        this.get = get;\n        return this;\n    }\n\n    /**\n     * returns the put property from a PathItem instance.\n     *\n     * @return Operation put\n     **/\n\n    public Operation getPut() {\n        return put;\n    }\n\n    public void setPut(Operation put) {\n        this.put = put;\n    }\n\n    public PathItem put(Operation put) {\n        this.put = put;\n        return this;\n    }\n\n    /**\n     * returns the post property from a PathItem instance.\n     *\n     * @return Operation post\n     **/\n\n    public Operation getPost() {\n        return post;\n    }\n\n    public void setPost(Operation post) {\n        this.post = post;\n    }\n\n    public PathItem post(Operation post) {\n        this.post = post;\n        return this;\n    }\n\n    /**\n     * returns the delete property from a PathItem instance.\n     *\n     * @return Operation delete\n     **/\n\n    public Operation getDelete() {\n        return delete;\n    }\n\n    public void setDelete(Operation delete) {\n        this.delete = delete;\n    }\n\n    public PathItem delete(Operation delete) {\n        this.delete = delete;\n        return this;\n    }\n\n    /**\n     * returns the options property from a PathItem instance.\n     *\n     * @return Operation options\n     **/\n\n    public Operation getOptions() {\n        return options;\n    }\n\n    public void setOptions(Operation options) {\n        this.options = options;\n    }\n\n    public PathItem options(Operation options) {\n        this.options = options;\n        return this;\n    }\n\n    /**\n     * returns the head property from a PathItem instance.\n     *\n     * @return Operation head\n     **/\n\n    public Operation getHead() {\n        return head;\n    }\n\n    public void setHead(Operation head) {\n        this.head = head;\n    }\n\n    public PathItem head(Operation head) {\n        this.head = head;\n        return this;\n    }\n\n    /**\n     * returns the patch property from a PathItem instance.\n     *\n     * @return Operation patch\n     **/\n\n    public Operation getPatch() {\n        return patch;\n    }\n\n    public void setPatch(Operation patch) {\n        this.patch = patch;\n    }\n\n    public PathItem patch(Operation patch) {\n        this.patch = patch;\n        return this;\n    }\n\n    /**\n     * returns the trace property from a PathItem instance.\n     *\n     * @return Operation trace\n     **/\n\n    public Operation getTrace() {\n        return trace;\n    }\n\n    public void setTrace(Operation trace) {\n        this.trace = trace;\n    }\n\n    public PathItem trace(Operation trace) {\n        this.trace = trace;\n        return this;\n    }\n\n    public List<Operation> readOperations() {\n        List<Operation> allOperations = new ArrayList<>();\n        if (this.get != null) {\n            allOperations.add(this.get);\n        }\n        if (this.put != null) {\n            allOperations.add(this.put);\n        }\n        if (this.head != null) {\n            allOperations.add(this.head);\n        }\n        if (this.post != null) {\n            allOperations.add(this.post);\n        }\n        if (this.delete != null) {\n            allOperations.add(this.delete);\n        }\n        if (this.patch != null) {\n            allOperations.add(this.patch);\n        }\n        if (this.options != null) {\n            allOperations.add(this.options);\n        }\n        if (this.trace != null) {\n            allOperations.add(this.trace);\n        }\n\n        return allOperations;\n    }\n\n    public void operation(HttpMethod method, Operation operation) {\n        switch (method) {\n            case PATCH:\n                this.patch = operation;\n                break;\n            case POST:\n                this.post = operation;\n                break;\n            case PUT:\n                this.put = operation;\n                break;\n            case GET:\n                this.get = operation;\n                break;\n            case OPTIONS:\n                this.options = operation;\n                break;\n            case TRACE:\n                this.trace = operation;\n                break;\n            case HEAD:\n                this.head = operation;\n                break;\n            case DELETE:\n                this.delete = operation;\n                break;\n            default:\n        }\n    }\n\n    public enum HttpMethod {\n        POST,\n        GET,\n        PUT,\n        PATCH,\n        DELETE,\n        HEAD,\n        OPTIONS,\n        TRACE\n    }\n\n    public Map<HttpMethod, Operation> readOperationsMap() {\n        Map<HttpMethod, Operation> result = new LinkedHashMap<>();\n\n        if (this.get != null) {\n            result.put(HttpMethod.GET, this.get);\n        }\n        if (this.put != null) {\n            result.put(HttpMethod.PUT, this.put);\n        }\n        if (this.post != null) {\n            result.put(HttpMethod.POST, this.post);\n        }\n        if (this.delete != null) {\n            result.put(HttpMethod.DELETE, this.delete);\n        }\n        if (this.patch != null) {\n            result.put(HttpMethod.PATCH, this.patch);\n        }\n        if (this.head != null) {\n            result.put(HttpMethod.HEAD, this.head);\n        }\n        if (this.options != null) {\n            result.put(HttpMethod.OPTIONS, this.options);\n        }\n        if (this.trace != null) {\n            result.put(HttpMethod.TRACE, this.trace);\n        }\n\n        return result;\n    }\n\n    /**\n     * returns the servers property from a PathItem instance.\n     *\n     * @return List&lt;Server&gt; servers\n     **/\n\n    public List<Server> getServers() {\n        return servers;\n    }\n\n    public void setServers(List<Server> servers) {\n        this.servers = servers;\n    }\n\n    public PathItem servers(List<Server> servers) {\n        this.servers = servers;\n        return this;\n    }\n\n    public PathItem addServersItem(Server serversItem) {\n        if (this.servers == null) {\n            this.servers = new ArrayList<>();\n        }\n        this.servers.add(serversItem);\n        return this;\n    }\n\n    /**\n     * returns the parameters property from a PathItem instance.\n     *\n     * @return List&lt;Parameter&gt; parameters\n     **/\n\n    public List<Parameter> getParameters() {\n        return parameters;\n    }\n\n    public void setParameters(List<Parameter> parameters) {\n        this.parameters = parameters;\n    }\n\n    public PathItem parameters(List<Parameter> parameters) {\n        this.parameters = parameters;\n        return this;\n    }\n\n    public PathItem addParametersItem(Parameter parametersItem) {\n        if (this.parameters == null) {\n            this.parameters = new ArrayList<>();\n        }\n        this.parameters.add(parametersItem);\n        return this;\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public PathItem extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    /**\n     * returns the ref property from a PathItem instance.\n     *\n     * @return String ref\n     **/\n    public String get$ref() {\n        return $ref;\n    }\n\n    public void set$ref(String $ref) {\n        this.$ref = $ref;\n    }\n\n    public PathItem $ref(String $ref) {\n        set$ref($ref);\n        return this;\n    }\n\n    @Override\n    public boolean equals(Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (!(o instanceof PathItem)) {\n            return false;\n        }\n\n        PathItem pathItem = (PathItem) o;\n\n        if (summary != null ? !summary.equals(pathItem.summary) : pathItem.summary != null) {\n            return false;\n        }\n        if (description != null ? !description.equals(pathItem.description) : pathItem.description != null) {\n            return false;\n        }\n        if (get != null ? !get.equals(pathItem.get) : pathItem.get != null) {\n            return false;\n        }\n        if (put != null ? !put.equals(pathItem.put) : pathItem.put != null) {\n            return false;\n        }\n        if (post != null ? !post.equals(pathItem.post) : pathItem.post != null) {\n            return false;\n        }\n        if (delete != null ? !delete.equals(pathItem.delete) : pathItem.delete != null) {\n            return false;\n        }\n        if (options != null ? !options.equals(pathItem.options) : pathItem.options != null) {\n            return false;\n        }\n        if (head != null ? !head.equals(pathItem.head) : pathItem.head != null) {\n            return false;\n        }\n        if (patch != null ? !patch.equals(pathItem.patch) : pathItem.patch != null) {\n            return false;\n        }\n        if (trace != null ? !trace.equals(pathItem.trace) : pathItem.trace != null) {\n            return false;\n        }\n        if (servers != null ? !servers.equals(pathItem.servers) : pathItem.servers != null) {\n            return false;\n        }\n        if (parameters != null ? !parameters.equals(pathItem.parameters) : pathItem.parameters != null) {\n            return false;\n        }\n        if ($ref != null ? !$ref.equals(pathItem.$ref) : pathItem.$ref != null) {\n            return false;\n        }\n        return extensions != null ? extensions.equals(pathItem.extensions) : pathItem.extensions == null;\n\n    }\n\n    @Override\n    public int hashCode() {\n        int result = summary != null ? summary.hashCode() : 0;\n        result = 31 * result + (description != null ? description.hashCode() : 0);\n        result = 31 * result + (get != null ? get.hashCode() : 0);\n        result = 31 * result + (put != null ? put.hashCode() : 0);\n        result = 31 * result + (post != null ? post.hashCode() : 0);\n        result = 31 * result + (delete != null ? delete.hashCode() : 0);\n        result = 31 * result + (options != null ? options.hashCode() : 0);\n        result = 31 * result + (head != null ? head.hashCode() : 0);\n        result = 31 * result + (patch != null ? patch.hashCode() : 0);\n        result = 31 * result + (trace != null ? trace.hashCode() : 0);\n        result = 31 * result + (servers != null ? servers.hashCode() : 0);\n        result = 31 * result + (parameters != null ? parameters.hashCode() : 0);\n        result = 31 * result + ($ref != null ? $ref.hashCode() : 0);\n        result = 31 * result + (extensions != null ? extensions.hashCode() : 0);\n        return result;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class PathItem {\\n\");\n        sb.append(\"    summary: \").append(toIndentedString(summary)).append(\"\\n\");\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"    get: \").append(toIndentedString(get)).append(\"\\n\");\n        sb.append(\"    put: \").append(toIndentedString(put)).append(\"\\n\");\n        sb.append(\"    post: \").append(toIndentedString(post)).append(\"\\n\");\n        sb.append(\"    delete: \").append(toIndentedString(delete)).append(\"\\n\");\n        sb.append(\"    options: \").append(toIndentedString(options)).append(\"\\n\");\n        sb.append(\"    head: \").append(toIndentedString(head)).append(\"\\n\");\n        sb.append(\"    patch: \").append(toIndentedString(patch)).append(\"\\n\");\n        sb.append(\"    trace: \").append(toIndentedString(trace)).append(\"\\n\");\n        sb.append(\"    servers: \").append(toIndentedString(servers)).append(\"\\n\");\n        sb.append(\"    parameters: \").append(toIndentedString(parameters)).append(\"\\n\");\n        sb.append(\"    $ref: \").append(toIndentedString($ref)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/Paths.java",
    "content": "package io.swagger.v3.oas.models;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\nimport java.util.LinkedHashMap;\nimport java.util.Objects;\n\n/**\n * Paths\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#paths-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#paths-object\"\n */\n\npublic class Paths extends LinkedHashMap<String, PathItem> {\n    public Paths() {\n    }\n\n    private java.util.Map<String, Object> extensions = null;\n\n    public Paths addPathItem(String name, PathItem item) {\n        this.put(name, item);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        Paths paths = (Paths) o;\n        return Objects.equals(this.extensions, paths.extensions) &&\n                super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(extensions, super.hashCode());\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public Paths extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Paths {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/SpecVersion.java",
    "content": "package io.swagger.v3.oas.models;\n\npublic enum SpecVersion {\n    V30,\n    V31\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/annotations/OpenAPI30.java",
    "content": "package io.swagger.v3.oas.models.annotations;\n\nimport java.lang.annotation.Inherited;\n\n@Inherited\npublic @interface OpenAPI30 {\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/annotations/OpenAPI31.java",
    "content": "package io.swagger.v3.oas.models.annotations;\n\nimport java.lang.annotation.Inherited;\n\n@Inherited\npublic @interface OpenAPI31 {\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/callbacks/Callback.java",
    "content": "package io.swagger.v3.oas.models.callbacks;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\nimport io.swagger.v3.oas.models.PathItem;\n\nimport java.util.LinkedHashMap;\nimport java.util.Objects;\n\n/**\n * Callback\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#callback-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#callback-object\"\n */\n\npublic class Callback extends LinkedHashMap<String, PathItem> {\n    public Callback() {\n    }\n\n    private java.util.Map<String, Object> extensions = null;\n\n    private String $ref = null;\n\n    /**\n     * @since 2.0.3\n     */\n    public String get$ref() {\n        return $ref;\n    }\n\n    /**\n     * @since 2.0.3\n     */\n    public void set$ref(String $ref) {\n        if ($ref != null && ($ref.indexOf('.') == -1 && $ref.indexOf('/') == -1)) {\n            $ref = \"#/components/callbacks/\" + $ref;\n        }\n        this.$ref = $ref;\n    }\n\n    /**\n     * @since 2.0.3\n     */\n    public Callback $ref(String $ref) {\n        set$ref($ref);\n        return this;\n    }\n\n    public Callback addPathItem(String name, PathItem item) {\n        this.put(name, item);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        Callback callback = (Callback) o;\n        if ($ref != null ? !$ref.equals(callback.$ref) : callback.$ref != null) {\n            return false;\n        }\n        return Objects.equals(this.extensions, callback.extensions) &&\n                super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(extensions, $ref, super.hashCode());\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public Callback extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Callback {\\n\");\n        sb.append(\"    $ref: \").append(toIndentedString($ref)).append(\"\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/examples/Example.java",
    "content": "package io.swagger.v3.oas.models.examples;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\n/**\n * Example\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#example-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#example-object\"\n */\n\npublic class Example {\n    private String summary = null;\n    private String description = null;\n    private Object value = null;\n    private String externalValue = null;\n    private String $ref = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    private boolean valueSetFlag;\n\n    /**\n     * returns the summary property from a Example instance.\n     *\n     * @return String summary\n     **/\n\n    public String getSummary() {\n        return summary;\n    }\n\n    public void setSummary(String summary) {\n        this.summary = summary;\n    }\n\n    public Example summary(String summary) {\n        this.summary = summary;\n        return this;\n    }\n\n    /**\n     * returns the description property from a Example instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public Example description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    /**\n     * returns the value property from a Example instance.\n     *\n     * @return Object value\n     **/\n\n    public Object getValue() {\n        return value;\n    }\n\n    public void setValue(Object value) {\n        this.value = value;\n        valueSetFlag = true;\n    }\n\n    public Example value(Object value) {\n        setValue(value);\n        return this;\n    }\n\n    /**\n     * returns the externalValue property from a Example instance.\n     *\n     * @return String externalValue\n     **/\n\n    public String getExternalValue() {\n        return externalValue;\n    }\n\n    public void setExternalValue(String externalValue) {\n        this.externalValue = externalValue;\n    }\n\n    public Example externalValue(String externalValue) {\n        this.externalValue = externalValue;\n        return this;\n    }\n\n    public String get$ref() {\n        return $ref;\n    }\n\n    public void set$ref(String $ref) {\n        if ($ref != null && ($ref.indexOf('.') == -1 && $ref.indexOf('/') == -1)) {\n            $ref = \"#/components/examples/\" + $ref;\n        }\n        this.$ref = $ref;\n    }\n\n    public Example $ref(String $ref) {\n        set$ref($ref);\n        return this;\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public Example extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    public boolean getValueSetFlag() {\n        return valueSetFlag;\n    }\n\n    public void setValueSetFlag(boolean valueSetFlag) {\n        this.valueSetFlag = valueSetFlag;\n    }\n\n    @Override\n    public boolean equals(Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (!(o instanceof Example)) {\n            return false;\n        }\n\n        Example example = (Example) o;\n\n        if (summary != null ? !summary.equals(example.summary) : example.summary != null) {\n            return false;\n        }\n        if (description != null ? !description.equals(example.description) : example.description != null) {\n            return false;\n        }\n        if (value != null ? !value.equals(example.value) : example.value != null) {\n            return false;\n        }\n        if (externalValue != null ? !externalValue.equals(example.externalValue) : example.externalValue != null) {\n            return false;\n        }\n        if ($ref != null ? !$ref.equals(example.$ref) : example.$ref != null) {\n            return false;\n        }\n        return extensions != null ? extensions.equals(example.extensions) : example.extensions == null;\n\n    }\n\n    @Override\n    public int hashCode() {\n        int result = summary != null ? summary.hashCode() : 0;\n        result = 31 * result + (description != null ? description.hashCode() : 0);\n        result = 31 * result + (value != null ? value.hashCode() : 0);\n        result = 31 * result + (externalValue != null ? externalValue.hashCode() : 0);\n        result = 31 * result + ($ref != null ? $ref.hashCode() : 0);\n        result = 31 * result + (extensions != null ? extensions.hashCode() : 0);\n        return result;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Example {\\n\");\n\n        sb.append(\"    summary: \").append(toIndentedString(summary)).append(\"\\n\");\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"    value: \").append(toIndentedString(value)).append(\"\\n\");\n        sb.append(\"    externalValue: \").append(toIndentedString(externalValue)).append(\"\\n\");\n        sb.append(\"    $ref: \").append(toIndentedString($ref)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/headers/Header.java",
    "content": "package io.swagger.v3.oas.models.headers;\n\nimport io.swagger.v3.oas.models.examples.Example;\nimport io.swagger.v3.oas.models.media.Content;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport java.util.Objects;\n\n/**\n * Header\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#header-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#header-object\"\n */\n\npublic class Header {\n    private String description = null;\n    private String $ref = null;\n    private Boolean required = null;\n    private Boolean deprecated = null;\n\n    /**\n     * Gets or Sets style\n     */\n    public enum StyleEnum {\n        SIMPLE(\"simple\");\n\n        private String value;\n\n        StyleEnum(String value) {\n            this.value = value;\n        }\n\n        @Override\n        public String toString() {\n            return String.valueOf(value);\n        }\n    }\n\n    private StyleEnum style = null;\n    private Boolean explode = null;\n    private Schema schema = null;\n    private Map<String, Example> examples = null;\n    private Object example = null;\n    private Content content = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the description property from a Header instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public Header description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    /**\n     * returns the required property from a Header instance.\n     *\n     * @return Boolean required\n     **/\n\n    public Boolean getRequired() {\n        return required;\n    }\n\n    public void setRequired(Boolean required) {\n        this.required = required;\n    }\n\n    public Header required(Boolean required) {\n        this.required = required;\n        return this;\n    }\n\n    /**\n     * returns the deprecated property from a Header instance.\n     *\n     * @return Boolean deprecated\n     **/\n\n    public Boolean getDeprecated() {\n        return deprecated;\n    }\n\n    public void setDeprecated(Boolean deprecated) {\n        this.deprecated = deprecated;\n    }\n\n    public Header deprecated(Boolean deprecated) {\n        this.deprecated = deprecated;\n        return this;\n    }\n\n    /**\n     * returns the style property from a Header instance.\n     *\n     * @return StyleEnum style\n     **/\n\n    public StyleEnum getStyle() {\n        return style;\n    }\n\n    public void setStyle(StyleEnum style) {\n        this.style = style;\n    }\n\n    public Header style(StyleEnum style) {\n        this.style = style;\n        return this;\n    }\n\n    /**\n     * returns the explode property from a Header instance.\n     *\n     * @return Boolean explode\n     **/\n\n    public Boolean getExplode() {\n        return explode;\n    }\n\n    public void setExplode(Boolean explode) {\n        this.explode = explode;\n    }\n\n    public Header explode(Boolean explode) {\n        this.explode = explode;\n        return this;\n    }\n\n    /**\n     * returns the schema property from a Header instance.\n     *\n     * @return Schema schema\n     **/\n\n    public Schema getSchema() {\n        return schema;\n    }\n\n    public void setSchema(Schema schema) {\n        this.schema = schema;\n    }\n\n    public Header schema(Schema schema) {\n        this.schema = schema;\n        return this;\n    }\n\n    /**\n     * returns the examples property from a Header instance.\n     *\n     * @return Map&lt;String, Example&gt; examples\n     **/\n\n    public Map<String, Example> getExamples() {\n        return examples;\n    }\n\n    public void setExamples(Map<String, Example> examples) {\n        this.examples = examples;\n    }\n\n    public Header examples(Map<String, Example> examples) {\n        this.examples = examples;\n        return this;\n    }\n\n    public Header addExample(String key, Example examplesItem) {\n        if (this.examples == null) {\n            this.examples = new LinkedHashMap<>();\n        }\n        this.examples.put(key, examplesItem);\n        return this;\n    }\n\n    /**\n     * returns the example property from a Header instance.\n     *\n     * @return String example\n     **/\n\n    public Object getExample() {\n        return example;\n    }\n\n    public void setExample(Object example) {\n        this.example = example;\n    }\n\n    public Header example(Object example) {\n        this.example = example;\n        return this;\n    }\n\n    /**\n     * returns the content property from a Header instance.\n     *\n     * @return Content content\n     **/\n\n    public Content getContent() {\n        return content;\n    }\n\n    public void setContent(Content content) {\n        this.content = content;\n    }\n\n    public Header content(Content content) {\n        this.content = content;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        Header header = (Header) o;\n        return Objects.equals(this.description, header.description) &&\n                Objects.equals(this.required, header.required) &&\n                Objects.equals(this.deprecated, header.deprecated) &&\n                Objects.equals(this.style, header.style) &&\n                Objects.equals(this.explode, header.explode) &&\n                Objects.equals(this.schema, header.schema) &&\n                Objects.equals(this.examples, header.examples) &&\n                Objects.equals(this.example, header.example) &&\n                Objects.equals(this.content, header.content) &&\n                Objects.equals(this.extensions, header.extensions) &&\n                Objects.equals(this.$ref, header.$ref);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(description, required, deprecated, style, explode, schema, examples, example, content, extensions, $ref);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public Header extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    public String get$ref() {\n        return $ref;\n    }\n\n    public void set$ref(String $ref) {\n        if ($ref != null && ($ref.indexOf('.') == -1 && $ref.indexOf('/') == -1)) {\n            $ref = \"#/components/headers/\" + $ref;\n        }\n        this.$ref = $ref;\n    }\n\n    public Header $ref(String $ref) {\n        set$ref($ref);\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Header {\\n\");\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"    required: \").append(toIndentedString(required)).append(\"\\n\");\n        sb.append(\"    deprecated: \").append(toIndentedString(deprecated)).append(\"\\n\");\n        sb.append(\"    style: \").append(toIndentedString(style)).append(\"\\n\");\n        sb.append(\"    explode: \").append(toIndentedString(explode)).append(\"\\n\");\n        sb.append(\"    schema: \").append(toIndentedString(schema)).append(\"\\n\");\n        sb.append(\"    examples: \").append(toIndentedString(examples)).append(\"\\n\");\n        sb.append(\"    example: \").append(toIndentedString(example)).append(\"\\n\");\n        sb.append(\"    content: \").append(toIndentedString(content)).append(\"\\n\");\n        sb.append(\"    $ref: \").append(toIndentedString($ref)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/info/Contact.java",
    "content": "package io.swagger.v3.oas.models.info;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\nimport java.util.Objects;\n\n/**\n * Contact\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#contact-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#contact-object\"\n */\n\npublic class Contact {\n    private String name = null;\n    private String url = null;\n    private String email = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the name property from a Contact instance.\n     *\n     * @return String name\n     **/\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public Contact name(String name) {\n        this.name = name;\n        return this;\n    }\n\n    /**\n     * returns the url property from a Contact instance.\n     *\n     * @return String url\n     **/\n\n    public String getUrl() {\n        return url;\n    }\n\n    public void setUrl(String url) {\n        this.url = url;\n    }\n\n    public Contact url(String url) {\n        this.url = url;\n        return this;\n    }\n\n    /**\n     * returns the email property from a Contact instance.\n     *\n     * @return String email\n     **/\n\n    public String getEmail() {\n        return email;\n    }\n\n    public void setEmail(String email) {\n        this.email = email;\n    }\n\n    public Contact email(String email) {\n        this.email = email;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        Contact contact = (Contact) o;\n        return Objects.equals(this.name, contact.name) &&\n                Objects.equals(this.url, contact.url) &&\n                Objects.equals(this.email, contact.email) &&\n                Objects.equals(this.extensions, contact.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(name, url, email, extensions);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public Contact extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Contact {\\n\");\n\n        sb.append(\"    name: \").append(toIndentedString(name)).append(\"\\n\");\n        sb.append(\"    url: \").append(toIndentedString(url)).append(\"\\n\");\n        sb.append(\"    email: \").append(toIndentedString(email)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/info/Info.java",
    "content": "package io.swagger.v3.oas.models.info;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\nimport java.util.Objects;\n\n/**\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#info-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#info-object\"\n */\n\npublic class Info {\n    private String title = null;\n    private String description = null;\n    private String termsOfService = null;\n    private Contact contact = null;\n    private License license = null;\n    private String version = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private String summary = null;\n\n    /**\n     * returns the title property from a Info instance.\n     *\n     * @return String title\n     **/\n\n    public String getTitle() {\n        return title;\n    }\n\n    public void setTitle(String title) {\n        this.title = title;\n    }\n\n    public Info title(String title) {\n        this.title = title;\n        return this;\n    }\n\n    /**\n     * returns the description property from a Info instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public Info description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    /**\n     * returns the termsOfService property from a Info instance.\n     *\n     * @return String termsOfService\n     **/\n\n    public String getTermsOfService() {\n        return termsOfService;\n    }\n\n    public void setTermsOfService(String termsOfService) {\n        this.termsOfService = termsOfService;\n    }\n\n    public Info termsOfService(String termsOfService) {\n        this.termsOfService = termsOfService;\n        return this;\n    }\n\n    /**\n     * returns the contact property from a Info instance.\n     *\n     * @return Contact contact\n     **/\n\n    public Contact getContact() {\n        return contact;\n    }\n\n    public void setContact(Contact contact) {\n        this.contact = contact;\n    }\n\n    public Info contact(Contact contact) {\n        this.contact = contact;\n        return this;\n    }\n\n    /**\n     * returns the license property from a Info instance.\n     *\n     * @return License license\n     **/\n\n    public License getLicense() {\n        return license;\n    }\n\n    public void setLicense(License license) {\n        this.license = license;\n    }\n\n    public Info license(License license) {\n        this.license = license;\n        return this;\n    }\n\n    /**\n     * returns the version property from a Info instance.\n     *\n     * @return String version\n     **/\n\n    public String getVersion() {\n        return version;\n    }\n\n    public void setVersion(String version) {\n        this.version = version;\n    }\n\n    public Info version(String version) {\n        this.version = version;\n        return this;\n    }\n\n    /**\n     * returns the summary property from a Info instance.\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     * @return String\n     **/\n    @OpenAPI31\n    public String getSummary() {\n        return summary;\n    }\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setSummary(String summary) {\n        this.summary = summary;\n    }\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Info summary(String summary) {\n        this.summary = summary;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        Info info = (Info) o;\n        return Objects.equals(this.title, info.title) &&\n                Objects.equals(this.description, info.description) &&\n                Objects.equals(this.termsOfService, info.termsOfService) &&\n                Objects.equals(this.contact, info.contact) &&\n                Objects.equals(this.license, info.license) &&\n                Objects.equals(this.version, info.version) &&\n                Objects.equals(this.extensions, info.extensions) &&\n                Objects.equals(this.summary, info.summary);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(title, description, termsOfService, contact, license, version, extensions, summary);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public Info extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Info {\\n\");\n\n        sb.append(\"    title: \").append(toIndentedString(title)).append(\"\\n\");\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"    summary: \").append(toIndentedString(summary)).append(\"\\n\");\n        sb.append(\"    termsOfService: \").append(toIndentedString(termsOfService)).append(\"\\n\");\n        sb.append(\"    contact: \").append(toIndentedString(contact)).append(\"\\n\");\n        sb.append(\"    license: \").append(toIndentedString(license)).append(\"\\n\");\n        sb.append(\"    version: \").append(toIndentedString(version)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/info/License.java",
    "content": "package io.swagger.v3.oas.models.info;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\nimport java.util.Objects;\n\n/**\n * License\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#license-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#license-object\"\n */\n\npublic class License {\n    private String name = null;\n    private String url = null;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private String identifier = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the name property from a License instance.\n     *\n     * @return String name\n     **/\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public License name(String name) {\n        this.name = name;\n        return this;\n    }\n\n    /**\n     * returns the url property from a License instance.\n     *\n     * @return String url\n     **/\n\n    public String getUrl() {\n        return url;\n    }\n\n    public void setUrl(String url) {\n        this.url = url;\n    }\n\n    public License url(String url) {\n        this.url = url;\n        return this;\n    }\n\n    /**\n     * returns the identifier property from a License instance.\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     * @return String identifier\n     **/\n    @OpenAPI31\n    public String getIdentifier() {\n        return identifier;\n    }\n    @OpenAPI31\n    public void setIdentifier(String identifier) {\n        this.identifier = identifier;\n    }\n    @OpenAPI31\n    public License identifier(String identifier) {\n        this.identifier = identifier;\n        return this;\n    }\n\n    @Override\n    public boolean equals(Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        License license = (License) o;\n        return Objects.equals(this.name, license.name) &&\n                Objects.equals(this.url, license.url) &&\n                Objects.equals(this.identifier, license.identifier) &&\n                Objects.equals(this.extensions, license.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(name, url, identifier, extensions);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public License extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class License {\\n\");\n\n        sb.append(\"    name: \").append(toIndentedString(name)).append(\"\\n\");\n        sb.append(\"    url: \").append(toIndentedString(url)).append(\"\\n\");\n        sb.append(\"    identifier: \").append(toIndentedString(identifier)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/links/Link.java",
    "content": "package io.swagger.v3.oas.models.links;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\nimport io.swagger.v3.oas.models.headers.Header;\nimport io.swagger.v3.oas.models.servers.Server;\n\nimport java.util.LinkedHashMap;\nimport java.util.Map;\n\n/**\n * Link\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#link-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#link-object\"\n */\n\npublic class Link {\n    private String operationRef = null;\n    private String operationId = null;\n    private Map<String, String> parameters = null;\n    private Object requestBody = null;\n    /**\n     * @deprecated as it's not part of OpenAPI specification\n     */\n    @Deprecated\n    private Map<String, Header> headers = null;\n    private String description = null;\n    private String $ref = null;\n    private java.util.Map<String, Object> extensions = null;\n    private Server server;\n\n    /**\n     * returns the server property from a Link instance.\n     *\n     * @return Server server\n     **/\n\n    public Server getServer() {\n        return server;\n    }\n\n    public void setServer(Server server) {\n        this.server = server;\n    }\n\n    public Link server(Server server) {\n        this.setServer(server);\n        return this;\n    }\n\n    /**\n     * returns the operationRef property from a Link instance.\n     *\n     * @return String operationRef\n     **/\n\n    public String getOperationRef() {\n        return operationRef;\n    }\n\n    public void setOperationRef(String operationRef) {\n        this.operationRef = operationRef;\n    }\n\n    public Link operationRef(String operationRef) {\n        this.operationRef = operationRef;\n        return this;\n    }\n\n    /**\n     * returns the requestBody property from a Link instance.\n     *\n     * @return Object requestBody\n     **/\n\n    public Object getRequestBody() {\n        return requestBody;\n    }\n\n    public void setRequestBody(Object requestBody) {\n        this.requestBody = requestBody;\n    }\n\n    public Link requestBody(Object requestBody) {\n        this.requestBody = requestBody;\n        return this;\n    }\n\n    public String getOperationId() {\n        return operationId;\n    }\n\n    public void setOperationId(String operationId) {\n        this.operationId = operationId;\n    }\n\n    public Link operationId(String operationId) {\n        this.operationId = operationId;\n        return this;\n    }\n\n    /**\n     * returns the parameters property from a Link instance.\n     *\n     * @return LinkParameters parameters\n     **/\n\n    public Map<String, String> getParameters() {\n        return parameters;\n    }\n\n    public void setParameters(Map<String, String> parameters) {\n        this.parameters = parameters;\n    }\n\n    @Deprecated\n    public Link parameters(String name, String parameter) {\n        return this.addParameter(name, parameter);\n    }\n\n    public Link addParameter(String name, String parameter) {\n        if (this.parameters == null) {\n            this.parameters = new LinkedHashMap<>();\n        }\n        this.parameters.put(name, parameter);\n        return this;\n    }\n\n    /**\n     * @deprecated as it's not part of OpenAPI specification\n     */\n    @Deprecated\n    public Map<String, Header> getHeaders() {\n        return headers;\n    }\n\n    /**\n     * @deprecated as it's not part of OpenAPI specification\n     */\n    @Deprecated\n    public void setHeaders(Map<String, Header> headers) {\n        this.headers = headers;\n    }\n\n    /**\n     * @deprecated as it's not part of OpenAPI specification\n     */\n    @Deprecated\n    public Link headers(Map<String, Header> headers) {\n        this.headers = headers;\n        return this;\n    }\n\n    /**\n     * @deprecated as it's not part of OpenAPI specification\n     */\n    @Deprecated\n    public Link addHeaderObject(String name, Header header) {\n        if (this.headers == null) {\n            headers = new LinkedHashMap<>();\n        }\n        headers.put(name, header);\n        return this;\n    }\n\n    /**\n     * returns the description property from a Link instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public Link description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    @Override\n    public boolean equals(Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (!(o instanceof Link)) {\n            return false;\n        }\n\n        Link link = (Link) o;\n\n        if (operationRef != null ? !operationRef.equals(link.operationRef) : link.operationRef != null) {\n            return false;\n        }\n        if (operationId != null ? !operationId.equals(link.operationId) : link.operationId != null) {\n            return false;\n        }\n        if (parameters != null ? !parameters.equals(link.parameters) : link.parameters != null) {\n            return false;\n        }\n        if (requestBody != null ? !requestBody.equals(link.requestBody) : link.requestBody != null) {\n            return false;\n        }\n        if (headers != null ? !headers.equals(link.headers) : link.headers != null) {\n            return false;\n        }\n        if (description != null ? !description.equals(link.description) : link.description != null) {\n            return false;\n        }\n        if ($ref != null ? !$ref.equals(link.$ref) : link.$ref != null) {\n            return false;\n        }\n        if (extensions != null ? !extensions.equals(link.extensions) : link.extensions != null) {\n            return false;\n        }\n        return server != null ? server.equals(link.server) : link.server == null;\n\n    }\n\n    @Override\n    public int hashCode() {\n        int result = operationRef != null ? operationRef.hashCode() : 0;\n        result = 31 * result + (operationId != null ? operationId.hashCode() : 0);\n        result = 31 * result + (parameters != null ? parameters.hashCode() : 0);\n        result = 31 * result + (requestBody != null ? requestBody.hashCode() : 0);\n        result = 31 * result + (headers != null ? headers.hashCode() : 0);\n        result = 31 * result + (description != null ? description.hashCode() : 0);\n        result = 31 * result + ($ref != null ? $ref.hashCode() : 0);\n        result = 31 * result + (extensions != null ? extensions.hashCode() : 0);\n        result = 31 * result + (server != null ? server.hashCode() : 0);\n        return result;\n    }\n\n    public String get$ref() {\n        return $ref;\n    }\n\n    public void set$ref(String $ref) {\n        if ($ref != null && ($ref.indexOf('.') == -1 && $ref.indexOf('/') == -1)) {\n            $ref = \"#/components/links/\" + $ref;\n        }\n        this.$ref = $ref;\n    }\n\n    public Link $ref(String $ref) {\n        set$ref($ref);\n        return this;\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public Link extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Link {\\n\");\n\n        sb.append(\"    operationRef: \").append(toIndentedString(operationRef)).append(\"\\n\");\n        sb.append(\"    operationId: \").append(toIndentedString(operationId)).append(\"\\n\");\n        sb.append(\"    parameters: \").append(toIndentedString(parameters)).append(\"\\n\");\n        sb.append(\"    requestBody: \").append(toIndentedString(requestBody)).append(\"\\n\");\n        sb.append(\"    headers: \").append(toIndentedString(headers)).append(\"\\n\");\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"    $ref: \").append(toIndentedString($ref)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/links/LinkParameter.java",
    "content": "package io.swagger.v3.oas.models.links;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\nimport java.util.Objects;\n\n/**\n * LinkParameter\n *\n */\n\npublic class LinkParameter {\n    private String value;\n\n    public LinkParameter() {\n    }\n\n    private java.util.Map<String, Object> extensions = null;\n\n    public String getValue() {\n        return value;\n    }\n\n    public void setValue(String value) {\n        this.value = value;\n    }\n\n    public LinkParameter value(String value) {\n        this.value = value;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        LinkParameter linkParameters = (LinkParameter) o;\n        return Objects.equals(this.value, linkParameters.value) &&\n                Objects.equals(this.extensions, linkParameters.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(value, extensions);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public LinkParameter extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class LinkParameter {\\n\");\n\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/ArbitrarySchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.util.Objects;\n\n/**\n * ArbitrarySchema\n */\n\npublic class ArbitrarySchema extends Schema<Object> {\n\n    public ArbitrarySchema() {\n    }\n\n    @Override\n    public ArbitrarySchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    @Override\n    public ArbitrarySchema example(Object example) {\n        if (example != null) {\n            super.setExample(example.toString());\n        } else {\n            super.setExample(example);\n        }\n        return this;\n    }\n\n    @Override\n    protected Object cast(Object value) {\n        return value;\n    }\n\n    @Override\n    public boolean equals(Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class ArbitrarySchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/ArraySchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\n/**\n * ArraySchema\n */\n\npublic class ArraySchema extends Schema<Object> {\n\n    public ArraySchema() {\n        super(\"array\", null);\n    }\n\n    @Override\n    public ArraySchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    @Override\n    public ArraySchema items(Schema items) {\n        super.setItems(items);\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class ArraySchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/BinarySchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.util.Base64;\nimport java.util.List;\nimport java.util.Objects;\n\n/**\n * BinarySchema\n */\n\npublic class BinarySchema extends Schema<byte[]> {\n\n    public BinarySchema() {\n        super(\"string\", \"binary\");\n    }\n\n    @Override\n    public BinarySchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    @Override\n    public BinarySchema format(String format) {\n        super.setFormat(format);\n        return this;\n    }\n\n    public BinarySchema _default(byte[] _default) {\n        super.setDefault(_default);\n        return this;\n    }\n\n    @Override\n    protected byte[] cast(Object value) {\n        if (value != null) {\n            try {\n                if (value instanceof byte[]) {\n                    return (byte[]) value;\n                } else if (value instanceof String) {\n                    if (\n                            (System.getProperty(BINARY_STRING_CONVERSION_PROPERTY) != null && System.getProperty(BINARY_STRING_CONVERSION_PROPERTY).equals(BynaryStringConversion.BINARY_STRING_CONVERSION_BASE64.toString())) ||\n                            (System.getenv(BINARY_STRING_CONVERSION_PROPERTY) != null && System.getenv(BINARY_STRING_CONVERSION_PROPERTY).equals(BynaryStringConversion.BINARY_STRING_CONVERSION_BASE64.toString()))) {\n                        return Base64.getDecoder().decode((String) value);\n                    }\n                    return value.toString().getBytes();\n                } else {\n                    return value.toString().getBytes();\n                }\n            } catch (Exception e) {\n            }\n        }\n        return null;\n    }\n\n    public BinarySchema _enum(List<byte[]> _enum) {\n        super.setEnum(_enum);\n        return this;\n    }\n\n    public BinarySchema addEnumItem(byte[] _enumItem) {\n        super.addEnumItemObject(_enumItem);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(_default, _enum, super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class BinarySchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/BooleanSchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Objects;\nimport java.util.Set;\n\n/**\n * BooleanSchema\n */\n\npublic class BooleanSchema extends Schema<Boolean> {\n\n    public BooleanSchema() {\n        super(\"boolean\", null);\n    }\n\n    @Override\n    public BooleanSchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    @Override\n    public BooleanSchema types(Set<String> types) {\n        super.setTypes(types);\n        return this;\n    }\n\n\n    public BooleanSchema _default(Boolean _default) {\n        super.setDefault(_default);\n        return this;\n    }\n\n    @Override\n    protected Boolean cast(Object value) {\n        if (value != null) {\n            try {\n                return Boolean.parseBoolean(value.toString());\n            } catch (Exception e) {\n            }\n        }\n        return null;\n    }\n\n    public BooleanSchema _enum(List<Boolean> _enum) {\n        this._enum = _enum;\n        return this;\n    }\n\n    public BooleanSchema addEnumItem(Boolean _enumItem) {\n        if (this._enum == null) {\n            this._enum = new ArrayList<Boolean>();\n        }\n        this._enum.add(_enumItem);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class BooleanSchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/ByteArraySchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.util.Base64;\nimport java.util.List;\nimport java.util.Objects;\n\n/**\n * ByteArraySchema\n */\n\npublic class ByteArraySchema extends Schema<byte[]> {\n\n    public ByteArraySchema() {\n        super(\"string\", \"byte\");\n    }\n\n    @Override\n    public ByteArraySchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    @Override\n    public ByteArraySchema format(String format) {\n        super.setFormat(format);\n        return this;\n    }\n\n    public ByteArraySchema _default(byte[] _default) {\n        super.setDefault(_default);\n        return this;\n    }\n\n    @Override\n    protected byte[] cast(Object value) {\n        if (value != null) {\n            try {\n                if (value instanceof byte[]) {\n                    return (byte[]) value;\n                } else if (value instanceof String) {\n                    if (\n                            (System.getProperty(BINARY_STRING_CONVERSION_PROPERTY) != null && System.getProperty(BINARY_STRING_CONVERSION_PROPERTY).equals(BynaryStringConversion.BINARY_STRING_CONVERSION_BASE64.toString())) ||\n                            (System.getenv(BINARY_STRING_CONVERSION_PROPERTY) != null && System.getenv(BINARY_STRING_CONVERSION_PROPERTY).equals(BynaryStringConversion.BINARY_STRING_CONVERSION_BASE64.toString()))) {\n                        return Base64.getDecoder().decode((String) value);\n                    }\n                    return value.toString().getBytes();\n                } else {\n                    return value.toString().getBytes();\n                }\n            } catch (Exception e) {\n            }\n        }\n        return null;\n    }\n\n    public ByteArraySchema _enum(List<byte[]> _enum) {\n        super.setEnum(_enum);\n        return this;\n    }\n\n    public ByteArraySchema addEnumItem(byte[] _enumItem) {\n        super.addEnumItemObject(_enumItem);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class ByteArraySchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/ComposedSchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\n/**\n * ComposedSchema\n */\n\npublic class ComposedSchema extends Schema<Object> {\n\n    public static ComposedSchema from(Schema subtypeModel) {\n        ComposedSchema composedSchema = new ComposedSchema();\n        copySchemaProperties(composedSchema, subtypeModel);\n\n\n        if (shouldSetExample(subtypeModel)) {\n            composedSchema.example(subtypeModel.getExample());\n        }\n        composedSchema.setEnum(subtypeModel.getEnum());\n        return composedSchema;\n    }\n\n    private static void copySchemaProperties(ComposedSchema target, Schema source) {\n        target.title(source.getTitle())\n                .name(source.getName())\n                .deprecated(source.getDeprecated())\n                .additionalProperties(source.getAdditionalProperties())\n                .description(source.getDescription())\n                .discriminator(source.getDiscriminator())\n                .exclusiveMaximum(source.getExclusiveMaximum())\n                .exclusiveMinimum(source.getExclusiveMinimum())\n                .externalDocs(source.getExternalDocs())\n                .format(source.getFormat())\n                .maximum(source.getMaximum())\n                .maxItems(source.getMaxItems())\n                .maxLength(source.getMaxLength())\n                .maxProperties(source.getMaxProperties())\n                .minimum(source.getMinimum())\n                .minItems(source.getMinItems())\n                .minLength(source.getMinLength())\n                .minProperties(source.getMinProperties())\n                .multipleOf(source.getMultipleOf())\n                .not(source.getNot())\n                .nullable(source.getNullable())\n                .pattern(source.getPattern())\n                .properties(source.getProperties())\n                .readOnly(source.getReadOnly())\n                .required(source.getRequired())\n                .type(source.getType())\n                .uniqueItems(source.getUniqueItems())\n                .writeOnly(source.getWriteOnly())\n                .xml(source.getXml())\n                .extensions(source.getExtensions());\n    }\n\n\n    private static boolean shouldSetExample(Schema model) {\n        return model.getExample() != null || model.getExampleSetFlag();\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class ComposedSchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/Content.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.util.LinkedHashMap;\nimport java.util.Objects;\n\n/**\n * Content\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#content-object\"\n */\n\npublic class Content extends LinkedHashMap<String, MediaType> {\n    public Content() {\n    }\n\n    public Content addMediaType(String name, MediaType item) {\n        this.put(name, item);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Content {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/DateSchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\nimport java.util.Objects;\n\n/**\n * DateSchema\n */\n\npublic class DateSchema extends Schema<Date> {\n\n    public DateSchema() {\n        super(\"string\", \"date\");\n    }\n\n    @Override\n    public DateSchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    @Override\n    public DateSchema format(String format) {\n        super.setFormat(format);\n        return this;\n    }\n\n    public DateSchema _default(Date _default) {\n        super.setDefault(_default);\n        return this;\n    }\n\n    @Override\n    protected Date cast(Object value) {\n        if (value != null) {\n            try {\n                if (value instanceof Date) {\n                    return (Date) value;\n                } else if (value instanceof String) {\n                    return new SimpleDateFormat(\"yyyy-MM-dd Z\").parse((String)value + \" UTC\");\n                }\n            } catch (Exception e) {\n            }\n        }\n        return null;\n    }\n\n    public DateSchema addEnumItem(Date _enumItem) {\n        super.addEnumItemObject(_enumItem);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class DateSchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/DateTimeSchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.time.OffsetDateTime;\nimport java.time.ZoneOffset;\nimport java.util.Date;\nimport java.util.List;\nimport java.util.Objects;\n\n/**\n * DateTimeSchema\n */\n\npublic class DateTimeSchema extends Schema<OffsetDateTime> {\n\n    public DateTimeSchema() {\n        super(\"string\", \"date-time\");\n    }\n\n    @Override\n    public DateTimeSchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    @Override\n    public DateTimeSchema format(String format) {\n        super.setFormat(format);\n        return this;\n    }\n\n    public DateTimeSchema _default(Date _default) {\n        super.setDefault(_default);\n        return this;\n    }\n\n    @Override\n    protected OffsetDateTime cast(Object value) {\n        if (value != null) {\n            try {\n                if (value instanceof Date) {\n                    return ((Date)value).toInstant().atOffset(ZoneOffset.UTC);\n                } else if (value instanceof String) {\n                    return OffsetDateTime.parse((String)value);\n                } else if (value instanceof OffsetDateTime) {\n                    return (OffsetDateTime)value;\n                }\n            } catch (Exception e) {\n            }\n        }\n        return null;\n    }\n\n    public DateTimeSchema _enum(List<OffsetDateTime> _enum) {\n        super.setEnum(_enum);\n        return this;\n    }\n\n    public DateTimeSchema addEnumItem(OffsetDateTime _enumItem) {\n        super.addEnumItemObject(_enumItem);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class DateTimeSchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/Discriminator.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport java.util.Objects;\n\npublic class Discriminator {\n    private String propertyName;\n    private Map<String, String> mapping;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Map<String, Object> extensions;\n\n    public Discriminator propertyName(String propertyName) {\n        this.propertyName = propertyName;\n        return this;\n    }\n\n    public String getPropertyName() {\n        return propertyName;\n    }\n\n    public void setPropertyName(String propertyName) {\n        this.propertyName = propertyName;\n    }\n\n    public Discriminator mapping(String name, String value) {\n        if (this.mapping == null) {\n            this.mapping = new LinkedHashMap<>();\n        }\n        this.mapping.put(name, value);\n        return this;\n    }\n\n    public Discriminator mapping(Map<String, String> mapping) {\n        this.mapping = mapping;\n        return this;\n    }\n\n    public Map<String, String> getMapping() {\n        return mapping;\n    }\n\n    public void setMapping(Map<String, String> mapping) {\n        this.mapping = mapping;\n    }\n\n    /**\n     * returns the specific extensions from a Discriminator instance.\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     * @return Map&lt;String, Object&gt; extensions\n     **/\n    @OpenAPI31\n    public Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    @OpenAPI31\n    public void setExtensions(Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    @OpenAPI31\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @Override\n    public boolean equals(Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (!(o instanceof Discriminator)) {\n            return false;\n        }\n\n        Discriminator that = (Discriminator) o;\n\n        if (propertyName != null ? !propertyName.equals(that.propertyName) : that.propertyName != null) {\n            return false;\n        }\n        if (extensions != null ? !extensions.equals(that.extensions) : that.extensions != null) {\n            return false;\n        }\n        return mapping != null ? mapping.equals(that.mapping) : that.mapping == null;\n\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(propertyName, mapping, extensions);\n    }\n\n    @Override\n    public String toString() {\n        return \"Discriminator{\" +\n                \"propertyName='\" + propertyName + '\\'' +\n                \", mapping=\" + mapping +\n                \", extensions=\" + extensions +\n                '}';\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/EmailSchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.util.Objects;\n\n/**\n * EmailSchema\n */\n\npublic class EmailSchema extends Schema<String> {\n\n    public EmailSchema() {\n        super(\"string\", \"email\");\n    }\n\n    @Override\n    public EmailSchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    @Override\n    public EmailSchema format(String format) {\n        super.setFormat(format);\n        return this;\n    }\n\n    public EmailSchema _default(String _default) {\n        super.setDefault(_default);\n        return this;\n    }\n\n    @Override\n    protected String cast(Object value) {\n        if (value != null) {\n            try {\n                return value.toString();\n            } catch (Exception e) {\n            }\n        }\n        return null;\n    }\n\n    public EmailSchema addEnumItem(String _enumItem) {\n        super.addEnumItemObject(_enumItem);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class EmailSchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/Encoding.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\nimport io.swagger.v3.oas.models.headers.Header;\n\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport java.util.Objects;\n\n/**\n * Encoding\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#encoding-object\"\n */\n\npublic class Encoding {\n    private String contentType;\n    private Map<String, Header> headers;\n    private StyleEnum style;\n    private Boolean explode;\n    private Boolean allowReserved;\n    private java.util.Map<String, Object> extensions = null;\n\n    public enum StyleEnum {\n        FORM(\"form\"),\n        SPACE_DELIMITED(\"spaceDelimited\"),\n        PIPE_DELIMITED(\"pipeDelimited\"),\n        DEEP_OBJECT(\"deepObject\");\n\n        private String value;\n\n        StyleEnum(String value) {\n            this.value = value;\n        }\n\n        @Override\n        public String toString() {\n            return String.valueOf(value);\n        }\n\n        public static StyleEnum fromString(String value) {\n            for (StyleEnum e : values()) {\n                if (e.value.equals(value)) {\n                    return e;\n                }\n            }\n            return null;\n        }\n    }\n\n    public Encoding() {\n    }\n\n    public Encoding contentType(String contentType) {\n        this.contentType = contentType;\n        return this;\n    }\n\n    public String getContentType() {\n        return contentType;\n    }\n\n    public void setContentType(String contentType) {\n        this.contentType = contentType;\n    }\n\n    public Encoding headers(Map<String, Header> headers) {\n        this.headers = headers;\n        return this;\n    }\n\n    public Map<String, Header> getHeaders() {\n        return headers;\n    }\n\n    public void setHeaders(Map<String, Header> headers) {\n        this.headers = headers;\n    }\n\n    public Encoding addHeader(String name, Header header) {\n        if (this.headers == null) {\n            this.headers = new LinkedHashMap<>();\n        }\n        this.headers.put(name, header);\n        return this;\n    }\n\n    public Encoding style(StyleEnum style) {\n        this.style = style;\n        return this;\n    }\n\n    public StyleEnum getStyle() {\n        return style;\n    }\n\n    public void setStyle(StyleEnum style) {\n        this.style = style;\n    }\n\n    public Encoding explode(Boolean explode) {\n        this.explode = explode;\n        return this;\n    }\n\n    public Boolean getExplode() {\n        return explode;\n    }\n\n    public void setExplode(Boolean explode) {\n        this.explode = explode;\n    }\n\n    public Encoding allowReserved(Boolean allowReserved) {\n        this.allowReserved = allowReserved;\n        return this;\n    }\n\n    public Boolean getAllowReserved() {\n        return allowReserved;\n    }\n\n    public void setAllowReserved(Boolean allowReserved) {\n        this.allowReserved = allowReserved;\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public Encoding extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        Encoding encoding = (Encoding) o;\n        return Objects.equals(this.contentType, encoding.contentType) &&\n                Objects.equals(this.headers, encoding.headers) &&\n                Objects.equals(this.style, encoding.style) &&\n                Objects.equals(this.explode, encoding.explode) &&\n                Objects.equals(this.extensions, encoding.extensions) &&\n                Objects.equals(this.allowReserved, encoding.allowReserved);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(contentType, headers, style, explode, allowReserved, extensions);\n    }\n\n    @Override\n    public String toString() {\n        return \"Encoding{\" +\n                \"contentType='\" + contentType + '\\'' +\n                \", headers=\" + headers +\n                \", style='\" + style + '\\'' +\n                \", explode=\" + explode +\n                \", allowReserved=\" + allowReserved +\n                \", extensions=\" + extensions +\n                '}';\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/EncodingProperty.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\nimport io.swagger.v3.oas.models.headers.Header;\n\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport java.util.Objects;\n\n/**\n * EncodingProperty\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#encoding-property-object\"\n */\n\npublic class EncodingProperty {\n    private String contentType = null;\n    private Map<String, Header> headers = null;\n\n    /**\n     * Gets or Sets style\n     */\n    public enum StyleEnum {\n        FORM(\"form\"),\n\n        SPACEDELIMITED(\"spaceDelimited\"),\n\n        PIPEDELIMITED(\"pipeDelimited\"),\n\n        DEEPOBJECT(\"deepObject\");\n\n        private String value;\n\n        StyleEnum(String value) {\n            this.value = value;\n        }\n\n        @Override\n        public String toString() {\n            return String.valueOf(value);\n        }\n    }\n\n    private StyleEnum style = null;\n    private Boolean explode = null;\n    private Boolean allowReserved = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the contentType property from a EncodingProperty instance.\n     *\n     * @return String contentType\n     **/\n\n    public String getContentType() {\n        return contentType;\n    }\n\n    public void setContentType(String contentType) {\n        this.contentType = contentType;\n    }\n\n    public EncodingProperty contentType(String contentType) {\n        this.contentType = contentType;\n        return this;\n    }\n\n    /**\n     * returns the headers property from a EncodingProperty instance.\n     *\n     * @return headers\n     **/\n\n    public Map<String, Header> getHeaders() {\n        return headers;\n    }\n\n    public void setHeaders(Map<String, Header> headers) {\n        this.headers = headers;\n    }\n\n    public EncodingProperty headers(Map<String, Header> headers) {\n        this.headers = headers;\n        return this;\n    }\n\n    public EncodingProperty addHeaderObject(String name, Header header) {\n        if (this.headers == null) {\n            headers = new LinkedHashMap<>();\n        }\n        headers.put(name, header);\n        return this;\n    }\n\n    /**\n     * returns the style property from a EncodingProperty instance.\n     *\n     * @return StyleEnum style\n     **/\n\n    public StyleEnum getStyle() {\n        return style;\n    }\n\n    public void setStyle(StyleEnum style) {\n        this.style = style;\n    }\n\n    public EncodingProperty style(StyleEnum style) {\n        this.style = style;\n        return this;\n    }\n\n    /**\n     * returns the explode property from a EncodingProperty instance.\n     *\n     * @return Boolean explode\n     **/\n\n    public Boolean getExplode() {\n        return explode;\n    }\n\n    public void setExplode(Boolean explode) {\n        this.explode = explode;\n    }\n\n    public EncodingProperty explode(Boolean explode) {\n        this.explode = explode;\n        return this;\n    }\n\n    /**\n     * returns the allowReserved property from a EncodingProperty instance.\n     *\n     * @return Boolean allowReserved\n     **/\n\n    public Boolean getAllowReserved() {\n        return allowReserved;\n    }\n\n    public void setAllowReserved(Boolean allowReserved) {\n        this.allowReserved = allowReserved;\n    }\n\n    public EncodingProperty allowReserved(Boolean allowReserved) {\n        this.allowReserved = allowReserved;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        EncodingProperty encodingProperty = (EncodingProperty) o;\n        return Objects.equals(this.contentType, encodingProperty.contentType) &&\n                Objects.equals(this.headers, encodingProperty.headers) &&\n                Objects.equals(this.style, encodingProperty.style) &&\n                Objects.equals(this.explode, encodingProperty.explode) &&\n                Objects.equals(this.allowReserved, encodingProperty.allowReserved) &&\n                Objects.equals(this.extensions, encodingProperty.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(contentType, headers, style, explode, allowReserved, extensions);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public EncodingProperty extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class EncodingProperty {\\n\");\n\n        sb.append(\"    contentType: \").append(toIndentedString(contentType)).append(\"\\n\");\n        sb.append(\"    headers: \").append(toIndentedString(headers)).append(\"\\n\");\n        sb.append(\"    style: \").append(toIndentedString(style)).append(\"\\n\");\n        sb.append(\"    explode: \").append(toIndentedString(explode)).append(\"\\n\");\n        sb.append(\"    allowReserved: \").append(toIndentedString(allowReserved)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/FileSchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.util.Objects;\n\n/**\n * FileSchema\n */\n\npublic class FileSchema extends Schema<String> {\n\n    public FileSchema() {\n        super(\"string\", \"binary\");\n    }\n\n    @Override\n    public FileSchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    @Override\n    public FileSchema format(String format) {\n        super.setFormat(format);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class FileSchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/IntegerSchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.text.NumberFormat;\nimport java.util.Objects;\n\n/**\n * IntegerSchema\n */\n\npublic class IntegerSchema extends Schema<Number> {\n\n    public IntegerSchema() {\n        super(\"integer\", \"int32\");\n    }\n\n    @Override\n    public IntegerSchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    @Override\n    public IntegerSchema format(String format) {\n        super.setFormat(format);\n        return this;\n    }\n\n    public IntegerSchema _default(Number _default) {\n        super.setDefault(_default);\n        return this;\n    }\n\n    @Override\n    protected Number cast(Object value) {\n        if (value != null) {\n            try {\n                Number casted = NumberFormat.getInstance().parse(value.toString());\n                if (Integer.MIN_VALUE <= casted.longValue() && casted.longValue() <= Integer.MAX_VALUE) {\n                    return Integer.parseInt(value.toString());\n                } else {\n                    return Long.parseLong(value.toString());\n                }\n            } catch (Exception e) {\n            }\n        }\n        return null;\n    }\n\n    public IntegerSchema addEnumItem(Number _enumItem) {\n        super.addEnumItemObject(_enumItem);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class IntegerSchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/JsonSchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport io.swagger.v3.oas.models.SpecVersion;\n\nimport java.text.NumberFormat;\nimport java.util.Arrays;\nimport java.util.HashSet;\nimport java.util.Set;\n\n/**\n * JsonSchema\n */\n\npublic class JsonSchema extends Schema<Object> {\n\n    private static final Set<String> NUMBER_TYPES = new HashSet<>(Arrays.asList(\"integer\", \"number\"));\n\n    public JsonSchema (){\n        specVersion(SpecVersion.V31);\n    }\n\n    private String resolveType() {\n        if (this.getTypes() != null) {\n            if (this.getTypes().size() == 1) {\n                String type = this.getTypes().iterator().next();\n                if (NUMBER_TYPES.contains(type)) {\n                    return \"number\";\n                }\n                return type;\n            }\n            if (this.getTypes().contains(\"object\")) {\n                return \"object\";\n            } else if (this.getTypes().contains(\"string\")) {\n                return \"string\";\n            } else if (this.getTypes().contains(\"array\")) {\n                return \"array\";\n            } else if (this.getTypes().contains(\"integer\") || this.getTypes().contains(\"number\")) {\n                return \"number\";\n            } else if (this.getTypes().contains(\"boolean\")) {\n                return \"boolean\";\n            }\n            return this.getTypes().iterator().next();\n        }\n        return \"null\";\n    }\n\n    protected Object cast(Object value) {\n        if (value == null) {\n            return null;\n        }\n        if (value instanceof String) {\n            if (resolveType().equals(\"number\")) {\n                try {\n                    Number casted = NumberFormat.getInstance().parse(value.toString());\n                    if (Integer.MIN_VALUE <= casted.longValue() && casted.longValue() <= Integer.MAX_VALUE) {\n                        return Integer.parseInt(value.toString());\n                    } else {\n                        return Long.parseLong(value.toString());\n                    }\n                } catch (Exception e) {\n                    return value;\n                }\n            } else if (resolveType().equals(\"boolean\")) {\n                return Boolean.parseBoolean(value.toString());\n            }\n\n        }\n        return value;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class JsonSchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/MapSchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.util.Objects;\n\n/**\n * MapSchema\n */\n\npublic class MapSchema extends Schema<Object> {\n\n    public MapSchema() {\n        super(\"object\", null);\n    }\n\n    @Override\n    public MapSchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class MapSchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/MediaType.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\nimport io.swagger.v3.oas.models.examples.Example;\n\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport java.util.Objects;\n\n/**\n * MediaType\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#media-type-object\"\n */\n\npublic class MediaType {\n    private Schema schema = null;\n    private Map<String, Example> examples = null;\n    private Object example = null;\n    private Map<String, Encoding> encoding = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    private boolean exampleSetFlag;\n\n    /**\n     * returns the schema property from a MediaType instance.\n     *\n     * @return Schema schema\n     **/\n\n    public Schema getSchema() {\n        return schema;\n    }\n\n    public void setSchema(Schema schema) {\n        this.schema = schema;\n    }\n\n    public MediaType schema(Schema schema) {\n        this.schema = schema;\n        return this;\n    }\n\n    /**\n     * returns the examples property from a MediaType instance.\n     *\n     * @return Map&lt;String, Example&gt; examples\n     **/\n\n    public Map<String, Example> getExamples() {\n        return examples;\n    }\n\n    public void setExamples(Map<String, Example> examples) {\n        this.examples = examples;\n    }\n\n    public MediaType examples(Map<String, Example> examples) {\n        this.examples = examples;\n        return this;\n    }\n\n    public MediaType addExamples(String key, Example examplesItem) {\n        if (this.examples == null) {\n            this.examples = new LinkedHashMap<>();\n        }\n        this.examples.put(key, examplesItem);\n        return this;\n    }\n\n    /**\n     * returns the example property from a MediaType instance.\n     *\n     * @return String example\n     **/\n\n    public Object getExample() {\n        return example;\n    }\n\n    public void setExample(Object example) {\n        if (this.schema == null) {\n            this.example = example;\n            this.exampleSetFlag = true;\n            return;\n        }\n        this.example = this.schema.cast(example);\n        if (!(example != null && this.example == null)) {\n            this.exampleSetFlag = true;\n        }\n    }\n\n    public MediaType example(Object example) {\n        setExample(example);\n        return this;\n    }\n\n    /**\n     * returns the encoding property from a MediaType instance.\n     *\n     * @return Encoding encoding\n     **/\n\n    public Map<String, Encoding> getEncoding() {\n        return encoding;\n    }\n\n    public void setEncoding(Map<String, Encoding> encoding) {\n        this.encoding = encoding;\n    }\n\n    public MediaType encoding(Map<String, Encoding> encoding) {\n        this.encoding = encoding;\n        return this;\n    }\n\n    public MediaType addEncoding(String key, Encoding encodingItem) {\n        if (this.encoding == null) {\n            this.encoding = new LinkedHashMap<>();\n        }\n        this.encoding.put(key, encodingItem);\n        return this;\n    }\n\n    public boolean getExampleSetFlag() {\n        return exampleSetFlag;\n    }\n\n    public void setExampleSetFlag(boolean exampleSetFlag) {\n        this.exampleSetFlag = exampleSetFlag;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        MediaType mediaType = (MediaType) o;\n        return Objects.equals(this.schema, mediaType.schema) &&\n                Objects.equals(this.examples, mediaType.examples) &&\n                Objects.equals(this.example, mediaType.example) &&\n                Objects.equals(this.encoding, mediaType.encoding) &&\n                Objects.equals(this.extensions, mediaType.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(schema, examples, example, encoding, extensions);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public MediaType extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class MediaType {\\n\");\n\n        sb.append(\"    schema: \").append(toIndentedString(schema)).append(\"\\n\");\n        sb.append(\"    examples: \").append(toIndentedString(examples)).append(\"\\n\");\n        sb.append(\"    example: \").append(toIndentedString(example)).append(\"\\n\");\n        sb.append(\"    encoding: \").append(toIndentedString(encoding)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/NumberSchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.math.BigDecimal;\nimport java.util.List;\nimport java.util.Objects;\n\n/**\n * NumberSchema\n */\n\npublic class NumberSchema extends Schema<BigDecimal> {\n\n    public NumberSchema() {\n        super(\"number\", null);\n    }\n\n    @Override\n    public NumberSchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    public NumberSchema _default(BigDecimal _default) {\n        super.setDefault(_default);\n        return this;\n    }\n\n    public NumberSchema _enum(List<BigDecimal> _enum) {\n        super.setEnum(_enum);\n        return this;\n    }\n\n    public NumberSchema addEnumItem(BigDecimal _enumItem) {\n        super.addEnumItemObject(_enumItem);\n        return this;\n    }\n\n    @Override\n    protected BigDecimal cast(Object value) {\n        if (value != null) {\n            try {\n                return new BigDecimal(value.toString());\n            } catch (Exception e) {\n            }\n        }\n        return null;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class NumberSchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/ObjectSchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.util.Objects;\n\n/**\n * ObjectSchema\n */\n\npublic class ObjectSchema extends Schema<Object> {\n\n    public ObjectSchema() {\n        super(\"object\", null);\n    }\n\n    @Override\n    public ObjectSchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    @Override\n    public ObjectSchema example(Object example) {\n        if (example != null) {\n            super.setExample(example.toString());\n        } else {\n            super.setExample(example);\n        }\n        return this;\n    }\n\n    @Override\n    protected Object cast(Object value) {\n        return value;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class ObjectSchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/PasswordSchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.util.Objects;\n\n/**\n * PasswordSchema\n */\n\npublic class PasswordSchema extends Schema<String> {\n\n    public PasswordSchema() {\n        super(\"string\", \"password\");\n    }\n\n    @Override\n    public PasswordSchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    @Override\n    public PasswordSchema format(String format) {\n        super.setFormat(format);\n        return this;\n    }\n\n    public PasswordSchema _default(String _default) {\n        super.setDefault(_default);\n        return this;\n    }\n\n    @Override\n    protected String cast(Object value) {\n        if (value != null) {\n            try {\n                return value.toString();\n            } catch (Exception e) {\n            }\n        }\n        return null;\n    }\n\n    public PasswordSchema addEnumItem(String _enumItem) {\n        super.addEnumItemObject(_enumItem);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class PasswordSchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/Schema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport io.swagger.v3.oas.models.annotations.OpenAPI30;\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.ExternalDocumentation;\nimport io.swagger.v3.oas.models.SpecVersion;\n\nimport java.math.BigDecimal;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.LinkedHashMap;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Objects;\nimport java.util.Set;\n\n/**\n * Schema\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#schema-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#schema-object\"\n */\n\npublic class Schema<T> {\n\n    public static final String BIND_TYPE_AND_TYPES = \"bind-type\";\n    public static final String BINARY_STRING_CONVERSION_PROPERTY = \"binary-string-conversion\";\n    public enum BynaryStringConversion {\n        BINARY_STRING_CONVERSION_BASE64(\"base64\"),\n        BINARY_STRING_CONVERSION_DEFAULT_CHARSET(\"default\"),\n        BINARY_STRING_CONVERSION_STRING_SCHEMA(\"string-schema\");\n        private String value;\n\n        BynaryStringConversion(String value) {\n            this.value = value;\n        }\n\n        @Override\n        public String toString() {\n            return String.valueOf(value);\n        }\n    }\n\n    public static final String SCHEMA_RESOLUTION_PROPERTY = \"schema-resolution\";\n    public static final String APPLY_SCHEMA_RESOLUTION_PROPERTY = \"apply-schema-resolution\";\n    public static final String EXPLICIT_OBJECT_SCHEMA_PROPERTY = \"explicit-object-schema\";\n    public static final String USE_ARBITRARY_SCHEMA_PROPERTY = \"use-arbitrary-schema\";\n\n    public enum SchemaResolution {\n        @JsonProperty(\"default\")\n        DEFAULT(\"default\"),\n        @JsonProperty(\"inline\")\n        INLINE(\"inline\"),\n        @JsonProperty(\"all-of\")\n        ALL_OF(\"all-of\"),\n        @JsonProperty(\"all-of-ref\")\n        ALL_OF_REF(\"all-of-ref\");\n\n        private String value;\n\n        SchemaResolution(String value) {\n            this.value = value;\n        }\n\n        @Override\n        public String toString() {\n            return String.valueOf(value);\n        }\n    }\n\n    protected T _default;\n\n    private String name;\n    private String title = null;\n    private BigDecimal multipleOf = null;\n    private BigDecimal maximum = null;\n    @OpenAPI30\n    private Boolean exclusiveMaximum = null;\n    private BigDecimal minimum = null;\n    @OpenAPI30\n    private Boolean exclusiveMinimum = null;\n    private Integer maxLength = null;\n    private Integer minLength = null;\n    private String pattern = null;\n    private Integer maxItems = null;\n    private Integer minItems = null;\n    private Boolean uniqueItems = null;\n    private Integer maxProperties = null;\n    private Integer minProperties = null;\n    private List<String> required = null;\n    @OpenAPI30\n    private String type = null;\n    private Schema not = null;\n    private Map<String, Schema> properties = null;\n    private Object additionalProperties = null;\n    private String description = null;\n    private String format = null;\n    private String $ref = null;\n    @OpenAPI30\n    private Boolean nullable = null;\n    private Boolean readOnly = null;\n    private Boolean writeOnly = null;\n    protected T example = null;\n    private ExternalDocumentation externalDocs = null;\n    private Boolean deprecated = null;\n    private XML xml = null;\n    private java.util.Map<String, Object> extensions = null;\n    protected List<T> _enum = null;\n    private Discriminator discriminator = null;\n\n    @JsonIgnore\n    private boolean exampleSetFlag;\n    @JsonIgnore\n    private boolean defaultSetFlag;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private List<Schema> prefixItems = null;\n    private List<Schema> allOf = null;\n    private List<Schema> anyOf = null;\n    private List<Schema> oneOf = null;\n\n    private Schema<?> items = null;\n\n    protected T _const;\n\n    private SpecVersion specVersion = SpecVersion.V30;\n\n    @JsonIgnore\n    public SpecVersion getSpecVersion() {\n        return this.specVersion;\n    }\n\n    public void setSpecVersion(SpecVersion specVersion) {\n        this.specVersion = specVersion;\n    }\n\n    public Schema specVersion(SpecVersion specVersion) {\n        this.setSpecVersion(specVersion);\n        return this;\n    }\n\n\n    /*\n    @OpenAPI31 fields and accessors\n    */\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Set<String> types;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Map<String, Schema> patternProperties = null;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private BigDecimal exclusiveMaximumValue = null;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private BigDecimal exclusiveMinimumValue = null;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Schema contains = null;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private String $id;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private String $schema;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private String $anchor;\n\n    /**\n     * @since 2.2.14 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private String $vocabulary;\n\n    /**\n     * @since 2.2.14 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private String $dynamicAnchor;\n\n    /**\n     * @since 2.2.32 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private String $dynamicRef;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private String contentEncoding;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private String contentMediaType;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Schema contentSchema;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Schema propertyNames;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Schema unevaluatedProperties;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Integer maxContains;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Integer minContains;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Schema additionalItems;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Schema unevaluatedItems;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Schema _if;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Schema _else;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Schema then;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Map<String, Schema> dependentSchemas;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private Map<String, List<String>> dependentRequired;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private String $comment;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    private List<T> examples;\n\n    /**\n     * @since 2.2.2 (OpenAPI 3.1.0)\n     *\n     * when set, this represents a boolean schema value\n     */\n    @OpenAPI31\n    private Boolean booleanSchemaValue;\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema getContains() {\n        return contains;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setContains(Schema contains) {\n        this.contains = contains;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public String get$id() {\n        return $id;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void set$id(String $id) {\n        this.$id = $id;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public String get$schema() {\n        return $schema;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void set$schema(String $schema) {\n        this.$schema = $schema;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public String get$anchor() {\n        return $anchor;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void set$anchor(String $anchor) {\n        this.$anchor = $anchor;\n    }\n\n    /**\n     * returns the exclusiveMaximumValue property from a Schema instance for OpenAPI 3.1.x\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     * @return BigDecimal exclusiveMaximumValue\n     *\n     **/\n    @OpenAPI31\n    public BigDecimal getExclusiveMaximumValue() {\n        return exclusiveMaximumValue;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setExclusiveMaximumValue(BigDecimal exclusiveMaximumValue) {\n        this.exclusiveMaximumValue = exclusiveMaximumValue;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema exclusiveMaximumValue(BigDecimal exclusiveMaximumValue) {\n        this.exclusiveMaximumValue = exclusiveMaximumValue;\n        return this;\n    }\n\n    /**\n     * returns the exclusiveMinimumValue property from a Schema instance for OpenAPI 3.1.x\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     * @return BigDecimal exclusiveMinimumValue\n     *\n     **/\n    @OpenAPI31\n    public BigDecimal getExclusiveMinimumValue() {\n        return exclusiveMinimumValue;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setExclusiveMinimumValue(BigDecimal exclusiveMinimumValue) {\n        this.exclusiveMinimumValue = exclusiveMinimumValue;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema exclusiveMinimumValue(BigDecimal exclusiveMinimumValue) {\n        this.exclusiveMinimumValue = exclusiveMinimumValue;\n        return this;\n    }\n\n    /**\n     * returns the patternProperties property from a Schema instance.\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     * @return Map&lt;String, Schema&gt; patternProperties\n     **/\n    @OpenAPI31\n    public Map<String, Schema> getPatternProperties() {\n        return patternProperties;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setPatternProperties(Map<String, Schema> patternProperties) {\n        this.patternProperties = patternProperties;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema patternProperties(Map<String, Schema> patternProperties) {\n        this.patternProperties = patternProperties;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema addPatternProperty(String key, Schema patternPropertiesItem) {\n        if (this.patternProperties == null) {\n            this.patternProperties = new LinkedHashMap<>();\n        }\n        this.patternProperties.put(key, patternPropertiesItem);\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema contains(Schema contains) {\n        this.contains = contains;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema $id(String $id) {\n        this.$id = $id;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Set<String> getTypes() {\n        return types;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setTypes(Set<String> types) {\n        this.types = types;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public boolean addType(String type) {\n        if (types == null) {\n            types = new LinkedHashSet<>();\n        }\n        return types.add(type);\n    }\n\n    /**\n     *\n     * @since 2.2.30 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema typesItem(String type) {\n        addType(type);\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema $schema(String $schema) {\n        this.$schema = $schema;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.8 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public String get$vocabulary() {\n        return $vocabulary;\n    }\n\n    /**\n     *\n     * @since 2.2.8 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void set$vocabulary(String $vocabulary) {\n        this.$vocabulary = $vocabulary;\n    }\n\n    /**\n     *\n     * @since 2.2.8 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema $vocabulary(String $vocabulary) {\n        this.$vocabulary = $vocabulary;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.8 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public String get$dynamicAnchor() {\n        return $dynamicAnchor;\n    }\n\n    /**\n     *\n     * @since 2.2.8 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void set$dynamicAnchor(String $dynamicAnchor) {\n        this.$dynamicAnchor = $dynamicAnchor;\n    }\n\n    /**\n     *\n     * @since 2.2.8 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema $dynamicAnchor(String $dynamicAnchor) {\n        this.$dynamicAnchor = $dynamicAnchor;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.32 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public String get$dynamicRef() {\n        return $dynamicRef;\n    }\n\n    /**\n     *\n     * @since 2.2.32 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void set$dynamicRef(String $dynamicRef) {\n        this.$dynamicRef = $dynamicRef;\n    }\n\n    /**\n     *\n     * @since 2.2.32 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema $dynamicRef(String $dynamicRef) {\n        this.$dynamicRef = $dynamicRef;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema $anchor(String $anchor) {\n        this.$anchor = $anchor;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema types(Set<String> types) {\n        this.types = types;\n        return this;\n    }\n\n    /*\n    INTERNAL MEMBERS @OpenAPI31\n     */\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    protected Map<String, Object> jsonSchema = null;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Map<String, Object> getJsonSchema() {\n        return jsonSchema;\n    }\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setJsonSchema(Map<String, Object> jsonSchema) {\n        this.jsonSchema = jsonSchema;\n    }\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema jsonSchema(Map<String, Object> jsonSchema) {\n        this.jsonSchema = jsonSchema;\n        return this;\n    }\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    protected transient Object jsonSchemaImpl = null;\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Object getJsonSchemaImpl() {\n        return jsonSchemaImpl;\n    }\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setJsonSchemaImpl(Object jsonSchemaImpl) {\n        this.jsonSchemaImpl = jsonSchemaImpl;\n    }\n\n    /**\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema jsonSchemaImpl(Object jsonSchemaImpl) {\n        setJsonSchemaImpl(jsonSchemaImpl);\n        return this;\n    }\n\n        /*\n    CONSTRUCTORS\n     */\n\n\n    public Schema() {\n    }\n\n    protected Schema(String type, String format) {\n        this.type = type;\n        this.addType(type);\n        this.format = format;\n    }\n\n    public Schema(SpecVersion specVersion) {\n        this.specVersion = specVersion;\n    }\n\n    protected Schema(String type, String format, SpecVersion specVersion) {\n        this.type = type;\n        this.addType(type);\n        this.format = format;\n        this.specVersion = specVersion;\n    }\n\n    /*\n    ACCESSORS\n     */\n\n    /**\n     * returns the allOf property from a ComposedSchema instance.\n     *\n     * @return List&lt;Schema&gt; allOf\n     **/\n\n    public List<Schema> getAllOf() {\n        return allOf;\n    }\n\n    public void setAllOf(List<Schema> allOf) {\n        this.allOf = allOf;\n    }\n\n    public Schema allOf(List<Schema> allOf) {\n        this.allOf = allOf;\n        return this;\n    }\n\n    public Schema addAllOfItem(Schema allOfItem) {\n        if (this.allOf == null) {\n            this.allOf = new ArrayList<>();\n        }\n        this.allOf.add(allOfItem);\n        return this;\n    }\n\n    /**\n     * returns the anyOf property from a ComposedSchema instance.\n     *\n     * @return List&lt;Schema&gt; anyOf\n     **/\n\n    public List<Schema> getAnyOf() {\n        return anyOf;\n    }\n\n    public void setAnyOf(List<Schema> anyOf) {\n        this.anyOf = anyOf;\n    }\n\n    public Schema anyOf(List<Schema> anyOf) {\n        this.anyOf = anyOf;\n        return this;\n    }\n\n    public Schema addAnyOfItem(Schema anyOfItem) {\n        if (this.anyOf == null) {\n            this.anyOf = new ArrayList<>();\n        }\n        this.anyOf.add(anyOfItem);\n        return this;\n    }\n\n    /**\n     * returns the oneOf property from a ComposedSchema instance.\n     *\n     * @return List&lt;Schema&gt; oneOf\n     **/\n\n    public List<Schema> getOneOf() {\n        return oneOf;\n    }\n\n    public void setOneOf(List<Schema> oneOf) {\n        this.oneOf = oneOf;\n    }\n\n    public Schema oneOf(List<Schema> oneOf) {\n        this.oneOf = oneOf;\n        return this;\n    }\n\n    public Schema addOneOfItem(Schema oneOfItem) {\n        if (this.oneOf == null) {\n            this.oneOf = new ArrayList<>();\n        }\n        this.oneOf.add(oneOfItem);\n        return this;\n    }\n\n\n    /**\n     * returns the items property from a ArraySchema instance.\n     *\n     * @return Schema items\n     **/\n\n    public Schema<?> getItems() {\n        return items;\n    }\n\n    public void setItems(Schema<?> items) {\n        this.items = items;\n    }\n\n    public Schema items(Schema<?> items) {\n        this.items = items;\n        return this;\n    }\n\n\n    /**\n     * returns the name property from a Schema instance. Ignored in serialization.\n     *\n     * @return String name\n     **/\n    @JsonIgnore\n    public String getName() {\n        return this.name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public Schema name(String name) {\n        this.setName(name);\n        return this;\n    }\n\n    /**\n     * returns the discriminator property from a AllOfSchema instance.\n     *\n     * @return Discriminator discriminator\n     **/\n\n    public Discriminator getDiscriminator() {\n        return discriminator;\n    }\n\n    public void setDiscriminator(Discriminator discriminator) {\n        this.discriminator = discriminator;\n    }\n\n    public Schema discriminator(Discriminator discriminator) {\n        this.discriminator = discriminator;\n        return this;\n    }\n\n    /**\n     * returns the title property from a Schema instance.\n     *\n     * @return String title\n     **/\n\n    public String getTitle() {\n        return title;\n    }\n\n    public void setTitle(String title) {\n        this.title = title;\n    }\n\n    public Schema title(String title) {\n        this.title = title;\n        return this;\n    }\n\n    /**\n     * returns the _default property from a Schema instance.\n     *\n     * @return String _default\n     **/\n\n    public T getDefault() {\n        return _default;\n    }\n\n    public void setDefault(Object _default) {\n        this._default = cast(_default);\n        if (!(_default != null && this._default == null)) {\n            defaultSetFlag = true;\n        }\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    protected T cast(Object value) {\n        return (T) value;\n    }\n\n    public List<T> getEnum() {\n        return _enum;\n    }\n\n    public void setEnum(List<T> _enum) {\n        this._enum = _enum;\n    }\n\n    public void addEnumItemObject(T _enumItem) {\n        if (this._enum == null) {\n            this._enum = new ArrayList<>();\n        }\n        this._enum.add(cast(_enumItem));\n    }\n\n    /**\n     * returns the multipleOf property from a Schema instance.\n     * <p>\n     * minimum: 0\n     *\n     * @return BigDecimal multipleOf\n     **/\n\n    public BigDecimal getMultipleOf() {\n        return multipleOf;\n    }\n\n    public void setMultipleOf(BigDecimal multipleOf) {\n        this.multipleOf = multipleOf;\n    }\n\n    public Schema multipleOf(BigDecimal multipleOf) {\n        this.multipleOf = multipleOf;\n        return this;\n    }\n\n    /**\n     * returns the maximum property from a Schema instance.\n     *\n     * @return BigDecimal maximum\n     **/\n\n    public BigDecimal getMaximum() {\n        return maximum;\n    }\n\n    public void setMaximum(BigDecimal maximum) {\n        this.maximum = maximum;\n    }\n\n    public Schema maximum(BigDecimal maximum) {\n        this.maximum = maximum;\n        return this;\n    }\n\n    /**\n     * returns the exclusiveMaximum property from a Schema instance for OpenAPI 3.0.x\n     *\n     * @return Boolean exclusiveMaximum\n     **/\n    @OpenAPI30\n    public Boolean getExclusiveMaximum() {\n        return exclusiveMaximum;\n    }\n\n    @OpenAPI30\n    public void setExclusiveMaximum(Boolean exclusiveMaximum) {\n        this.exclusiveMaximum = exclusiveMaximum;\n    }\n\n    @OpenAPI30\n    public Schema exclusiveMaximum(Boolean exclusiveMaximum) {\n        this.exclusiveMaximum = exclusiveMaximum;\n        return this;\n    }\n\n    /**\n     * returns the minimum property from a Schema instance.\n     *\n     * @return BigDecimal minimum\n     **/\n\n    public BigDecimal getMinimum() {\n        return minimum;\n    }\n\n    public void setMinimum(BigDecimal minimum) {\n        this.minimum = minimum;\n    }\n\n    public Schema minimum(BigDecimal minimum) {\n        this.minimum = minimum;\n        return this;\n    }\n\n\n    /**\n     * returns the exclusiveMinimum property from a Schema instance for OpenAPI 3.0.x\n     *\n     * @return Boolean exclusiveMinimum\n     **/\n\n    public Boolean getExclusiveMinimum() {\n        return exclusiveMinimum;\n    }\n\n    public void setExclusiveMinimum(Boolean exclusiveMinimum) {\n        this.exclusiveMinimum = exclusiveMinimum;\n    }\n\n    public Schema exclusiveMinimum(Boolean exclusiveMinimum) {\n        this.exclusiveMinimum = exclusiveMinimum;\n        return this;\n    }\n\n\n    /**\n     * returns the maxLength property from a Schema instance.\n     * <p>\n     * minimum: 0\n     *\n     * @return Integer maxLength\n     **/\n\n    public Integer getMaxLength() {\n        return maxLength;\n    }\n\n    public void setMaxLength(Integer maxLength) {\n        this.maxLength = maxLength;\n    }\n\n    public Schema maxLength(Integer maxLength) {\n        this.maxLength = maxLength;\n        return this;\n    }\n\n    /**\n     * returns the minLength property from a Schema instance.\n     * <p>\n     * minimum: 0\n     *\n     * @return Integer minLength\n     **/\n\n    public Integer getMinLength() {\n        return minLength;\n    }\n\n    public void setMinLength(Integer minLength) {\n        this.minLength = minLength;\n    }\n\n    public Schema minLength(Integer minLength) {\n        this.minLength = minLength;\n        return this;\n    }\n\n    /**\n     * returns the pattern property from a Schema instance.\n     *\n     * @return String pattern\n     **/\n\n    public String getPattern() {\n        return pattern;\n    }\n\n    public void setPattern(String pattern) {\n        this.pattern = pattern;\n    }\n\n    public Schema pattern(String pattern) {\n        this.pattern = pattern;\n        return this;\n    }\n\n    /**\n     * returns the maxItems property from a Schema instance.\n     * <p>\n     * minimum: 0\n     *\n     * @return Integer maxItems\n     **/\n\n    public Integer getMaxItems() {\n        return maxItems;\n    }\n\n    public void setMaxItems(Integer maxItems) {\n        this.maxItems = maxItems;\n    }\n\n    public Schema maxItems(Integer maxItems) {\n        this.maxItems = maxItems;\n        return this;\n    }\n\n    /**\n     * returns the minItems property from a Schema instance.\n     * <p>\n     * minimum: 0\n     *\n     * @return Integer minItems\n     **/\n\n    public Integer getMinItems() {\n        return minItems;\n    }\n\n    public void setMinItems(Integer minItems) {\n        this.minItems = minItems;\n    }\n\n    public Schema minItems(Integer minItems) {\n        this.minItems = minItems;\n        return this;\n    }\n\n    /**\n     * returns the uniqueItems property from a Schema instance.\n     *\n     * @return Boolean uniqueItems\n     **/\n\n    public Boolean getUniqueItems() {\n        return uniqueItems;\n    }\n\n    public void setUniqueItems(Boolean uniqueItems) {\n        this.uniqueItems = uniqueItems;\n    }\n\n    public Schema uniqueItems(Boolean uniqueItems) {\n        this.uniqueItems = uniqueItems;\n        return this;\n    }\n\n    /**\n     * returns the maxProperties property from a Schema instance.\n     * <p>\n     * minimum: 0\n     *\n     * @return Integer maxProperties\n     **/\n\n    public Integer getMaxProperties() {\n        return maxProperties;\n    }\n\n    public void setMaxProperties(Integer maxProperties) {\n        this.maxProperties = maxProperties;\n    }\n\n    public Schema maxProperties(Integer maxProperties) {\n        this.maxProperties = maxProperties;\n        return this;\n    }\n\n    /**\n     * returns the minProperties property from a Schema instance.\n     * <p>\n     * minimum: 0\n     *\n     * @return Integer minProperties\n     **/\n\n    public Integer getMinProperties() {\n        return minProperties;\n    }\n\n    public void setMinProperties(Integer minProperties) {\n        this.minProperties = minProperties;\n    }\n\n    public Schema minProperties(Integer minProperties) {\n        this.minProperties = minProperties;\n        return this;\n    }\n\n    /**\n     * returns the required property from a Schema instance.\n     *\n     * @return List&lt;String&gt; required\n     **/\n\n    public List<String> getRequired() {\n        return required;\n    }\n\n    public void setRequired(List<String> required) {\n        List<String> list = new ArrayList<>();\n        if (required != null) {\n            for (String req : required) {\n                if (this.properties == null || this.properties.containsKey(req)) {\n                    list.add(req);\n                }\n            }\n        }\n        Collections.sort(list);\n        if (list.isEmpty()) {\n            list = null;\n        }\n        this.required = list;\n    }\n\n    public Schema required(List<String> required) {\n        this.required = required;\n        return this;\n    }\n\n    public Schema addRequiredItem(String requiredItem) {\n        if (this.required == null) {\n            this.required = new ArrayList<>();\n        }\n        this.required.add(requiredItem);\n        Collections.sort(required);\n        return this;\n    }\n\n    /**\n     * returns the type property from a Schema instance.\n     *\n     * @return String type\n     **/\n\n    public String getType() {\n        boolean bindTypes = Boolean.valueOf(System.getProperty(BIND_TYPE_AND_TYPES, \"false\"));\n        if (bindTypes && type == null && types != null && types.size() == 1) {\n            return types.iterator().next();\n        }\n        return type;\n    }\n\n    public void setType(String type) {\n        this.type = type;\n    }\n\n    public Schema type(String type) {\n        this.type = type;\n        return this;\n    }\n\n    /**\n     * returns the not property from a Schema instance.\n     *\n     * @return Schema not\n     **/\n\n    public Schema getNot() {\n        return not;\n    }\n\n    public void setNot(Schema not) {\n        this.not = not;\n    }\n\n    public Schema not(Schema not) {\n        this.not = not;\n        return this;\n    }\n\n    /**\n     * returns the properties property from a Schema instance.\n     *\n     * @return Map&lt;String, Schema&gt; properties\n     **/\n\n    public Map<String, Schema> getProperties() {\n        return properties;\n    }\n\n    public void setProperties(Map<String, Schema> properties) {\n        this.properties = properties;\n    }\n\n    public Schema properties(Map<String, Schema> properties) {\n        this.properties = properties;\n        return this;\n    }\n\n    @Deprecated\n    public Schema addProperties(String key, Schema property) {\n        return addProperty(key, property);\n    }\n\n    /**\n     *\n     * @since 2.2.0\n     */\n    public Schema addProperty(String key, Schema property) {\n        if (this.properties == null) {\n            this.properties = new LinkedHashMap<>();\n        }\n        this.properties.put(key, property);\n        return this;\n    }\n\n    /**\n     * returns the additionalProperties property from a Schema instance. Can be either a Boolean or a Schema\n     *\n     * @return Object additionalProperties\n     **/\n\n    public Object getAdditionalProperties() {\n        return additionalProperties;\n    }\n\n    public void setAdditionalProperties(Object additionalProperties) {\n        if (additionalProperties != null && !(additionalProperties instanceof Boolean) && !(additionalProperties instanceof Schema)) {\n            throw new IllegalArgumentException(\"additionalProperties must be either a Boolean or a Schema instance\");\n        }\n        this.additionalProperties = additionalProperties;\n    }\n\n    public Schema additionalProperties(Object additionalProperties) {\n        setAdditionalProperties(additionalProperties);\n        return this;\n    }\n\n    /**\n     * returns the description property from a Schema instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public Schema description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    /**\n     * returns the format property from a Schema instance.\n     *\n     * @return String format\n     **/\n\n    public String getFormat() {\n        return format;\n    }\n\n    public void setFormat(String format) {\n        this.format = format;\n    }\n\n    public Schema format(String format) {\n        this.format = format;\n        return this;\n    }\n\n    /**\n     * returns the $ref property from a Schema instance.\n     *\n     * @return String $ref\n     **/\n    public String get$ref() {\n        return $ref;\n    }\n\n    public void set$ref(String $ref) {\n        if ($ref != null && !$ref.startsWith(\"#\") && ($ref.indexOf('.') == -1 && $ref.indexOf('/') == -1)) {\n            $ref = Components.COMPONENTS_SCHEMAS_REF + $ref;\n        }\n        this.$ref = $ref;\n    }\n\n    public Schema $ref(String $ref) {\n\n        set$ref($ref);\n        return this;\n    }\n\n    public Schema raw$ref(String $ref) {\n        this.$ref = $ref;\n        return this;\n    }\n\n    /**\n     * returns the nullable property from a Schema instance.\n     *\n     * @return Boolean nullable\n     **/\n    @OpenAPI30\n    public Boolean getNullable() {\n        return nullable;\n    }\n\n    @OpenAPI30\n    public void setNullable(Boolean nullable) {\n        this.nullable = nullable;\n    }\n\n    @OpenAPI30\n    public Schema nullable(Boolean nullable) {\n        this.nullable = nullable;\n        return this;\n    }\n\n    /**\n     * returns the readOnly property from a Schema instance.\n     *\n     * @return Boolean readOnly\n     **/\n\n    public Boolean getReadOnly() {\n        return readOnly;\n    }\n\n    public void setReadOnly(Boolean readOnly) {\n        this.readOnly = readOnly;\n    }\n\n    public Schema readOnly(Boolean readOnly) {\n        this.readOnly = readOnly;\n        return this;\n    }\n\n    /**\n     * returns the writeOnly property from a Schema instance.\n     *\n     * @return Boolean writeOnly\n     **/\n\n    public Boolean getWriteOnly() {\n        return writeOnly;\n    }\n\n    public void setWriteOnly(Boolean writeOnly) {\n        this.writeOnly = writeOnly;\n    }\n\n    public Schema writeOnly(Boolean writeOnly) {\n        this.writeOnly = writeOnly;\n        return this;\n    }\n\n    /**\n     * returns the example property from a Schema instance.\n     *\n     * @return String example\n     **/\n\n    public Object getExample() {\n        return example;\n    }\n\n    public void setExample(Object example) {\n        this.example = cast(example);\n        if (!(example != null && this.example == null)) {\n            exampleSetFlag = true;\n        }\n    }\n\n    public Schema example(Object example) {\n        setExample(example);\n        return this;\n    }\n\n    /**\n     * returns the externalDocs property from a Schema instance.\n     *\n     * @return ExternalDocumentation externalDocs\n     **/\n\n    public ExternalDocumentation getExternalDocs() {\n        return externalDocs;\n    }\n\n    public void setExternalDocs(ExternalDocumentation externalDocs) {\n        this.externalDocs = externalDocs;\n    }\n\n    public Schema externalDocs(ExternalDocumentation externalDocs) {\n        this.externalDocs = externalDocs;\n        return this;\n    }\n\n    /**\n     * returns the deprecated property from a Schema instance.\n     *\n     * @return Boolean deprecated\n     **/\n\n    public Boolean getDeprecated() {\n        return deprecated;\n    }\n\n    public void setDeprecated(Boolean deprecated) {\n        this.deprecated = deprecated;\n    }\n\n    public Schema deprecated(Boolean deprecated) {\n        this.deprecated = deprecated;\n        return this;\n    }\n\n    /**\n     * returns the xml property from a Schema instance.\n     *\n     * @return XML xml\n     **/\n\n    public XML getXml() {\n        return xml;\n    }\n\n    public void setXml(XML xml) {\n        this.xml = xml;\n    }\n\n    public Schema xml(XML xml) {\n        this.xml = xml;\n        return this;\n    }\n\n    /**\n     * returns true if example setter has been invoked\n     * Used to flag explicit setting to null of example (vs missing field) while deserializing from json/yaml string\n     *\n     * @return boolean exampleSetFlag\n     **/\n\n    public boolean getExampleSetFlag() {\n        return exampleSetFlag;\n    }\n\n    public void setExampleSetFlag(boolean exampleSetFlag) {\n        this.exampleSetFlag = exampleSetFlag;\n    }\n\n    /**\n     * returns true if default setter has been invoked\n     * Used to flag explicit setting to null of default (vs missing field) while deserializing from json/yaml string\n     *\n     * @return boolean defaultSetFlag\n     **/\n\n    public boolean getDefaultSetFlag() {\n        return defaultSetFlag;\n    }\n\n    public void setDefaultSetFlag(boolean defaultSetFlag) {\n        this.defaultSetFlag = defaultSetFlag;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public List<Schema> getPrefixItems() {\n        return prefixItems;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setPrefixItems(List<Schema> prefixItems) {\n        this.prefixItems = prefixItems;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema prefixItems(List<Schema> prefixItems) {\n        this.prefixItems = prefixItems;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.12 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema addPrefixItem(Schema prefixItem) {\n        if (this.prefixItems == null) {\n            this.prefixItems = new ArrayList<>();\n        }\n        this.prefixItems.add(prefixItem);\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public String getContentEncoding() {\n        return contentEncoding;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setContentEncoding(String contentEncoding) {\n        this.contentEncoding = contentEncoding;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema contentEncoding(String contentEncoding) {\n        this.contentEncoding = contentEncoding;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public String getContentMediaType() {\n        return contentMediaType;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setContentMediaType(String contentMediaType) {\n        this.contentMediaType = contentMediaType;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema contentMediaType(String contentMediaType) {\n        this.contentMediaType = contentMediaType;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema getContentSchema() {\n        return contentSchema;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setContentSchema(Schema contentSchema) {\n        this.contentSchema = contentSchema;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema contentSchema(Schema contentSchema) {\n        this.contentSchema = contentSchema;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema getPropertyNames() {\n        return propertyNames;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setPropertyNames(Schema propertyNames) {\n        this.propertyNames = propertyNames;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema propertyNames(Schema propertyNames) {\n        this.propertyNames = propertyNames;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema getUnevaluatedProperties() {\n        return unevaluatedProperties;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setUnevaluatedProperties(Schema unevaluatedProperties) {\n        this.unevaluatedProperties = unevaluatedProperties;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema unevaluatedProperties(Schema unevaluatedProperties) {\n        this.unevaluatedProperties = unevaluatedProperties;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Integer getMaxContains() {\n        return maxContains;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setMaxContains(Integer maxContains) {\n        this.maxContains = maxContains;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema maxContains(Integer maxContains) {\n        this.maxContains = maxContains;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Integer getMinContains() {\n        return minContains;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setMinContains(Integer minContains) {\n        this.minContains = minContains;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema minContains(Integer minContains) {\n        this.minContains = minContains;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema getAdditionalItems() {\n        return additionalItems;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setAdditionalItems(Schema additionalItems) {\n        this.additionalItems = additionalItems;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema additionalItems(Schema additionalItems) {\n        this.additionalItems = additionalItems;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema getUnevaluatedItems() {\n        return unevaluatedItems;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setUnevaluatedItems(Schema unevaluatedItems) {\n        this.unevaluatedItems = unevaluatedItems;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema unevaluatedItems(Schema unevaluatedItems) {\n        this.unevaluatedItems = unevaluatedItems;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema getIf() {\n        return _if;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setIf(Schema _if) {\n        this._if = _if;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema _if(Schema _if) {\n        this._if = _if;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema getElse() {\n        return _else;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setElse(Schema _else) {\n        this._else = _else;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema _else(Schema _else) {\n        this._else = _else;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema getThen() {\n        return then;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setThen(Schema then) {\n        this.then = then;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema then(Schema then) {\n        this.then = then;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Map<String, Schema> getDependentSchemas() {\n        return dependentSchemas;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setDependentSchemas(Map<String, Schema> dependentSchemas) {\n        this.dependentSchemas = dependentSchemas;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema dependentSchemas(Map<String, Schema> dependentSchemas) {\n        this.dependentSchemas = dependentSchemas;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Map<String, List<String>> getDependentRequired() {\n        return dependentRequired;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setDependentRequired(Map<String, List<String>> dependentRequired) {\n        this.dependentRequired = dependentRequired;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema dependentRequired(Map<String, List<String>> dependentRequired) {\n        this.dependentRequired = dependentRequired;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public String get$comment() {\n        return $comment;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void set$comment(String $comment) {\n        this.$comment = $comment;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema $comment(String $comment) {\n        this.$comment = $comment;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public List<T> getExamples() {\n        return examples;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setExamples(List<T> examples) {\n        this.examples = examples;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema<T> examples(List<T> examples) {\n        this.examples = examples;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void addExample(T example) {\n        if (this.examples == null) {\n            this.examples = new ArrayList<>();\n        }\n        this.examples.add(example);\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        Schema schema = (Schema) o;\n        return Objects.equals(this.title, schema.title) &&\n                Objects.equals(this.multipleOf, schema.multipleOf) &&\n                Objects.equals(this.maximum, schema.maximum) &&\n                Objects.equals(this.exclusiveMaximum, schema.exclusiveMaximum) &&\n                Objects.equals(this.exclusiveMaximumValue, schema.exclusiveMaximumValue) &&\n                Objects.equals(this.minimum, schema.minimum) &&\n                Objects.equals(this.exclusiveMinimum, schema.exclusiveMinimum) &&\n                Objects.equals(this.exclusiveMinimumValue, schema.exclusiveMinimumValue) &&\n                Objects.equals(this.maxLength, schema.maxLength) &&\n                Objects.equals(this.minLength, schema.minLength) &&\n                Objects.equals(this.pattern, schema.pattern) &&\n                Objects.equals(this.maxItems, schema.maxItems) &&\n                Objects.equals(this.minItems, schema.minItems) &&\n                Objects.equals(this.uniqueItems, schema.uniqueItems) &&\n                Objects.equals(this.maxProperties, schema.maxProperties) &&\n                Objects.equals(this.minProperties, schema.minProperties) &&\n                Objects.equals(this.required, schema.required) &&\n                Objects.equals(this.type, schema.type) &&\n                Objects.equals(this.not, schema.not) &&\n                Objects.equals(this.properties, schema.properties) &&\n                Objects.equals(this.additionalProperties, schema.additionalProperties) &&\n                Objects.equals(this.description, schema.description) &&\n                Objects.equals(this.format, schema.format) &&\n                Objects.equals(this.$ref, schema.$ref) &&\n                Objects.equals(this.nullable, schema.nullable) &&\n                Objects.equals(this.readOnly, schema.readOnly) &&\n                Objects.equals(this.writeOnly, schema.writeOnly) &&\n                Objects.equals(this.example, schema.example) &&\n                Objects.equals(this.externalDocs, schema.externalDocs) &&\n                Objects.equals(this.deprecated, schema.deprecated) &&\n                Objects.equals(this.xml, schema.xml) &&\n                Objects.equals(this.extensions, schema.extensions) &&\n                Objects.equals(this.discriminator, schema.discriminator) &&\n                Objects.equals(this._enum, schema._enum) &&\n                Objects.equals(this.contains, schema.contains) &&\n                Objects.equals(this.patternProperties, schema.patternProperties) &&\n                Objects.equals(this.$id, schema.$id) &&\n                Objects.equals(this.$anchor, schema.$anchor) &&\n                Objects.equals(this.$schema, schema.$schema) &&\n                Objects.equals(this.$vocabulary, schema.$vocabulary) &&\n                Objects.equals(this.$dynamicAnchor, schema.$dynamicAnchor) &&\n                Objects.equals(this.$dynamicRef, schema.$dynamicRef) &&\n                Objects.equals(this.types, schema.types) &&\n                Objects.equals(this.allOf, schema.allOf) &&\n                Objects.equals(this.anyOf, schema.anyOf) &&\n                Objects.equals(this.oneOf, schema.oneOf) &&\n                Objects.equals(this._const, schema._const) &&\n                Objects.equals(this._default, schema._default) &&\n                Objects.equals(this.contentEncoding, schema.contentEncoding) &&\n                Objects.equals(this.contentMediaType, schema.contentMediaType) &&\n                Objects.equals(this.contentSchema, schema.contentSchema) &&\n                Objects.equals(this.propertyNames, schema.propertyNames) &&\n                Objects.equals(this.unevaluatedProperties, schema.unevaluatedProperties) &&\n                Objects.equals(this.maxContains, schema.maxContains) &&\n                Objects.equals(this.minContains, schema.minContains) &&\n                Objects.equals(this.additionalItems, schema.additionalItems) &&\n                Objects.equals(this.unevaluatedItems, schema.unevaluatedItems) &&\n                Objects.equals(this._if, schema._if) &&\n                Objects.equals(this._else, schema._else) &&\n                Objects.equals(this.then, schema.then) &&\n                Objects.equals(this.dependentRequired, schema.dependentRequired) &&\n                Objects.equals(this.dependentSchemas, schema.dependentSchemas) &&\n                Objects.equals(this.$comment, schema.$comment) &&\n                Objects.equals(this.examples, schema.examples) &&\n                Objects.equals(this.prefixItems, schema.prefixItems) &&\n                Objects.equals(this.items, schema.items) &&\n                Objects.equals(this.booleanSchemaValue, schema.booleanSchemaValue)\n                ;\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(title, multipleOf, maximum, exclusiveMaximum, exclusiveMaximumValue, minimum,\n                exclusiveMinimum, exclusiveMinimumValue, maxLength, minLength, pattern, maxItems, minItems, uniqueItems,\n                maxProperties, minProperties, required, type, not, properties, additionalProperties, description,\n                format, $ref, nullable, readOnly, writeOnly, example, externalDocs, deprecated, xml, extensions,\n                discriminator, _enum, _default, patternProperties, $id, $anchor, $schema, $vocabulary, $dynamicAnchor,\n                $dynamicRef, types, allOf, anyOf, oneOf, _const, contentEncoding, contentMediaType, contentSchema,\n                propertyNames, unevaluatedProperties, maxContains, minContains, additionalItems, unevaluatedItems,\n                _if, _else, then, dependentRequired, dependentSchemas, $comment, examples, prefixItems, items, booleanSchemaValue);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || (specVersion == SpecVersion.V30 && !name.startsWith(\"x-\"))) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public Schema extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Schema {\\n\");\n        Object typeStr = specVersion == SpecVersion.V30 ? type : types;\n        sb.append(\"    type: \").append(toIndentedString(typeStr)).append(\"\\n\");\n        sb.append(\"    format: \").append(toIndentedString(format)).append(\"\\n\");\n        sb.append(\"    $ref: \").append(toIndentedString($ref)).append(\"\\n\");\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"    title: \").append(toIndentedString(title)).append(\"\\n\");\n        sb.append(\"    multipleOf: \").append(toIndentedString(multipleOf)).append(\"\\n\");\n        sb.append(\"    maximum: \").append(toIndentedString(maximum)).append(\"\\n\");\n        Object exclusiveMaximumStr = specVersion == SpecVersion.V30 ? exclusiveMaximum : exclusiveMaximumValue;\n        sb.append(\"    exclusiveMaximum: \").append(toIndentedString(exclusiveMaximumStr)).append(\"\\n\");\n        sb.append(\"    minimum: \").append(toIndentedString(minimum)).append(\"\\n\");\n        Object exclusiveMinimumStr = specVersion == SpecVersion.V30 ? exclusiveMinimum : exclusiveMinimumValue;\n        sb.append(\"    exclusiveMinimum: \").append(toIndentedString(exclusiveMinimumStr)).append(\"\\n\");\n        sb.append(\"    maxLength: \").append(toIndentedString(maxLength)).append(\"\\n\");\n        sb.append(\"    minLength: \").append(toIndentedString(minLength)).append(\"\\n\");\n        sb.append(\"    pattern: \").append(toIndentedString(pattern)).append(\"\\n\");\n        sb.append(\"    maxItems: \").append(toIndentedString(maxItems)).append(\"\\n\");\n        sb.append(\"    minItems: \").append(toIndentedString(minItems)).append(\"\\n\");\n        sb.append(\"    uniqueItems: \").append(toIndentedString(uniqueItems)).append(\"\\n\");\n        sb.append(\"    maxProperties: \").append(toIndentedString(maxProperties)).append(\"\\n\");\n        sb.append(\"    minProperties: \").append(toIndentedString(minProperties)).append(\"\\n\");\n        sb.append(\"    required: \").append(toIndentedString(required)).append(\"\\n\");\n        sb.append(\"    not: \").append(toIndentedString(not)).append(\"\\n\");\n        sb.append(\"    properties: \").append(toIndentedString(properties)).append(\"\\n\");\n        sb.append(\"    additionalProperties: \").append(toIndentedString(additionalProperties)).append(\"\\n\");\n        sb.append(\"    nullable: \").append(toIndentedString(nullable)).append(\"\\n\");\n        sb.append(\"    readOnly: \").append(toIndentedString(readOnly)).append(\"\\n\");\n        sb.append(\"    writeOnly: \").append(toIndentedString(writeOnly)).append(\"\\n\");\n        sb.append(\"    example: \").append(toIndentedString(example)).append(\"\\n\");\n        sb.append(\"    externalDocs: \").append(toIndentedString(externalDocs)).append(\"\\n\");\n        sb.append(\"    deprecated: \").append(toIndentedString(deprecated)).append(\"\\n\");\n        sb.append(\"    discriminator: \").append(toIndentedString(discriminator)).append(\"\\n\");\n        sb.append(\"    xml: \").append(toIndentedString(xml)).append(\"\\n\");\n        if (specVersion == SpecVersion.V31) {\n            sb.append(\"    patternProperties: \").append(toIndentedString(patternProperties)).append(\"\\n\");\n            sb.append(\"    contains: \").append(toIndentedString(contains)).append(\"\\n\");\n            sb.append(\"    $id: \").append(toIndentedString($id)).append(\"\\n\");\n            sb.append(\"    $anchor: \").append(toIndentedString($anchor)).append(\"\\n\");\n            sb.append(\"    $schema: \").append(toIndentedString($schema)).append(\"\\n\");\n            sb.append(\"    $vocabulary: \").append(toIndentedString($vocabulary)).append(\"\\n\");\n            sb.append(\"    $dynamicAnchor: \").append(toIndentedString($dynamicAnchor)).append(\"\\n\");\n            sb.append(\"    $dynamicRef: \").append(toIndentedString($dynamicRef)).append(\"\\n\");\n            sb.append(\"    const: \").append(toIndentedString(_const)).append(\"\\n\");\n            sb.append(\"    contentEncoding: \").append(toIndentedString(contentEncoding)).append(\"\\n\");\n            sb.append(\"    contentMediaType: \").append(toIndentedString(contentMediaType)).append(\"\\n\");\n            sb.append(\"    contentSchema: \").append(toIndentedString(contentSchema)).append(\"\\n\");\n            sb.append(\"    propertyNames: \").append(toIndentedString(propertyNames)).append(\"\\n\");\n            sb.append(\"    unevaluatedProperties: \").append(toIndentedString(unevaluatedProperties)).append(\"\\n\");\n            sb.append(\"    maxContains: \").append(toIndentedString(maxContains)).append(\"\\n\");\n            sb.append(\"    minContains: \").append(toIndentedString(minContains)).append(\"\\n\");\n            sb.append(\"    additionalItems: \").append(toIndentedString(additionalItems)).append(\"\\n\");\n            sb.append(\"    unevaluatedItems: \").append(toIndentedString(unevaluatedItems)).append(\"\\n\");\n            sb.append(\"    _if: \").append(toIndentedString(_if)).append(\"\\n\");\n            sb.append(\"    _else: \").append(toIndentedString(_else)).append(\"\\n\");\n            sb.append(\"    then: \").append(toIndentedString(then)).append(\"\\n\");\n            sb.append(\"    dependentRequired: \").append(toIndentedString(dependentRequired)).append(\"\\n\");\n            sb.append(\"    dependentSchemas: \").append(toIndentedString(dependentSchemas)).append(\"\\n\");\n            sb.append(\"    $comment: \").append(toIndentedString($comment)).append(\"\\n\");\n            sb.append(\"    prefixItems: \").append(toIndentedString(prefixItems)).append(\"\\n\");\n            sb.append(\"    booleanSchemaValue: \").append(toIndentedString(booleanSchemaValue)).append(\"\\n\");\n        }\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    protected String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n    public Schema _default(T _default) {\n        this._default = _default;\n        return this;\n    }\n\n    public Schema _enum(List<T> _enum) {\n        this._enum = _enum;\n        return this;\n    }\n\n    public Schema exampleSetFlag(boolean exampleSetFlag) {\n        this.exampleSetFlag = exampleSetFlag;\n        return this;\n    }\n\n    public Schema defaultSetFlag(boolean defaultSetFlag) {\n        this.defaultSetFlag = defaultSetFlag;\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public T getConst() {\n        return _const;\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setConst(Object _const) {\n        this._const = cast(_const);\n    }\n\n    /**\n     *\n     * @since 2.2.0 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema _const(Object _const) {\n        this._const = cast(_const);\n        return this;\n    }\n\n    /**\n     *\n     * @since 2.2.2 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Boolean getBooleanSchemaValue() {\n        return booleanSchemaValue;\n    }\n\n    /**\n     *\n     * @since 2.2.2 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public void setBooleanSchemaValue(Boolean booleanSchemaValue) {\n        this.booleanSchemaValue = booleanSchemaValue;\n    }\n\n    /**\n     *\n     * @since 2.2.2 (OpenAPI 3.1.0)\n     */\n    @OpenAPI31\n    public Schema booleanSchemaValue(Boolean booleanSchemaValue) {\n        this.booleanSchemaValue = booleanSchemaValue;\n        return this;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/StringSchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.util.List;\nimport java.util.Objects;\n\n/**\n * StringSchema\n */\n\npublic class StringSchema extends Schema<String> {\n\n    public StringSchema() {\n        super(\"string\", null);\n    }\n\n    @Override\n    public StringSchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    public StringSchema _default(String _default) {\n        super.setDefault(_default);\n        return this;\n    }\n\n    public StringSchema _enum(List<String> _enum) {\n        super.setEnum(_enum);\n        return this;\n    }\n\n    public StringSchema addEnumItem(String _enumItem) {\n        super.addEnumItemObject(_enumItem);\n        return this;\n    }\n\n    @Override\n    protected String cast(Object value) {\n        if (value != null) {\n            try {\n                return value.toString();\n            } catch (Exception e) {\n            }\n        }\n        return null;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class StringSchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/UUIDSchema.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport java.util.List;\nimport java.util.Objects;\nimport java.util.UUID;\n\n/**\n * UUIDSchema\n */\n\npublic class UUIDSchema extends Schema<UUID> {\n\n    public UUIDSchema() {\n        super(\"string\", \"uuid\");\n    }\n\n    @Override\n    public UUIDSchema type(String type) {\n        super.setType(type);\n        return this;\n    }\n\n    @Override\n    public UUIDSchema format(String format) {\n        super.setFormat(format);\n        return this;\n    }\n\n    public UUIDSchema _default(UUID _default) {\n        super.setDefault(_default);\n        return this;\n    }\n\n    public UUIDSchema _default(String _default) {\n        if (_default != null) {\n            super.setDefault(UUID.fromString(_default));\n        }\n        return this;\n    }\n\n    public UUIDSchema _enum(List<UUID> _enum) {\n        super.setEnum(_enum);\n        return this;\n    }\n\n    public UUIDSchema addEnumItem(UUID _enumItem) {\n        super.addEnumItemObject(_enumItem);\n        return this;\n    }\n\n    @Override\n    protected UUID cast(Object value) {\n        if (value != null) {\n            try {\n                return UUID.fromString(value.toString());\n            } catch (Exception e) {\n            }\n        }\n        return null;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class UUIDSchema {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/XML.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\nimport java.util.Objects;\n\n/**\n * XML\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#xml-object\"\n */\n\npublic class XML {\n    private String name = null;\n    private String namespace = null;\n    private String prefix = null;\n    private Boolean attribute = null;\n    private Boolean wrapped = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the name property from a XML instance.\n     *\n     * @return String name\n     **/\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public XML name(String name) {\n        this.name = name;\n        return this;\n    }\n\n    /**\n     * returns the namespace property from a XML instance.\n     *\n     * @return String namespace\n     **/\n\n    public String getNamespace() {\n        return namespace;\n    }\n\n    public void setNamespace(String namespace) {\n        this.namespace = namespace;\n    }\n\n    public XML namespace(String namespace) {\n        this.namespace = namespace;\n        return this;\n    }\n\n    /**\n     * returns the prefix property from a XML instance.\n     *\n     * @return String prefix\n     **/\n\n    public String getPrefix() {\n        return prefix;\n    }\n\n    public void setPrefix(String prefix) {\n        this.prefix = prefix;\n    }\n\n    public XML prefix(String prefix) {\n        this.prefix = prefix;\n        return this;\n    }\n\n    /**\n     * returns the attribute property from a XML instance.\n     *\n     * @return Boolean attribute\n     **/\n\n    public Boolean getAttribute() {\n        return attribute;\n    }\n\n    public void setAttribute(Boolean attribute) {\n        this.attribute = attribute;\n    }\n\n    public XML attribute(Boolean attribute) {\n        this.attribute = attribute;\n        return this;\n    }\n\n    /**\n     * returns the wrapped property from a XML instance.\n     *\n     * @return Boolean wrapped\n     **/\n\n    public Boolean getWrapped() {\n        return wrapped;\n    }\n\n    public void setWrapped(Boolean wrapped) {\n        this.wrapped = wrapped;\n    }\n\n    public XML wrapped(Boolean wrapped) {\n        this.wrapped = wrapped;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        XML XML = (XML) o;\n        return Objects.equals(this.name, XML.name) &&\n                Objects.equals(this.namespace, XML.namespace) &&\n                Objects.equals(this.prefix, XML.prefix) &&\n                Objects.equals(this.attribute, XML.attribute) &&\n                Objects.equals(this.wrapped, XML.wrapped) &&\n                Objects.equals(this.extensions, XML.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(name, namespace, prefix, attribute, wrapped, extensions);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public XML extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class XML {\\n\");\n\n        sb.append(\"    name: \").append(toIndentedString(name)).append(\"\\n\");\n        sb.append(\"    namespace: \").append(toIndentedString(namespace)).append(\"\\n\");\n        sb.append(\"    prefix: \").append(toIndentedString(prefix)).append(\"\\n\");\n        sb.append(\"    attribute: \").append(toIndentedString(attribute)).append(\"\\n\");\n        sb.append(\"    wrapped: \").append(toIndentedString(wrapped)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/parameters/CookieParameter.java",
    "content": "package io.swagger.v3.oas.models.parameters;\n\nimport java.util.Objects;\n\n/**\n * CookieParameter\n */\n\npublic class CookieParameter extends Parameter {\n    private String in = \"cookie\";\n\n    /**\n     * returns the in property from a CookieParameter instance.\n     *\n     * @return String in\n     **/\n    @Override\n    public String getIn() {\n        return in;\n    }\n\n    @Override\n    public void setIn(String in) {\n        this.in = in;\n    }\n\n    @Override\n    public CookieParameter in(String in) {\n        this.in = in;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        CookieParameter cookieParameter = (CookieParameter) o;\n        return Objects.equals(this.in, cookieParameter.in) &&\n                super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(in, super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class CookieParameter {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"    in: \").append(toIndentedString(in)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/parameters/HeaderParameter.java",
    "content": "package io.swagger.v3.oas.models.parameters;\n\nimport java.util.Objects;\n\n/**\n * HeaderParameter\n */\n\npublic class HeaderParameter extends Parameter {\n    private String in = \"header\";\n\n    /**\n     * returns the in property from a HeaderParameter instance.\n     *\n     * @return String in\n     **/\n    @Override\n    public String getIn() {\n        return in;\n    }\n\n    @Override\n    public void setIn(String in) {\n        this.in = in;\n    }\n\n    @Override\n    public HeaderParameter in(String in) {\n        this.in = in;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        HeaderParameter headerParameter = (HeaderParameter) o;\n        return Objects.equals(this.in, headerParameter.in) &&\n                super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(in, super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class HeaderParameter {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"    in: \").append(toIndentedString(in)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/parameters/Parameter.java",
    "content": "package io.swagger.v3.oas.models.parameters;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\nimport io.swagger.v3.oas.models.examples.Example;\nimport io.swagger.v3.oas.models.media.Content;\nimport io.swagger.v3.oas.models.media.Schema;\n\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport java.util.Objects;\n\n/**\n * Parameter\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#parameter-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#parameter-object\"\n */\n\npublic class Parameter {\n    private String name = null;\n    private String in = null;\n    private String description = null;\n    private Boolean required = null;\n    private Boolean deprecated = null;\n    private Boolean allowEmptyValue = null;\n    private String $ref = null;\n\n    /**\n     * Gets or Sets style\n     */\n    public enum StyleEnum {\n        MATRIX(\"matrix\"),\n        LABEL(\"label\"),\n        FORM(\"form\"),\n        SIMPLE(\"simple\"),\n        SPACEDELIMITED(\"spaceDelimited\"),\n        PIPEDELIMITED(\"pipeDelimited\"),\n        DEEPOBJECT(\"deepObject\");\n\n        private String value;\n\n        StyleEnum(String value) {\n            this.value = value;\n        }\n\n        @Override\n        public String toString() {\n            return String.valueOf(value);\n        }\n    }\n\n    private StyleEnum style = null;\n    private Boolean explode = null;\n    private Boolean allowReserved = null;\n    private Schema schema = null;\n    private Map<String, Example> examples = null;\n    private Object example = null;\n    private Content content = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the name property from a Parameter instance.\n     *\n     * @return String name\n     **/\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public Parameter name(String name) {\n        this.name = name;\n        return this;\n    }\n\n    /**\n     * returns the in property from a Parameter instance.\n     *\n     * @return String in\n     **/\n\n    public String getIn() {\n        return in;\n    }\n\n    public void setIn(String in) {\n        if (\"path\".equals(in)) {\n            this.required = true;\n        }\n        this.in = in;\n    }\n\n    public Parameter in(String in) {\n        setIn(in);\n        return this;\n    }\n\n    /**\n     * returns the description property from a Parameter instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public Parameter description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    /**\n     * returns the required property from a Parameter instance.\n     *\n     * @return Boolean required\n     **/\n\n    public Boolean getRequired() {\n        return required;\n    }\n\n    public void setRequired(Boolean required) {\n        this.required = required;\n    }\n\n    public Parameter required(Boolean required) {\n        this.required = required;\n        return this;\n    }\n\n    /**\n     * returns the deprecated property from a Parameter instance.\n     *\n     * @return Boolean deprecated\n     **/\n\n    public Boolean getDeprecated() {\n        return deprecated;\n    }\n\n    public void setDeprecated(Boolean deprecated) {\n        this.deprecated = deprecated;\n    }\n\n    public Parameter deprecated(Boolean deprecated) {\n        this.deprecated = deprecated;\n        return this;\n    }\n\n    /**\n     * returns the allowEmptyValue property from a Parameter instance.\n     *\n     * @return Boolean allowEmptyValue\n     **/\n\n    public Boolean getAllowEmptyValue() {\n        return allowEmptyValue;\n    }\n\n    public void setAllowEmptyValue(Boolean allowEmptyValue) {\n        this.allowEmptyValue = allowEmptyValue;\n    }\n\n    public Parameter allowEmptyValue(Boolean allowEmptyValue) {\n        this.allowEmptyValue = allowEmptyValue;\n        return this;\n    }\n\n    /**\n     * returns the style property from a Parameter instance.\n     *\n     * @return StyleEnum style\n     **/\n\n    public StyleEnum getStyle() {\n        return style;\n    }\n\n    public void setStyle(StyleEnum style) {\n        this.style = style;\n    }\n\n    public Parameter style(StyleEnum style) {\n        this.style = style;\n        return this;\n    }\n\n    /**\n     * returns the explode property from a Parameter instance.\n     *\n     * @return Boolean explode\n     **/\n\n    public Boolean getExplode() {\n        return explode;\n    }\n\n    public void setExplode(Boolean explode) {\n        this.explode = explode;\n    }\n\n    public Parameter explode(Boolean explode) {\n        this.explode = explode;\n        return this;\n    }\n\n    /**\n     * returns the allowReserved property from a Parameter instance.\n     *\n     * @return Boolean allowReserved\n     **/\n\n    public Boolean getAllowReserved() {\n        return allowReserved;\n    }\n\n    public void setAllowReserved(Boolean allowReserved) {\n        this.allowReserved = allowReserved;\n    }\n\n    public Parameter allowReserved(Boolean allowReserved) {\n        this.allowReserved = allowReserved;\n        return this;\n    }\n\n    /**\n     * returns the schema property from a Parameter instance.\n     *\n     * @return Schema schema\n     **/\n\n    public Schema getSchema() {\n        return schema;\n    }\n\n    public void setSchema(Schema schema) {\n        this.schema = schema;\n    }\n\n    public Parameter schema(Schema schema) {\n        this.schema = schema;\n        return this;\n    }\n\n    /**\n     * returns the examples property from a Parameter instance.\n     *\n     * @return Map&lt;String, Example&gt; examples\n     **/\n\n    public Map<String, Example> getExamples() {\n        return examples;\n    }\n\n    public void setExamples(Map<String, Example> examples) {\n        this.examples = examples;\n    }\n\n    public Parameter examples(Map<String, Example> examples) {\n        this.examples = examples;\n        return this;\n    }\n\n    public Parameter addExample(String key, Example examplesItem) {\n        if (this.examples == null) {\n            this.examples = new LinkedHashMap<>();\n        }\n        this.examples.put(key, examplesItem);\n        return this;\n    }\n\n    /**\n     * returns the example property from a Parameter instance.\n     *\n     * @return String example\n     **/\n\n    public Object getExample() {\n        return example;\n    }\n\n    public void setExample(Object example) {\n        this.example = example;\n    }\n\n    public Parameter example(Object example) {\n        this.example = example;\n        return this;\n    }\n\n    /**\n     * returns the content property from a Parameter instance.\n     *\n     * @return Content content\n     **/\n\n    public Content getContent() {\n        return content;\n    }\n\n    public void setContent(Content content) {\n        this.content = content;\n    }\n\n    public Parameter content(Content content) {\n        this.content = content;\n        return this;\n    }\n\n    public String get$ref() {\n        return $ref;\n    }\n\n    public void set$ref(String $ref) {\n        if ($ref != null &&\n                !$ref.startsWith(\"#/components/parameters/\")\n                && $ref.indexOf('.') == -1\n                && $ref.indexOf('/') == -1) {\n            $ref = \"#/components/parameters/\" + $ref;\n        }\n        this.$ref = $ref;\n    }\n\n    public Parameter $ref(String $ref) {\n        set$ref($ref);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        Parameter parameter = (Parameter) o;\n        return Objects.equals(this.name, parameter.name) &&\n                Objects.equals(this.in, parameter.in) &&\n                Objects.equals(this.description, parameter.description) &&\n                Objects.equals(this.required, parameter.required) &&\n                Objects.equals(this.deprecated, parameter.deprecated) &&\n                Objects.equals(this.allowEmptyValue, parameter.allowEmptyValue) &&\n                Objects.equals(this.style, parameter.style) &&\n                Objects.equals(this.explode, parameter.explode) &&\n                Objects.equals(this.allowReserved, parameter.allowReserved) &&\n                Objects.equals(this.schema, parameter.schema) &&\n                Objects.equals(this.examples, parameter.examples) &&\n                Objects.equals(this.example, parameter.example) &&\n                Objects.equals(this.content, parameter.content) &&\n                Objects.equals(this.$ref, parameter.$ref) &&\n                Objects.equals(this.extensions, parameter.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(name, in, description, required, deprecated, allowEmptyValue, style, explode, allowReserved, schema, examples, example, content, $ref, extensions);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public Parameter extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Parameter {\\n\");\n\n        sb.append(\"    name: \").append(toIndentedString(name)).append(\"\\n\");\n        sb.append(\"    in: \").append(toIndentedString(in)).append(\"\\n\");\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"    required: \").append(toIndentedString(required)).append(\"\\n\");\n        sb.append(\"    deprecated: \").append(toIndentedString(deprecated)).append(\"\\n\");\n        sb.append(\"    allowEmptyValue: \").append(toIndentedString(allowEmptyValue)).append(\"\\n\");\n        sb.append(\"    style: \").append(toIndentedString(style)).append(\"\\n\");\n        sb.append(\"    explode: \").append(toIndentedString(explode)).append(\"\\n\");\n        sb.append(\"    allowReserved: \").append(toIndentedString(allowReserved)).append(\"\\n\");\n        sb.append(\"    schema: \").append(toIndentedString(schema)).append(\"\\n\");\n        sb.append(\"    examples: \").append(toIndentedString(examples)).append(\"\\n\");\n        sb.append(\"    example: \").append(toIndentedString(example)).append(\"\\n\");\n        sb.append(\"    content: \").append(toIndentedString(content)).append(\"\\n\");\n        sb.append(\"    $ref: \").append(toIndentedString($ref)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    static String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/parameters/PathParameter.java",
    "content": "package io.swagger.v3.oas.models.parameters;\n\nimport java.util.Objects;\n\n/**\n * PathParameter\n */\n\npublic class PathParameter extends Parameter {\n    private String in = \"path\";\n    private Boolean required = true;\n\n    /**\n     * returns the in property from a PathParameter instance.\n     *\n     * @return String in\n     **/\n    @Override\n    public String getIn() {\n        return in;\n    }\n\n    @Override\n    public void setIn(String in) {\n        this.in = in;\n    }\n\n    @Override\n    public PathParameter in(String in) {\n        this.in = in;\n        return this;\n    }\n\n    /**\n     * returns the required property from a PathParameter instance.\n     *\n     * @return Boolean required\n     **/\n    @Override\n    public Boolean getRequired() {\n        return required;\n    }\n\n    @Override\n    public void setRequired(Boolean required) {\n        this.required = required;\n    }\n\n    @Override\n    public PathParameter required(Boolean required) {\n        this.required = required;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        PathParameter pathParameter = (PathParameter) o;\n        return Objects.equals(this.in, pathParameter.in) &&\n                Objects.equals(this.required, pathParameter.required) &&\n                super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(in, required, super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class PathParameter {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"    in: \").append(toIndentedString(in)).append(\"\\n\");\n        sb.append(\"    required: \").append(toIndentedString(required)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/parameters/QueryParameter.java",
    "content": "package io.swagger.v3.oas.models.parameters;\n\nimport java.util.Objects;\n\n/**\n * QueryParameter\n */\n\npublic class QueryParameter extends Parameter {\n    private String in = \"query\";\n\n    /**\n     * returns the in property from a QueryParameter instance.\n     *\n     * @return String in\n     **/\n    @Override\n    public String getIn() {\n        return in;\n    }\n\n    @Override\n    public void setIn(String in) {\n        this.in = in;\n    }\n\n    @Override\n    public QueryParameter in(String in) {\n        this.in = in;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        QueryParameter queryParameter = (QueryParameter) o;\n        return Objects.equals(this.in, queryParameter.in) &&\n                super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(in, super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class QueryParameter {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"    in: \").append(toIndentedString(in)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/parameters/RequestBody.java",
    "content": "package io.swagger.v3.oas.models.parameters;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\nimport io.swagger.v3.oas.models.media.Content;\n\n/**\n * RequestBody\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#requestBody-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#request-body-object\"\n */\n\npublic class RequestBody {\n    private String description = null;\n    private Content content = null;\n    private Boolean required = null;\n    private java.util.Map<String, Object> extensions = null;\n    private String $ref = null;\n\n    /**\n     * returns the description property from a RequestBody instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public RequestBody description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    /**\n     * returns the content property from a RequestBody instance.\n     *\n     * @return Content content\n     **/\n\n    public Content getContent() {\n        return content;\n    }\n\n    public void setContent(Content content) {\n        this.content = content;\n    }\n\n    public RequestBody content(Content content) {\n        this.content = content;\n        return this;\n    }\n\n    /**\n     * returns the required property from a RequestBody instance.\n     *\n     * @return Boolean required\n     **/\n\n    public Boolean getRequired() {\n        return required;\n    }\n\n    public void setRequired(Boolean required) {\n        this.required = required;\n    }\n\n    public RequestBody required(Boolean required) {\n        this.required = required;\n        return this;\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public RequestBody extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    public String get$ref() {\n        return $ref;\n    }\n\n    public void set$ref(String $ref) {\n        if ($ref != null && ($ref.indexOf('.') == -1 && $ref.indexOf('/') == -1)) {\n            $ref = \"#/components/requestBodies/\" + $ref;\n        }\n        this.$ref = $ref;\n    }\n\n    public RequestBody $ref(String $ref) {\n        set$ref($ref);\n        return this;\n    }\n\n    @Override\n    public boolean equals(Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (!(o instanceof RequestBody)) {\n            return false;\n        }\n\n        RequestBody that = (RequestBody) o;\n\n        if (description != null ? !description.equals(that.description) : that.description != null) {\n            return false;\n        }\n        if (content != null ? !content.equals(that.content) : that.content != null) {\n            return false;\n        }\n        if (required != null ? !required.equals(that.required) : that.required != null) {\n            return false;\n        }\n        if (extensions != null ? !extensions.equals(that.extensions) : that.extensions != null) {\n            return false;\n        }\n        return $ref != null ? $ref.equals(that.$ref) : that.$ref == null;\n\n    }\n\n    @Override\n    public int hashCode() {\n        int result = description != null ? description.hashCode() : 0;\n        result = 31 * result + (content != null ? content.hashCode() : 0);\n        result = 31 * result + (required != null ? required.hashCode() : 0);\n        result = 31 * result + (extensions != null ? extensions.hashCode() : 0);\n        result = 31 * result + ($ref != null ? $ref.hashCode() : 0);\n        return result;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class RequestBody {\\n\");\n\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"    content: \").append(toIndentedString(content)).append(\"\\n\");\n        sb.append(\"    required: \").append(toIndentedString(required)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/responses/ApiResponse.java",
    "content": "package io.swagger.v3.oas.models.responses;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\nimport io.swagger.v3.oas.models.headers.Header;\nimport io.swagger.v3.oas.models.links.Link;\nimport io.swagger.v3.oas.models.media.Content;\n\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport java.util.Objects;\n\n/**\n * ApiResponse\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#response-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#response-object\"\n */\n\npublic class ApiResponse {\n    private String description = null;\n    private Map<String, Header> headers = null;\n    private Content content = null;\n    private java.util.Map<String, Link> links = null;\n    private java.util.Map<String, Object> extensions = null;\n    private String $ref = null;\n\n    /**\n     * returns the description property from a ApiResponse instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public ApiResponse description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    /**\n     * returns the headers property from a ApiResponse instance.\n     *\n     * @return headers\n     **/\n\n    public Map<String, Header> getHeaders() {\n        return headers;\n    }\n\n    public void setHeaders(Map<String, Header> headers) {\n        this.headers = headers;\n    }\n\n    public ApiResponse headers(Map<String, Header> headers) {\n        this.headers = headers;\n        return this;\n    }\n\n    public ApiResponse addHeaderObject(String name, Header header) {\n        if (this.headers == null) {\n            headers = new LinkedHashMap<>();\n        }\n        headers.put(name, header);\n        return this;\n    }\n\n    /**\n     * returns the content property from a ApiResponse instance.\n     *\n     * @return Content content\n     **/\n\n    public Content getContent() {\n        return content;\n    }\n\n    public void setContent(Content content) {\n        this.content = content;\n    }\n\n    public ApiResponse content(Content content) {\n        this.content = content;\n        return this;\n    }\n\n    /**\n     * returns the links property from a ApiResponse instance.\n     *\n     * @return Link links\n     **/\n\n    public Map<String, Link> getLinks() {\n        return links;\n    }\n\n    public void setLinks(Map<String, Link> links) {\n        this.links = links;\n    }\n\n    public ApiResponse links(Map<String, Link> links) {\n        this.links = links;\n        return this;\n    }\n\n    public ApiResponse addLink(String name, Link link) {\n        if (this.links == null) {\n            this.links = new LinkedHashMap<>();\n        }\n        this.links.put(name, link);\n        return this;\n    }\n\n    public ApiResponse link(String name, Link link) {\n        return this.addLink(name, link);\n    }\n\n    /**\n     * returns the $ref property from an ApiResponse instance.\n     *\n     * @return String $ref\n     **/\n    public String get$ref() {\n        return $ref;\n    }\n\n    public void set$ref(String $ref) {\n        if ($ref != null && ($ref.indexOf('.') == -1 && $ref.indexOf('/') == -1)) {\n            $ref = \"#/components/responses/\" + $ref;\n        }\n        this.$ref = $ref;\n    }\n\n    public ApiResponse $ref(String $ref) {\n        set$ref($ref);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        ApiResponse apiResponse = (ApiResponse) o;\n        return Objects.equals(this.description, apiResponse.description) &&\n                Objects.equals(this.headers, apiResponse.headers) &&\n                Objects.equals(this.content, apiResponse.content) &&\n                Objects.equals(this.links, apiResponse.links) &&\n                Objects.equals(this.extensions, apiResponse.extensions) &&\n                Objects.equals(this.$ref, apiResponse.$ref);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(description, headers, content, links, extensions, $ref);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public ApiResponse extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class ApiResponse {\\n\");\n\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"    headers: \").append(toIndentedString(headers)).append(\"\\n\");\n        sb.append(\"    content: \").append(toIndentedString(content)).append(\"\\n\");\n        sb.append(\"    links: \").append(toIndentedString(links)).append(\"\\n\");\n        sb.append(\"    extensions: \").append(toIndentedString(extensions)).append(\"\\n\");\n        sb.append(\"    $ref: \").append(toIndentedString($ref)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/responses/ApiResponses.java",
    "content": "package io.swagger.v3.oas.models.responses;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\nimport java.util.LinkedHashMap;\nimport java.util.Objects;\n\n/**\n * ApiResponses\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#responses-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#responses-object\"\n */\n\npublic class ApiResponses extends LinkedHashMap<String, ApiResponse> {\n\n    public static final String DEFAULT = \"default\";\n\n    private java.util.Map<String, Object> extensions = null;\n\n    public ApiResponses addApiResponse(String name, ApiResponse item) {\n        this.put(name, item);\n        return this;\n    }\n\n    /**\n     * returns the default property from a ApiResponses instance.\n     *\n     * @return ApiResponse _default\n     **/\n    @Deprecated\n    public ApiResponse getDefault() {\n        return this.get(DEFAULT);\n    }\n\n    @Deprecated\n    public void setDefault(ApiResponse _default) {\n        addApiResponse(DEFAULT, _default);\n    }\n\n    @Deprecated\n    public ApiResponses _default(ApiResponse _default) {\n        setDefault(_default);\n        return this;\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public ApiResponses extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        if (!super.equals(o)) {\n            return false;\n        }\n        ApiResponses apiResponses = (ApiResponses) o;\n        return Objects.equals(this.extensions, apiResponses.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode(), extensions);\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class ApiResponses {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"    extensions: \").append(toIndentedString(extensions)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/security/OAuthFlow.java",
    "content": "package io.swagger.v3.oas.models.security;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\nimport java.util.Objects;\n\n/**\n * OAuthFlow\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#oauth-flows-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#oauth-flows-object\"\n */\n\npublic class OAuthFlow {\n    private String authorizationUrl = null;\n    private String tokenUrl = null;\n    private String refreshUrl = null;\n    private Scopes scopes = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the authorizationUrl property from a OAuthFlow instance.\n     *\n     * @return String authorizationUrl\n     **/\n\n    public String getAuthorizationUrl() {\n        return authorizationUrl;\n    }\n\n    public void setAuthorizationUrl(String authorizationUrl) {\n        this.authorizationUrl = authorizationUrl;\n    }\n\n    public OAuthFlow authorizationUrl(String authorizationUrl) {\n        this.authorizationUrl = authorizationUrl;\n        return this;\n    }\n\n    /**\n     * returns the tokenUrl property from a OAuthFlow instance.\n     *\n     * @return String tokenUrl\n     **/\n\n    public String getTokenUrl() {\n        return tokenUrl;\n    }\n\n    public void setTokenUrl(String tokenUrl) {\n        this.tokenUrl = tokenUrl;\n    }\n\n    public OAuthFlow tokenUrl(String tokenUrl) {\n        this.tokenUrl = tokenUrl;\n        return this;\n    }\n\n    /**\n     * returns the refreshUrl property from a OAuthFlow instance.\n     *\n     * @return String refreshUrl\n     **/\n\n    public String getRefreshUrl() {\n        return refreshUrl;\n    }\n\n    public void setRefreshUrl(String refreshUrl) {\n        this.refreshUrl = refreshUrl;\n    }\n\n    public OAuthFlow refreshUrl(String refreshUrl) {\n        this.refreshUrl = refreshUrl;\n        return this;\n    }\n\n    /**\n     * returns the scopes property from a OAuthFlow instance.\n     *\n     * @return Scopes scopes\n     **/\n\n    public Scopes getScopes() {\n        return scopes;\n    }\n\n    public void setScopes(Scopes scopes) {\n        this.scopes = scopes;\n    }\n\n    public OAuthFlow scopes(Scopes scopes) {\n        this.scopes = scopes;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        OAuthFlow oauthFlow = (OAuthFlow) o;\n        return Objects.equals(this.authorizationUrl, oauthFlow.authorizationUrl) &&\n                Objects.equals(this.tokenUrl, oauthFlow.tokenUrl) &&\n                Objects.equals(this.refreshUrl, oauthFlow.refreshUrl) &&\n                Objects.equals(this.scopes, oauthFlow.scopes) &&\n                Objects.equals(this.extensions, oauthFlow.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(authorizationUrl, tokenUrl, refreshUrl, scopes, extensions);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public OAuthFlow extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class OAuthFlow {\\n\");\n\n        sb.append(\"    authorizationUrl: \").append(toIndentedString(authorizationUrl)).append(\"\\n\");\n        sb.append(\"    tokenUrl: \").append(toIndentedString(tokenUrl)).append(\"\\n\");\n        sb.append(\"    refreshUrl: \").append(toIndentedString(refreshUrl)).append(\"\\n\");\n        sb.append(\"    scopes: \").append(toIndentedString(scopes)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/security/OAuthFlows.java",
    "content": "package io.swagger.v3.oas.models.security;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\nimport java.util.Objects;\n\n/**\n * OAuthFlows\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#oauth-flows-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#oauth-flows-object\"\n */\n\npublic class OAuthFlows {\n    private OAuthFlow implicit = null;\n    private OAuthFlow password = null;\n    private OAuthFlow clientCredentials = null;\n    private OAuthFlow authorizationCode = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the implicit property from a OAuthFlows instance.\n     *\n     * @return OAuthFlow implicit\n     **/\n\n    public OAuthFlow getImplicit() {\n        return implicit;\n    }\n\n    public void setImplicit(OAuthFlow implicit) {\n        this.implicit = implicit;\n    }\n\n    public OAuthFlows implicit(OAuthFlow implicit) {\n        this.implicit = implicit;\n        return this;\n    }\n\n    /**\n     * returns the password property from a OAuthFlows instance.\n     *\n     * @return OAuthFlow password\n     **/\n\n    public OAuthFlow getPassword() {\n        return password;\n    }\n\n    public void setPassword(OAuthFlow password) {\n        this.password = password;\n    }\n\n    public OAuthFlows password(OAuthFlow password) {\n        this.password = password;\n        return this;\n    }\n\n    /**\n     * returns the clientCredentials property from a OAuthFlows instance.\n     *\n     * @return OAuthFlow clientCredentials\n     **/\n\n    public OAuthFlow getClientCredentials() {\n        return clientCredentials;\n    }\n\n    public void setClientCredentials(OAuthFlow clientCredentials) {\n        this.clientCredentials = clientCredentials;\n    }\n\n    public OAuthFlows clientCredentials(OAuthFlow clientCredentials) {\n        this.clientCredentials = clientCredentials;\n        return this;\n    }\n\n    /**\n     * returns the authorizationCode property from a OAuthFlows instance.\n     *\n     * @return OAuthFlow authorizationCode\n     **/\n\n    public OAuthFlow getAuthorizationCode() {\n        return authorizationCode;\n    }\n\n    public void setAuthorizationCode(OAuthFlow authorizationCode) {\n        this.authorizationCode = authorizationCode;\n    }\n\n    public OAuthFlows authorizationCode(OAuthFlow authorizationCode) {\n        this.authorizationCode = authorizationCode;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        OAuthFlows oauthFlows = (OAuthFlows) o;\n        return Objects.equals(this.implicit, oauthFlows.implicit) &&\n                Objects.equals(this.password, oauthFlows.password) &&\n                Objects.equals(this.clientCredentials, oauthFlows.clientCredentials) &&\n                Objects.equals(this.authorizationCode, oauthFlows.authorizationCode) &&\n                Objects.equals(this.extensions, oauthFlows.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(implicit, password, clientCredentials, authorizationCode, extensions);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public OAuthFlows extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class OAuthFlows {\\n\");\n\n        sb.append(\"    implicit: \").append(toIndentedString(implicit)).append(\"\\n\");\n        sb.append(\"    password: \").append(toIndentedString(password)).append(\"\\n\");\n        sb.append(\"    clientCredentials: \").append(toIndentedString(clientCredentials)).append(\"\\n\");\n        sb.append(\"    authorizationCode: \").append(toIndentedString(authorizationCode)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/security/Scopes.java",
    "content": "package io.swagger.v3.oas.models.security;\n\nimport java.util.LinkedHashMap;\nimport java.util.Objects;\n\n/**\n * Scopes\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#scoped-object\"\n */\n\npublic class Scopes extends LinkedHashMap<String, String> {\n    public Scopes() {\n    }\n\n    private java.util.Map<String, Object> extensions = null;\n\n    public Scopes addString(String name, String item) {\n        this.put(name, item);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        Scopes scopes = (Scopes) o;\n        return Objects.equals(this.extensions, scopes.extensions) &&\n                super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(extensions, super.hashCode());\n    }\n\n    /**\n     * @deprecated As extensions don't make sense at this level\n     */\n    @Deprecated\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    /**\n     * @deprecated As extensions don't make sense at this level\n     */\n    @Deprecated\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    /**\n     * @deprecated As extensions don't make sense at this level\n     */\n    @Deprecated\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    /**\n     * @deprecated As extensions don't make sense at this level\n     */\n    @Deprecated\n    public Scopes extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Scopes {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/security/SecurityRequirement.java",
    "content": "package io.swagger.v3.oas.models.security;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.LinkedHashMap;\nimport java.util.List;\nimport java.util.Objects;\n\n/**\n * SecurityRequirement\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#security-requirement-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#security-requirement-object\"\n */\n\npublic class SecurityRequirement extends LinkedHashMap<String, List<String>> {\n    public SecurityRequirement() {\n    }\n\n    public SecurityRequirement addList(String name, String item) {\n        this.put(name, Arrays.asList(item));\n        return this;\n    }\n\n    public SecurityRequirement addList(String name, List<String> item) {\n        this.put(name, item);\n        return this;\n    }\n\n    public SecurityRequirement addList(String name) {\n        this.put(name, new ArrayList<>());\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        return super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(super.hashCode());\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class SecurityRequirement {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/security/SecurityScheme.java",
    "content": "package io.swagger.v3.oas.models.security;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\n/**\n * SecurityScheme\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#security-scheme-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#security-scheme-object\"\n */\n\npublic class SecurityScheme {\n    /**\n     * Gets or Sets type\n     */\n    public enum Type {\n        APIKEY(\"apiKey\"),\n        HTTP(\"http\"),\n        OAUTH2(\"oauth2\"),\n        OPENIDCONNECT(\"openIdConnect\"),\n        MUTUALTLS(\"mutualTLS\");\n\n        private String value;\n\n        Type(String value) {\n            this.value = value;\n        }\n\n        @Override\n        public String toString() {\n            return String.valueOf(value);\n        }\n    }\n\n    private Type type = null;\n    private String description = null;\n    private String name = null;\n    private String $ref = null;\n\n    /**\n     * Gets or Sets in\n     */\n    public enum In {\n        COOKIE(\"cookie\"),\n\n        HEADER(\"header\"),\n\n        QUERY(\"query\");\n\n        private String value;\n\n        In(String value) {\n            this.value = value;\n        }\n\n        @Override\n        public String toString() {\n            return String.valueOf(value);\n        }\n    }\n\n    private In in = null;\n    private String scheme = null;\n    private String bearerFormat = null;\n    private OAuthFlows flows = null;\n    private String openIdConnectUrl = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the type property from a SecurityScheme instance.\n     *\n     * @return Type type\n     **/\n\n    public Type getType() {\n        return type;\n    }\n\n    public void setType(Type type) {\n        this.type = type;\n    }\n\n    public SecurityScheme type(Type type) {\n        this.type = type;\n        return this;\n    }\n\n    /**\n     * returns the description property from a SecurityScheme instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public SecurityScheme description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    /**\n     * returns the name property from a SecurityScheme instance.\n     *\n     * @return String name\n     **/\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public SecurityScheme name(String name) {\n        this.name = name;\n        return this;\n    }\n\n    /**\n     * returns the in property from a SecurityScheme instance.\n     *\n     * @return In in\n     **/\n\n    public In getIn() {\n        return in;\n    }\n\n    public void setIn(In in) {\n        this.in = in;\n    }\n\n    public SecurityScheme in(In in) {\n        this.in = in;\n        return this;\n    }\n\n    /**\n     * returns the scheme property from a SecurityScheme instance.\n     *\n     * @return String scheme\n     **/\n\n    public String getScheme() {\n        return scheme;\n    }\n\n    public void setScheme(String scheme) {\n        this.scheme = scheme;\n    }\n\n    public SecurityScheme scheme(String scheme) {\n        this.scheme = scheme;\n        return this;\n    }\n\n    /**\n     * returns the bearerFormat property from a SecurityScheme instance.\n     *\n     * @return String bearerFormat\n     **/\n\n    public String getBearerFormat() {\n        return bearerFormat;\n    }\n\n    public void setBearerFormat(String bearerFormat) {\n        this.bearerFormat = bearerFormat;\n    }\n\n    public SecurityScheme bearerFormat(String bearerFormat) {\n        this.bearerFormat = bearerFormat;\n        return this;\n    }\n\n    /**\n     * returns the flows property from a SecurityScheme instance.\n     *\n     * @return OAuthFlows flows\n     **/\n\n    public OAuthFlows getFlows() {\n        return flows;\n    }\n\n    public void setFlows(OAuthFlows flows) {\n        this.flows = flows;\n    }\n\n    public SecurityScheme flows(OAuthFlows flows) {\n        this.flows = flows;\n        return this;\n    }\n\n    /**\n     * returns the openIdConnectUrl property from a SecurityScheme instance.\n     *\n     * @return String openIdConnectUrl\n     **/\n\n    public String getOpenIdConnectUrl() {\n        return openIdConnectUrl;\n    }\n\n    public void setOpenIdConnectUrl(String openIdConnectUrl) {\n        this.openIdConnectUrl = openIdConnectUrl;\n    }\n\n    public SecurityScheme openIdConnectUrl(String openIdConnectUrl) {\n        this.openIdConnectUrl = openIdConnectUrl;\n        return this;\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public SecurityScheme extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    /**\n     * returns the $ref property from an SecurityScheme instance.\n     *\n     * @return String $ref\n     **/\n    public String get$ref() {\n        return $ref;\n    }\n\n    public void set$ref(String $ref) {\n        if ($ref != null && ($ref.indexOf('.') == -1 && $ref.indexOf('/') == -1)) {\n            $ref = \"#/components/securitySchemes/\" + $ref;\n        }\n        this.$ref = $ref;\n    }\n\n    public SecurityScheme $ref(String $ref) {\n        set$ref($ref);\n        return this;\n    }\n\n    @Override\n    public boolean equals(Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (!(o instanceof SecurityScheme)) {\n            return false;\n        }\n\n        SecurityScheme that = (SecurityScheme) o;\n\n        if (type != that.type) {\n            return false;\n        }\n        if (description != null ? !description.equals(that.description) : that.description != null) {\n            return false;\n        }\n        if (name != null ? !name.equals(that.name) : that.name != null) {\n            return false;\n        }\n        if ($ref != null ? !$ref.equals(that.$ref) : that.$ref != null) {\n            return false;\n        }\n        if (in != that.in) {\n            return false;\n        }\n        if (scheme != null ? !scheme.equals(that.scheme) : that.scheme != null) {\n            return false;\n        }\n        if (bearerFormat != null ? !bearerFormat.equals(that.bearerFormat) : that.bearerFormat != null) {\n            return false;\n        }\n        if (flows != null ? !flows.equals(that.flows) : that.flows != null) {\n            return false;\n        }\n        if (openIdConnectUrl != null ? !openIdConnectUrl.equals(that.openIdConnectUrl) : that.openIdConnectUrl != null) {\n            return false;\n        }\n        return extensions != null ? extensions.equals(that.extensions) : that.extensions == null;\n    }\n\n    @Override\n    public int hashCode() {\n        int result = type != null ? type.hashCode() : 0;\n        result = 31 * result + (description != null ? description.hashCode() : 0);\n        result = 31 * result + (name != null ? name.hashCode() : 0);\n        result = 31 * result + ($ref != null ? $ref.hashCode() : 0);\n        result = 31 * result + (in != null ? in.hashCode() : 0);\n        result = 31 * result + (scheme != null ? scheme.hashCode() : 0);\n        result = 31 * result + (bearerFormat != null ? bearerFormat.hashCode() : 0);\n        result = 31 * result + (flows != null ? flows.hashCode() : 0);\n        result = 31 * result + (openIdConnectUrl != null ? openIdConnectUrl.hashCode() : 0);\n        result = 31 * result + (extensions != null ? extensions.hashCode() : 0);\n        return result;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class SecurityScheme {\\n\");\n\n        sb.append(\"    type: \").append(toIndentedString(type)).append(\"\\n\");\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"    name: \").append(toIndentedString(name)).append(\"\\n\");\n        sb.append(\"    in: \").append(toIndentedString(in)).append(\"\\n\");\n        sb.append(\"    scheme: \").append(toIndentedString(scheme)).append(\"\\n\");\n        sb.append(\"    bearerFormat: \").append(toIndentedString(bearerFormat)).append(\"\\n\");\n        sb.append(\"    flows: \").append(toIndentedString(flows)).append(\"\\n\");\n        sb.append(\"    openIdConnectUrl: \").append(toIndentedString(openIdConnectUrl)).append(\"\\n\");\n        sb.append(\"    $ref: \").append(toIndentedString($ref)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/servers/Server.java",
    "content": "package io.swagger.v3.oas.models.servers;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\nimport java.util.Objects;\n\n/**\n * Server\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#server-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#server-object\"\n */\n\npublic class Server {\n    private String url = null;\n    private String description = null;\n    private ServerVariables variables = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the url property from a Server instance.\n     *\n     * @return String url\n     **/\n\n    public String getUrl() {\n        return url;\n    }\n\n    public void setUrl(String url) {\n        this.url = url;\n    }\n\n    public Server url(String url) {\n        this.url = url;\n        return this;\n    }\n\n    /**\n     * returns the description property from a Server instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public Server description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    /**\n     * returns the variables property from a Server instance.\n     *\n     * @return ServerVariables variables\n     **/\n\n    public ServerVariables getVariables() {\n        return variables;\n    }\n\n    public void setVariables(ServerVariables variables) {\n        this.variables = variables;\n    }\n\n    public Server variables(ServerVariables variables) {\n        this.variables = variables;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        Server server = (Server) o;\n        return Objects.equals(this.url, server.url) &&\n                Objects.equals(this.description, server.description) &&\n                Objects.equals(this.variables, server.variables) &&\n                Objects.equals(this.extensions, server.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(url, description, variables, extensions);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public Server extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Server {\\n\");\n\n        sb.append(\"    url: \").append(toIndentedString(url)).append(\"\\n\");\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"    variables: \").append(toIndentedString(variables)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/servers/ServerVariable.java",
    "content": "package io.swagger.v3.oas.models.servers;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Objects;\n\n/**\n * ServerVariable\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#server-variable-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#server-variable-object\"\n */\n\npublic class ServerVariable {\n    private List<String> _enum = null;\n    private String _default = null;\n    private String description = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the _enum property from a ServerVariable instance.\n     *\n     * @return List&lt;String&gt; _enum\n     **/\n\n    public List<String> getEnum() {\n        return _enum;\n    }\n\n    public void setEnum(List<String> _enum) {\n        this._enum = _enum;\n    }\n\n    public ServerVariable _enum(List<String> _enum) {\n        this._enum = _enum;\n        return this;\n    }\n\n    public ServerVariable addEnumItem(String _enumItem) {\n        if (this._enum == null) {\n            this._enum = new ArrayList<>();\n        }\n        this._enum.add(_enumItem);\n        return this;\n    }\n\n    /**\n     * returns the _default property from a ServerVariable instance.\n     *\n     * @return String _default\n     **/\n\n    public String getDefault() {\n        return _default;\n    }\n\n    public void setDefault(String _default) {\n        this._default = _default;\n    }\n\n    public ServerVariable _default(String _default) {\n        this._default = _default;\n        return this;\n    }\n\n    /**\n     * returns the description property from a ServerVariable instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public ServerVariable description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        ServerVariable serverVariable = (ServerVariable) o;\n        return Objects.equals(this._enum, serverVariable._enum) &&\n                Objects.equals(this._default, serverVariable._default) &&\n                Objects.equals(this.description, serverVariable.description) &&\n                Objects.equals(this.extensions, serverVariable.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(_enum, _default, description, extensions);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public ServerVariable extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class ServerVariable {\\n\");\n\n        sb.append(\"    _enum: \").append(toIndentedString(_enum)).append(\"\\n\");\n        sb.append(\"    _default: \").append(toIndentedString(_default)).append(\"\\n\");\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/servers/ServerVariables.java",
    "content": "package io.swagger.v3.oas.models.servers;\n\nimport java.util.LinkedHashMap;\nimport java.util.Objects;\n\n/**\n * ServerVariables\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#server-variables-object\"\n */\n\npublic class ServerVariables extends LinkedHashMap<String, ServerVariable> {\n    public ServerVariables() {\n    }\n\n    private java.util.Map<String, Object> extensions = null;\n\n    public ServerVariables addServerVariable(String name, ServerVariable item) {\n        this.put(name, item);\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        ServerVariables serverVariables = (ServerVariables) o;\n        return Objects.equals(this.extensions, serverVariables.extensions) &&\n                super.equals(o);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(extensions, super.hashCode());\n    }\n\n    /**\n     * @deprecated As extensions don't make sense at this level\n     */\n    @Deprecated\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    /**\n     * @deprecated As extensions don't make sense at this level\n     */\n    @Deprecated\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    /**\n     * @deprecated As extensions don't make sense at this level\n     */\n    @Deprecated\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    /**\n     * @deprecated As extensions don't make sense at this level\n     */\n    @Deprecated\n    public ServerVariables extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class ServerVariables {\\n\");\n        sb.append(\"    \").append(toIndentedString(super.toString())).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-models/src/main/java/io/swagger/v3/oas/models/tags/Tag.java",
    "content": "package io.swagger.v3.oas.models.tags;\n\nimport io.swagger.v3.oas.models.annotations.OpenAPI31;\nimport io.swagger.v3.oas.models.ExternalDocumentation;\n\nimport java.util.Objects;\n\n/**\n * Tag\n *\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.0.4/versions/3.0.4.md#tag-object\"\n * @see \"https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md#tag-object\"\n */\n\npublic class Tag {\n    private String name = null;\n    private String description = null;\n    private ExternalDocumentation externalDocs = null;\n    private java.util.Map<String, Object> extensions = null;\n\n    /**\n     * returns the name property from a Tag instance.\n     *\n     * @return String name\n     **/\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public Tag name(String name) {\n        this.name = name;\n        return this;\n    }\n\n    /**\n     * returns the description property from a Tag instance.\n     *\n     * @return String description\n     **/\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String description) {\n        this.description = description;\n    }\n\n    public Tag description(String description) {\n        this.description = description;\n        return this;\n    }\n\n    /**\n     * returns the externalDocs property from a Tag instance.\n     *\n     * @return ExternalDocumentation externalDocs\n     **/\n\n    public ExternalDocumentation getExternalDocs() {\n        return externalDocs;\n    }\n\n    public void setExternalDocs(ExternalDocumentation externalDocs) {\n        this.externalDocs = externalDocs;\n    }\n\n    public Tag externalDocs(ExternalDocumentation externalDocs) {\n        this.externalDocs = externalDocs;\n        return this;\n    }\n\n    @Override\n    public boolean equals(java.lang.Object o) {\n        if (this == o) {\n            return true;\n        }\n        if (o == null || getClass() != o.getClass()) {\n            return false;\n        }\n        Tag tag = (Tag) o;\n        return Objects.equals(this.name, tag.name) &&\n                Objects.equals(this.description, tag.description) &&\n                Objects.equals(this.externalDocs, tag.externalDocs) &&\n                Objects.equals(this.extensions, tag.extensions);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(name, description, externalDocs, extensions);\n    }\n\n    public java.util.Map<String, Object> getExtensions() {\n        return extensions;\n    }\n\n    public void addExtension(String name, Object value) {\n        if (name == null || name.isEmpty() || !name.startsWith(\"x-\")) {\n            return;\n        }\n        if (this.extensions == null) {\n            this.extensions = new java.util.LinkedHashMap<>();\n        }\n        this.extensions.put(name, value);\n    }\n\n    @OpenAPI31\n    public void addExtension31(String name, Object value) {\n        if (name != null && (name.startsWith(\"x-oas-\") || name.startsWith(\"x-oai-\"))) {\n            return;\n        }\n        addExtension(name, value);\n    }\n\n    public void setExtensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n    }\n\n    public Tag extensions(java.util.Map<String, Object> extensions) {\n        this.extensions = extensions;\n        return this;\n    }\n\n    @Override\n    public String toString() {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"class Tag {\\n\");\n\n        sb.append(\"    name: \").append(toIndentedString(name)).append(\"\\n\");\n        sb.append(\"    description: \").append(toIndentedString(description)).append(\"\\n\");\n        sb.append(\"    externalDocs: \").append(toIndentedString(externalDocs)).append(\"\\n\");\n        sb.append(\"}\");\n        return sb.toString();\n    }\n\n    /**\n     * Convert the given object to string with each line indented by 4 spaces\n     * (except the first line).\n     */\n    private String toIndentedString(java.lang.Object o) {\n        if (o == null) {\n            return \"null\";\n        }\n        return o.toString().replace(\"\\n\", \"\\n    \");\n    }\n\n}\n\n"
  },
  {
    "path": "modules/swagger-models/src/test/java/io/swagger/test/SchemaTests.java",
    "content": "package io.swagger.test;\n\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport org.testng.annotations.Test;\n\nimport java.math.BigDecimal;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport static org.testng.Assert.fail;\n\npublic class SchemaTests {\n\n    @Test\n    public void AdditionalPropertiesBoolean(){\n        Map<String, Schema> schemas = new HashMap<>();\n\n        schemas.put(\"StringSchema\", new StringSchema()\n                        .description(\"simple string schema\")\n                        .minLength(3)\n                        .maxLength(100)\n                        .example(\"it works\")\n                        .additionalProperties(true)\n                );\n    }\n\n    @Test\n    public void AdditionalPropertiesSchema(){\n        Map<String, Schema> schemas = new HashMap<>();\n\n        schemas.put(\"IntegerSchema\", new IntegerSchema()\n                .description(\"simple integer schema\")\n                .multipleOf(new BigDecimal(3))\n                .minimum(new BigDecimal(6))\n                .additionalProperties(new StringSchema())\n        );\n\n    }\n\n    @Test\n    public void AdditionalPropertiesException()throws Exception{\n        Map<String, Schema> schemas = new HashMap<>();\n        try {\n            schemas.put(\"IntegerSchema\", new IntegerSchema()\n                    .description(\"simple integer schema\")\n                    .multipleOf(new BigDecimal(3))\n                    .minimum(new BigDecimal(6))\n                    .additionalProperties(\"ok\")\n            );\n            fail(\"Should have thrown an exception\");\n        }catch (Exception exception){\n\n        }\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/test/java/io/swagger/test/SimpleBuilderTest.java",
    "content": "package io.swagger.test;\n\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport com.fasterxml.jackson.core.util.DefaultPrettyPrinter;\nimport com.fasterxml.jackson.databind.DeserializationFeature;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.SerializationFeature;\nimport io.swagger.v3.oas.models.Components;\nimport io.swagger.v3.oas.models.ExternalDocumentation;\nimport io.swagger.v3.oas.models.OpenAPI;\nimport io.swagger.v3.oas.models.Operation;\nimport io.swagger.v3.oas.models.PathItem;\nimport io.swagger.v3.oas.models.Paths;\nimport io.swagger.v3.oas.models.info.Contact;\nimport io.swagger.v3.oas.models.info.Info;\nimport io.swagger.v3.oas.models.links.Link;\nimport io.swagger.v3.oas.models.media.Content;\nimport io.swagger.v3.oas.models.media.IntegerSchema;\nimport io.swagger.v3.oas.models.media.MediaType;\nimport io.swagger.v3.oas.models.media.Schema;\nimport io.swagger.v3.oas.models.media.StringSchema;\nimport io.swagger.v3.oas.models.parameters.QueryParameter;\nimport io.swagger.v3.oas.models.responses.ApiResponse;\nimport io.swagger.v3.oas.models.responses.ApiResponses;\nimport io.swagger.v3.oas.models.tags.Tag;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.testng.annotations.Test;\n\nimport java.math.BigDecimal;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.Map;\n\npublic class SimpleBuilderTest {\n    private static final Logger LOGGER = LoggerFactory.getLogger(SimpleBuilderTest.class);\n\n    @Test\n    public void testBuilder() throws Exception {\n        // basic metadata\n        OpenAPI oai =\n                new OpenAPI()\n                        .info(new Info()\n                                .contact(new Contact()\n                                        .email(\"tony@eatbacon.org\")\n                                        .name(\"Tony the Tam\")\n                                        .url(\"https://foo.bar\")))\n                        .externalDocs(new ExternalDocumentation()\n                                .description(\"read more here\")\n                                .url(\"http://swagger.io\"))\n                        .addTagsItem(new Tag()\n                                .name(\"funky dunky\")\n                                .description(\"all about neat things\"))\n                        .extensions(new HashMap<String, Object>() {{\n                            put(\"x-fancy-extension\", \"something\");\n                        }});\n\n        Map<String, Schema> schemas = new HashMap<>();\n\n        schemas\n                .put(\"StringSchema\", new StringSchema()\n                        .description(\"simple string schema\")\n                        .minLength(3)\n                        .maxLength(100)\n                        .example(\"it works\")\n                );\n\n        schemas.put(\"IntegerSchema\", new IntegerSchema()\n                .description(\"simple integer schema\")\n                .multipleOf(new BigDecimal(3))\n                .minimum(new BigDecimal(6))\n        );\n\n        oai.components(new Components()\n                .schemas(schemas));\n\n        schemas.put(\"Address\", new Schema()\n                .description(\"address object\")\n                .addProperties(\"street\", new StringSchema()\n                        .description(\"the street number\"))\n                .addProperties(\"city\", new StringSchema()\n                        .description(\"city\"))\n                .addProperties(\"state\", new StringSchema()\n                        .description(\"state\")\n                        .minLength(2)\n                        .maxLength(2))\n                .addProperties(\"zip\", new StringSchema()\n                        .description(\"zip code\")\n                        .pattern(\"^\\\\d{5}(?:[-\\\\s]\\\\d{4})?$\")\n                        .minLength(2)\n                        .maxLength(2))\n                .addProperties(\"country\", new StringSchema()\n                        ._enum(new ArrayList<String>() {{\n                            this.add(\"US\");\n                        }}))\n                .description(\"2-digit country code\")\n                .minLength(2)\n                .maxLength(2)\n\n        );\n\n        oai.paths(new Paths()\n                .addPathItem(\"/foo\", new PathItem()\n                        .description(\"the foo path\")\n                        .get(new Operation()\n                                .addParametersItem(new QueryParameter()\n                                        .description(\"Records to skip\")\n                                        .required(false)\n                                        .schema(new IntegerSchema()\n                                        ))\n                                .responses(new ApiResponses()\n                                        .addApiResponse(\"200\", new ApiResponse()\n                                                .description(\"it worked\")\n                                                .content(new Content()\n                                                        .addMediaType(\"application/json\",\n                                                                new MediaType().schema(new Schema()\n                                                                        .$ref(\"#/components/schemas/Address\")))\n                                                )\n                                                .addLink(\"funky\", new Link()\n                                                        .operationId(\"getFunky\")))\n                                )\n                        )\n                )\n        );\n\n        LOGGER.debug(writeJson(oai));\n    }\n\n    public static String writeJson(Object value) throws Exception {\n        ObjectMapper mapper = new ObjectMapper();\n\n        mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);\n        mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);\n        mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);\n        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n\n        return mapper.writer(new DefaultPrettyPrinter()).writeValueAsString(value);\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/test/java/io/swagger/v3/oas/models/PathsTest.java",
    "content": "package io.swagger.v3.oas.models;\n\nimport java.util.HashMap;\n\nimport org.testng.annotations.Test;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotEquals;\nimport static org.testng.Assert.assertNull;\n\npublic class PathsTest {\n\n    @Test\n    public void testAddPathItem() {\n        Paths paths = new Paths();\n        assertEquals(paths.addPathItem(\"foo\", null), paths);\n    }\n\n    @Test\n    public void testEquals() {\n        Paths paths = new Paths();\n        assertEquals(paths, paths);\n        assertEquals(paths, new Paths());\n\n        assertNotEquals(paths, null);\n        assertNotEquals(paths, new String());\n    }\n\n    @Test\n    public void testGetExtensions1() {\n        Paths paths = new Paths();\n        paths.addExtension(\"\", null);\n        paths.addExtension(\"y-\", null);\n        paths.addExtension(null, null);\n\n        assertNull(paths.getExtensions());\n    }\n\n    @Test\n    public void testGetExtensions2() {\n        Paths paths = new Paths();\n        paths.addExtension(\"x-\", \"foo\");\n        paths.addExtension(\"x-\", \"bar\");\n        paths.addExtension(\"x-\", \"baz\");\n\n        assertEquals(paths.getExtensions(),\n                new HashMap<String, Object>() {{\n                    put(\"x-\", \"baz\");\n                }});\n    }\n\n    @Test\n    public void testGetExtensions3() {\n        Paths paths = new Paths();\n        HashMap<String, Object> hashMap = new HashMap<>();\n        hashMap.put(\"x-\", \"foo\");\n        hashMap.put(\"x-\", \"bar\");\n        hashMap.put(\"x-\", \"baz\");\n        paths.setExtensions(hashMap);\n\n        assertEquals(paths.getExtensions(),\n                new HashMap<String, Object>() {{\n                    put(\"x-\", \"baz\");\n                }});\n    }\n\n    @Test\n    public void testExtensions() {\n        Paths paths = new Paths();\n        HashMap<String, Object> hashMap = new HashMap<>();\n        hashMap.put(\"x-\", \"foo\");\n        hashMap.put(\"x-\", \"bar\");\n        hashMap.put(\"x-\", \"baz\");\n\n        assertEquals(paths.extensions(hashMap), paths);\n    }\n\n    @Test\n    public void testToString() {\n        Paths paths = new Paths();\n        paths.addPathItem(\"foo\", null);\n        assertEquals(paths.toString(),\n                \"class Paths {\\n    {foo=null}\\n}\");\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/test/java/io/swagger/v3/oas/models/links/LinkParameterTest.java",
    "content": "package io.swagger.v3.oas.models.links;\n\nimport java.util.HashMap;\n\nimport org.testng.annotations.Test;\n\nimport static org.testng.Assert.assertEquals;\nimport static org.testng.Assert.assertNotEquals;\nimport static org.testng.Assert.assertNull;\n\npublic class LinkParameterTest {\n\n    @Test\n    public void testValue() {\n        LinkParameter linkParameter = new LinkParameter();\n        linkParameter.setValue(\"foo\");\n        linkParameter.setValue(\"bar\");\n        linkParameter.setValue(\"baz\");\n\n        assertEquals(linkParameter.value(\"bar\"), linkParameter);\n        assertEquals(linkParameter.getValue(), \"bar\");\n    }\n\n    @Test\n    public void testEquals() {\n        LinkParameter linkParameter = new LinkParameter();\n        assertNotEquals(linkParameter, null);\n        assertNotEquals(linkParameter, new String());\n\n        assertEquals(linkParameter, linkParameter);\n        assertEquals(linkParameter, new LinkParameter());\n    }\n\n    @Test\n    public void testGetExtensions1() {\n        LinkParameter linkParameter = new LinkParameter();\n        linkParameter.addExtension(\"\", null);\n        linkParameter.addExtension(\"y-\", null);\n        linkParameter.addExtension(null, null);\n\n        assertNull(linkParameter.getExtensions());\n    }\n\n    @Test\n    public void testGetExtensions2() {\n        LinkParameter linkParameter = new LinkParameter();\n        linkParameter.addExtension(\"x-\", \"foo\");\n        linkParameter.addExtension(\"x-\", \"bar\");\n        linkParameter.addExtension(\"x-\", \"baz\");\n\n        assertEquals(linkParameter.getExtensions(),\n                new HashMap<String, Object>() {{\n                    put(\"x-\", \"baz\");\n                }});\n    }\n\n    @Test\n    public void testGetExtensions3() {\n        LinkParameter linkParameter = new LinkParameter();\n        HashMap<String, Object> hashMap = new HashMap<>();\n        hashMap.put(\"x-\", \"foo\");\n        hashMap.put(\"x-\", \"bar\");\n        hashMap.put(\"x-\", \"baz\");\n        linkParameter.setExtensions(hashMap);\n\n        assertEquals(linkParameter.getExtensions(),\n                new HashMap<String, Object>() {{\n                    put(\"x-\", \"baz\");\n                }});\n    }\n\n    @Test\n    public void testExtensions() {\n        LinkParameter linkParameter = new LinkParameter();\n        HashMap<String, Object> hashMap = new HashMap<>();\n        hashMap.put(\"x-\", \"foo\");\n        hashMap.put(\"x-\", \"bar\");\n        hashMap.put(\"x-\", \"baz\");\n\n        assertEquals(linkParameter.extensions(hashMap), linkParameter);\n    }\n\n    @Test\n    public void testToString() {\n        LinkParameter linkParameter = new LinkParameter();\n        linkParameter.setValue(\"foo\");\n        assertEquals(linkParameter.toString(),\n                \"class LinkParameter {\\n}\");\n    }\n}\n"
  },
  {
    "path": "modules/swagger-models/src/test/java/io/swagger/v3/oas/models/media/SchemaTest.java",
    "content": "package io.swagger.v3.oas.models.media;\n\nimport org.testng.annotations.Test;\nimport static org.testng.Assert.*;\n\nimport java.math.BigDecimal;\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.Map;\n\npublic class SchemaTest {\n\n    @Test\n    public void testEqualsWithDifferentBooleanSchemaValue() {\n        Schema<Object> schema1 = new Schema<>();\n        Schema<Object> schema2 = new Schema<>();\n\n        schema1.setBooleanSchemaValue(true);\n        schema2.setBooleanSchemaValue(false);\n\n        assertFalse(schema1.equals(schema2));\n        assertFalse(schema2.equals(schema1));\n        assertNotEquals(schema1.hashCode(), schema2.hashCode());\n    }\n\n\n    @Test\n    public void testEqualsWithOneNullBooleanSchemaValue() {\n        Schema<Object> schema1 = new Schema<>();\n        Schema<Object> schema2 = new Schema<>();\n\n        schema1.setBooleanSchemaValue(true);\n        schema2.setBooleanSchemaValue(null);\n\n        assertFalse(schema1.equals(schema2));\n        assertFalse(schema2.equals(schema1));\n        assertNotEquals(schema1.hashCode(), schema2.hashCode());\n    }\n\n    @Test\n    public void testBooleanSchemaValueFalseVsTrue() {\n        // This test specifically addresses the issue where false gets mapped to true\n        Schema<Object> schemaFalse = new Schema<>();\n        Schema<Object> schemaTrue = new Schema<>();\n\n        schemaFalse.setBooleanSchemaValue(false);\n        schemaTrue.setBooleanSchemaValue(true);\n\n        // These should be different\n        assertFalse(schemaFalse.equals(schemaTrue));\n        assertFalse(schemaTrue.equals(schemaFalse));\n\n        // Hash codes should be different to prevent collisions in maps\n        assertNotEquals(schemaFalse.hashCode(), schemaTrue.hashCode());\n\n        // Verify the actual values\n        assertEquals(Boolean.FALSE, schemaFalse.getBooleanSchemaValue());\n        assertEquals(Boolean.TRUE, schemaTrue.getBooleanSchemaValue());\n    }\n\n    @Test\n    public void testComplexSchemaEqualsWithBooleanSchemaValue() {\n        Schema<Object> schema1 = createComplexSchema();\n        Schema<Object> schema2 = createComplexSchema();\n\n        // Initially they should be equal\n        assertTrue(schema1.equals(schema2));\n        assertEquals(schema1.hashCode(), schema2.hashCode());\n\n        // Change only booleanSchemaValue\n        schema2.setBooleanSchemaValue(false);\n\n        // Now they should be different\n        assertFalse(schema1.equals(schema2));\n        assertNotEquals(schema1.hashCode(), schema2.hashCode());\n    }\n\n\n    @Test\n    public void testBooleanSchemaValueInMapLookup() {\n        Map<Schema<Object>, String> visitedMap = new HashMap<>();\n\n        Schema<Object> schemaTrue = new Schema<>();\n        Schema<Object> schemaFalse = new Schema<>();\n\n        schemaTrue.setBooleanSchemaValue(true);\n        schemaFalse.setBooleanSchemaValue(false);\n\n        visitedMap.put(schemaTrue, \"true_schema\");\n        visitedMap.put(schemaFalse, \"false_schema\");\n\n        assertEquals(visitedMap.size(), 2);\n        assertEquals(visitedMap.get(schemaTrue), \"true_schema\");\n        assertEquals(visitedMap.get(schemaFalse), \"false_schema\");\n\n        Schema<Object> anotherTrue = new Schema<>();\n        anotherTrue.setBooleanSchemaValue(true);\n        assertEquals(visitedMap.get(anotherTrue), \"true_schema\");\n\n        Schema<Object> anotherFalse = new Schema<>();\n        anotherFalse.setBooleanSchemaValue(false);\n        assertEquals(visitedMap.get(anotherFalse), \"false_schema\");\n    }\n\n    @Test\n    public void testSchemaResolutionWithBooleanSchemaValue() {\n        Map<Schema<Object>, Schema<Object>> visitedMap = new HashMap<>();\n\n        // Create a schema with booleanSchemaValue = false\n        Schema<Object> originalSchema = new Schema<>();\n        originalSchema.setBooleanSchemaValue(false);\n        originalSchema.setTitle(\"Original Schema\");\n        originalSchema.setType(\"boolean\");\n\n        // Create a resolved version of the same schema\n        Schema<Object> resolvedSchema = new Schema<>();\n        resolvedSchema.setBooleanSchemaValue(false);\n        resolvedSchema.setTitle(\"Resolved Schema\");\n        resolvedSchema.setType(\"boolean\");\n\n        // Put the original schema in the visited map\n        visitedMap.put(originalSchema, resolvedSchema);\n\n        // Create another schema with identical structure but booleanSchemaValue = true\n        Schema<Object> differentSchema = new Schema<>();\n        differentSchema.setBooleanSchemaValue(true);\n        differentSchema.setTitle(\"Original Schema\");\n        differentSchema.setType(\"boolean\");\n\n        // The lookup should NOT return the resolved schema for the different schema\n        assertNull(visitedMap.get(differentSchema));\n\n        // But it should return the resolved schema for an equivalent schema with false value\n        Schema<Object> equivalentSchema = new Schema<>();\n        equivalentSchema.setBooleanSchemaValue(false);\n        equivalentSchema.setTitle(\"Original Schema\");\n        equivalentSchema.setType(\"boolean\");\n        assertEquals(resolvedSchema, visitedMap.get(equivalentSchema));\n\n        // Verify that the schemas with different booleanSchemaValue are indeed different\n        assertNotEquals(originalSchema, differentSchema);\n        assertNotEquals(originalSchema.hashCode(), differentSchema.hashCode());\n    }\n\n    @Test\n    public void testBooleanSchemaValueInSetOperations() {\n        java.util.Set<Schema<Object>> schemaSet = new java.util.HashSet<>();\n\n        Schema<Object> schemaTrue = new Schema<>();\n        schemaTrue.setBooleanSchemaValue(true);\n\n        Schema<Object> schemaFalse = new Schema<>();\n        schemaFalse.setBooleanSchemaValue(false);\n\n        schemaSet.add(schemaTrue);\n        schemaSet.add(schemaFalse);\n\n        // Should have two distinct schemas in the set\n        assertEquals(schemaSet.size(), 2);\n        assertTrue(schemaSet.contains(schemaTrue));\n        assertTrue(schemaSet.contains(schemaFalse));\n\n        // Adding equivalent schemas should not increase the set size\n        Schema<Object> anotherTrue = new Schema<>();\n        anotherTrue.setBooleanSchemaValue(true);\n        schemaSet.add(anotherTrue);\n        assertEquals(schemaSet.size(), 2);\n    }\n\n    private Schema<Object> createComplexSchema() {\n        Schema<Object> schema = new Schema<>();\n        schema.setTitle(\"Complex Schema\");\n        schema.setType(\"object\");\n        schema.setDescription(\"A complex schema for testing\");\n        schema.setMaximum(new BigDecimal(\"100\"));\n        schema.setMinimum(new BigDecimal(\"0\"));\n        schema.setRequired(Arrays.asList(\"id\", \"name\"));\n        schema.setBooleanSchemaValue(true);\n        return schema;\n    }\n}\n"
  },
  {
    "path": "modules/swagger-project-jakarta/.gitignore",
    "content": "build/\nlib/*.jar\ntarget\n.idea\n.idea_modules\n.settings\n.project\n.classpath\n.cache\natlassian-ide-plugin.xml\n*.iml\n.java-version\nsonar-project.properties\ntest-output/\n*.pyc\n**/transformed/*.jar\n**/transformed/*.test-jar\n**/transformed/*.maven-plugin\n"
  },
  {
    "path": "modules/swagger-project-jakarta/modules/swagger-annotations-jakarta/pom.xml",
    "content": "<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txmlns=\"http://maven.apache.org/POM/4.0.0\"\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <parent>\n        <groupId>io.swagger.core.v3</groupId>\n        <artifactId>swagger-project-jakarta</artifactId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../..</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-annotations-jakarta</artifactId>\n    <name>swagger-annotations-jakarta</name>\n    <description>swagger-annotations-jakarta</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.eclipse.transformer</groupId>\n                <artifactId>transformer-maven-plugin</artifactId>\n                <version>${transformer-maven-plugin-version}</version>\n                <extensions>true</extensions>\n                <configuration>\n                    <rules>\n                        <jakartaDefaults>true</jakartaDefaults>\n                    </rules>\n                    <baseName>${project.build.finalName}-jakarta</baseName>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>default-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-annotations</artifactId>\n                                <version>${project.version}</version>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>javadoc-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-annotations</artifactId>\n                                <version>${project.version}</version>\n                                <classifier>javadoc</classifier>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>source-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-annotations</artifactId>\n                                <version>${project.version}</version>\n                                <classifier>sources</classifier>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies></dependencies>\n\n    <properties></properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-project-jakarta/modules/swagger-core-jakarta/pom.xml",
    "content": "<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txmlns=\"http://maven.apache.org/POM/4.0.0\"\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <parent>\n        <groupId>io.swagger.core.v3</groupId>\n        <artifactId>swagger-project-jakarta</artifactId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../..</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-core-jakarta</artifactId>\n    <name>swagger-core-jakarta</name>\n    <description>swagger-core-jakarta</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.eclipse.transformer</groupId>\n                <artifactId>transformer-maven-plugin</artifactId>\n                <version>${transformer-maven-plugin-version}</version>\n                <extensions>true</extensions>\n                <configuration>\n                    <rules>\n                        <jakartaDefaults>true</jakartaDefaults>\n                    </rules>\n                    <baseName>${project.build.finalName}-jakarta</baseName>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>default-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-core</artifactId>\n                                <version>${project.version}</version>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>javadoc-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-core</artifactId>\n                                <version>${project.version}</version>\n                                <classifier>javadoc</classifier>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>source-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-core</artifactId>\n                                <version>${project.version}</version>\n                                <classifier>sources</classifier>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.commons</groupId>\n            <artifactId>commons-lang3</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-api</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-classic</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-core</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>commons-io</groupId>\n            <artifactId>commons-io</artifactId>\n        </dependency>\n\n\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-annotations-jakarta</artifactId>\n            <version>${project.parent.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-models-jakarta</artifactId>\n            <version>${project.parent.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.yaml</groupId>\n            <artifactId>snakeyaml</artifactId>\n            <version>${snakeyaml-version}</version>\n        </dependency>\n        <dependency>\n            <groupId>jakarta.xml.bind</groupId>\n            <artifactId>jakarta.xml.bind-api</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>jakarta.validation</groupId>\n            <artifactId>jakarta.validation-api</artifactId>\n        </dependency>\n\n\n        <dependency>\n            <groupId>com.fasterxml.jackson.core</groupId>\n            <artifactId>jackson-annotations</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.core</groupId>\n            <artifactId>jackson-databind</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.dataformat</groupId>\n            <artifactId>jackson-dataformat-yaml</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.datatype</groupId>\n            <artifactId>jackson-datatype-jsr310</artifactId>\n        </dependency>\n    </dependencies>\n\n    <properties></properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-project-jakarta/modules/swagger-integration-jakarta/pom.xml",
    "content": "<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txmlns=\"http://maven.apache.org/POM/4.0.0\"\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <parent>\n        <groupId>io.swagger.core.v3</groupId>\n        <artifactId>swagger-project-jakarta</artifactId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../..</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-integration-jakarta</artifactId>\n    <name>swagger-integration-jakarta</name>\n    <description>swagger-integration-jakarta</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.eclipse.transformer</groupId>\n                <artifactId>transformer-maven-plugin</artifactId>\n                <version>${transformer-maven-plugin-version}</version>\n                <extensions>true</extensions>\n                <configuration>\n                    <rules>\n                        <jakartaDefaults>true</jakartaDefaults>\n                    </rules>\n                    <baseName>${project.build.finalName}-jakarta</baseName>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>default-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-integration</artifactId>\n                                <version>${project.version}</version>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>javadoc-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-integration</artifactId>\n                                <version>${project.version}</version>\n                                <classifier>javadoc</classifier>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>source-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-integration</artifactId>\n                                <version>${project.version}</version>\n                                <classifier>sources</classifier>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>io.github.classgraph</groupId>\n            <artifactId>classgraph</artifactId>\n        </dependency>\n\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-core-jakarta</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-models-jakarta</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n\n    </dependencies>\n\n    <properties></properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-project-jakarta/modules/swagger-jaxrs2-jakarta/pom.xml",
    "content": "<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txmlns=\"http://maven.apache.org/POM/4.0.0\"\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <parent>\n        <groupId>io.swagger.core.v3</groupId>\n        <artifactId>swagger-project-jakarta</artifactId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../..</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-jaxrs2-jakarta</artifactId>\n    <name>swagger-jaxrs2-jakarta</name>\n    <description>swagger-jaxrs2-jakarta</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.eclipse.transformer</groupId>\n                <artifactId>transformer-maven-plugin</artifactId>\n                <version>${transformer-maven-plugin-version}</version>\n                <extensions>true</extensions>\n                <configuration>\n                    <rules>\n                        <jakartaDefaults>true</jakartaDefaults>\n                    </rules>\n                    <baseName>${project.build.finalName}-jakarta</baseName>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>default-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-jaxrs2</artifactId>\n                                <version>${project.version}</version>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>javadoc-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-jaxrs2</artifactId>\n                                <version>${project.version}</version>\n                                <classifier>javadoc</classifier>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>source-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-jaxrs2</artifactId>\n                                <version>${project.version}</version>\n                                <classifier>sources</classifier>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-classic</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-core</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>io.github.classgraph</groupId>\n            <artifactId>classgraph</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.javassist</groupId>\n            <artifactId>javassist</artifactId>\n            <version>3.30.2-GA</version>\n        </dependency>\n        <dependency>\n            <groupId>commons-io</groupId>\n            <artifactId>commons-io</artifactId>\n        </dependency>\n\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-models-jakarta</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-annotations-jakarta</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-integration-jakarta</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.yaml</groupId>\n            <artifactId>snakeyaml</artifactId>\n            <version>${snakeyaml-version}</version>\n        </dependency>\n        <dependency>\n            <groupId>jakarta.ws.rs</groupId>\n            <artifactId>jakarta.ws.rs-api</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>jakarta.servlet</groupId>\n            <artifactId>jakarta.servlet-api</artifactId>\n            <scope>provided</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>com.fasterxml.jackson.core</groupId>\n            <artifactId>jackson-databind</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.jakarta.rs</groupId>\n            <artifactId>jackson-jakarta-rs-json-provider</artifactId>\n            <version>${jackson-version}</version>\n        </dependency>\n    </dependencies>\n\n    <properties></properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-project-jakarta/modules/swagger-jaxrs2-servlet-initializer-jakarta/pom.xml",
    "content": "<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txmlns=\"http://maven.apache.org/POM/4.0.0\"\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <parent>\n        <groupId>io.swagger.core.v3</groupId>\n        <artifactId>swagger-project-jakarta</artifactId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../..</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-jaxrs2-servlet-initializer-jakarta</artifactId>\n    <name>swagger-jaxrs2-servlet-initializer-jakarta</name>\n    <description>swagger-jaxrs2-servlet-initializer-jakarta</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.eclipse.transformer</groupId>\n                <artifactId>transformer-maven-plugin</artifactId>\n                <version>${transformer-maven-plugin-version}</version>\n                <extensions>true</extensions>\n                <configuration>\n                    <rules>\n                        <jakartaDefaults>true</jakartaDefaults>\n                    </rules>\n                    <baseName>${project.build.finalName}-jakarta</baseName>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>default-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-jaxrs2-servlet-initializer</artifactId>\n                                <version>${project.version}</version>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>javadoc-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-jaxrs2-servlet-initializer</artifactId>\n                                <version>${project.version}</version>\n                                <classifier>javadoc</classifier>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>source-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-jaxrs2-servlet-initializer</artifactId>\n                                <version>${project.version}</version>\n                                <classifier>sources</classifier>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-classic</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-core</artifactId>\n            <scope>provided</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2-jakarta</artifactId>\n            <version>${project.version}</version>\n            <scope>provided</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>jakarta.ws.rs</groupId>\n            <artifactId>jakarta.ws.rs-api</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>jakarta.servlet</groupId>\n            <artifactId>jakarta.servlet-api</artifactId>\n            <scope>provided</scope>\n        </dependency>\n    </dependencies>\n\n    <properties></properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-project-jakarta/modules/swagger-jaxrs2-servlet-initializer-v2-jakarta/pom.xml",
    "content": "<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txmlns=\"http://maven.apache.org/POM/4.0.0\"\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <parent>\n        <groupId>io.swagger.core.v3</groupId>\n        <artifactId>swagger-project-jakarta</artifactId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../..</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-jaxrs2-servlet-initializer-v2-jakarta</artifactId>\n    <name>swagger-jaxrs2-servlet-initializer-v2-jakarta</name>\n    <description>swagger-jaxrs2-servlet-initializer-v2-jakarta</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.eclipse.transformer</groupId>\n                <artifactId>transformer-maven-plugin</artifactId>\n                <version>${transformer-maven-plugin-version}</version>\n                <extensions>true</extensions>\n                <configuration>\n                    <rules>\n                        <jakartaDefaults>true</jakartaDefaults>\n                    </rules>\n                    <baseName>${project.build.finalName}-jakarta</baseName>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>default-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-jaxrs2-servlet-initializer-v2</artifactId>\n                                <version>${project.version}</version>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>javadoc-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-jaxrs2-servlet-initializer-v2</artifactId>\n                                <version>${project.version}</version>\n                                <classifier>javadoc</classifier>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>source-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-jaxrs2-servlet-initializer-v2</artifactId>\n                                <version>${project.version}</version>\n                                <classifier>sources</classifier>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-classic</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-core</artifactId>\n            <scope>provided</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2-jakarta</artifactId>\n            <version>${project.version}</version>\n            <scope>provided</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>jakarta.ws.rs</groupId>\n            <artifactId>jakarta.ws.rs-api</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>jakarta.servlet</groupId>\n            <artifactId>jakarta.servlet-api</artifactId>\n            <scope>provided</scope>\n        </dependency>\n    </dependencies>\n\n    <properties></properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-project-jakarta/modules/swagger-maven-plugin-jakarta/pom.xml",
    "content": "<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txmlns=\"http://maven.apache.org/POM/4.0.0\"\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <parent>\n        <groupId>io.swagger.core.v3</groupId>\n        <artifactId>swagger-project-jakarta</artifactId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../..</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-maven-plugin-jakarta</artifactId>\n    <packaging>maven-plugin</packaging>\n    <name>swagger-maven-plugin-jakarta</name>\n    <description>swagger-maven-plugin-jakarta</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-dependency-plugin</artifactId>\n                <version>3.6.1</version>\n                <executions>\n                    <execution>\n                        <id>get-original-artifacts</id>\n                        <phase>generate-resources</phase>\n                        <goals>\n                            <goal>copy</goal>\n                        </goals>\n                        <configuration>\n                            <artifactItems>\n                                <!-- Get the original sources JAR -->\n                                <artifactItem>\n                                    <groupId>io.swagger.core.v3</groupId>\n                                    <artifactId>swagger-maven-plugin</artifactId>\n                                    <version>${project.version}</version>\n                                    <classifier>sources</classifier>\n                                    <type>jar</type>\n                                    <outputDirectory>${project.build.directory}</outputDirectory>\n                                    <destFileName>${project.artifactId}-${project.version}-sources.jar</destFileName>\n                                </artifactItem>\n                                <!-- Get the original javadoc JAR -->\n                                <artifactItem>\n                                    <groupId>io.swagger.core.v3</groupId>\n                                    <artifactId>swagger-maven-plugin</artifactId>\n                                    <version>${project.version}</version>\n                                    <classifier>javadoc</classifier>\n                                    <type>jar</type>\n                                    <outputDirectory>${project.build.directory}</outputDirectory>\n                                    <destFileName>${project.artifactId}-${project.version}-javadoc.jar</destFileName>\n                                </artifactItem>\n                            </artifactItems>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>com.coderplus.maven.plugins</groupId>\n                <artifactId>copy-rename-maven-plugin</artifactId>\n                <version>1.0.1</version>\n                <executions>\n                    <execution>\n                        <id>copy-file</id>\n                        <phase>compile</phase>\n                        <goals>\n                            <goal>rename</goal>\n                        </goals>\n                        <configuration>\n                            <ignoreFileNotFoundOnIncremental>true</ignoreFileNotFoundOnIncremental>\n                            <overWrite>true</overWrite>\n                            <sourceFile>${project.basedir}/transformed/${project.artifactId}-${project.version}.maven-plugin</sourceFile>\n                            <destinationFile>${project.basedir}/transformed/${project.artifactId}-${project.version}.jar</destinationFile>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <artifactId>maven-resources-plugin</artifactId>\n                <!-- keep 3.1.0 until root cause of error is identified. see https://issues.apache.org/jira/browse/MRESOURCES-265 -->\n                <version>3.1.0</version>\n                <executions>\n                    <execution>\n                        <id>copy-resources</id>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>copy-resources</goal>\n                        </goals>\n                        <configuration>\n                            <outputDirectory>${project.build.directory}</outputDirectory>\n                            <overwrite>true</overwrite>\n                            <resources>\n                                <resource>\n                                    <directory>transformed</directory>\n                                    <filtering>false</filtering>\n                                    <includes>\n                                        <include>${project.artifactId}-${project.version}.jar</include>\n                                    </includes>\n                                </resource>\n                            </resources>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <version>1.6.0</version>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>java</goal>\n                        </goals>\n                        <configuration>\n                            <mainClass>io.swagger.v3.plugin.maven.jakarta.JakartaTransformer</mainClass>\n                            <arguments>\n                                <argument>${project.build.directory}/${project.artifactId}-${project.version}.jar</argument>\n                                <argument>${project.build.directory}/transformertemp</argument>\n                                <argument>${jakarta.ws-version}</argument>\n                                <argument>${jakarta.activation-api-version}</argument>\n                                <argument>${jackson-version}</argument>\n                            </arguments>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-plugin-plugin</artifactId>\n                <version>3.7.0</version>\n                <configuration>\n                    <!-- see http://jira.codehaus.org/browse/MNG-5346 -->\n                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>mojo-descriptor</id>\n                        <goals>\n                            <goal>descriptor</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>build-helper-maven-plugin</artifactId>\n                <version>3.4.0</version>\n                <executions>\n                    <execution>\n                        <id>attach-artifacts</id>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>attach-artifact</goal>\n                        </goals>\n                        <configuration>\n                            <artifacts>\n                                <artifact>\n                                    <file>${project.build.directory}/${project.artifactId}-${project.version}-sources.jar</file>\n                                    <type>jar</type>\n                                    <classifier>sources</classifier>\n                                </artifact>\n                                <artifact>\n                                    <file>${project.build.directory}/${project.artifactId}-${project.version}-javadoc.jar</file>\n                                    <type>jar</type>\n                                    <classifier>javadoc</classifier>\n                                </artifact>\n                            </artifacts>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-plugin-api</artifactId>\n            <version>${maven.version}</version>\n            <scope>provided</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-component-annotations</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-classworlds</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-core</artifactId>\n            <version>${maven.version}</version>\n            <scope>provided</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.plugin-tools</groupId>\n            <artifactId>maven-plugin-annotations</artifactId>\n            <version>3.15.1</version>\n            <scope>provided</scope>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.apache.maven</groupId>\n                    <artifactId>maven-artifact</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.commons</groupId>\n            <artifactId>commons-lang3</artifactId>\n            <version>${commons-lang-version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.codehaus.plexus</groupId>\n            <artifactId>plexus-utils</artifactId>\n            <version>3.6.0</version>\n        </dependency>\n        <dependency>\n            <groupId>org.codehaus.plexus</groupId>\n            <artifactId>plexus-component-annotations</artifactId>\n            <version>2.2.0</version>\n        </dependency>\n\n        <dependency>\n            <groupId>io.swagger.core.v3</groupId>\n            <artifactId>swagger-jaxrs2-jakarta</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n\n    </dependencies>\n\n    <properties>\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n        <maven.version>3.9.9</maven.version>\n    </properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-project-jakarta/modules/swagger-maven-plugin-jakarta/src/main/java/io/swagger/v3/plugin/maven/jakarta/JakartaTransformer.java",
    "content": "package io.swagger.v3.plugin.maven.jakarta;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.io.BufferedInputStream;\nimport java.io.BufferedReader;\nimport java.io.BufferedWriter;\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.OutputStream;\nimport java.io.OutputStreamWriter;\nimport java.io.PrintWriter;\nimport java.net.URI;\nimport java.nio.file.CopyOption;\nimport java.nio.file.FileSystem;\nimport java.nio.file.FileSystems;\nimport java.nio.file.FileVisitResult;\nimport java.nio.file.Files;\nimport java.nio.file.LinkOption;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport java.nio.file.SimpleFileVisitor;\nimport java.nio.file.StandardCopyOption;\nimport java.nio.file.attribute.BasicFileAttributes;\nimport java.util.Comparator;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\nimport java.util.stream.Collectors;\nimport java.util.stream.Stream;\nimport java.util.zip.ZipEntry;\nimport java.util.zip.ZipInputStream;\nimport java.util.zip.ZipOutputStream;\n\n/**\n * Transforms swagger-maven-plugin jar file to be used with Jakarta namespace using artifactId swagger-maven-plugin-jakarta\n *\n */\npublic class JakartaTransformer {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(JakartaTransformer.class);\n\n\n    /*\n     *  Substitution tokens + regex\n     */\n    private static Set<String> files =\n            Stream.of(\n                    // \"META-INF/MANIFEST.MF\",\n                    \"META-INF/maven/plugin.xml\",\n                    \"META-INF/maven/io.swagger.core.v3/swagger-maven-plugin/plugin-help.xml\",\n                    // \"META-INF/plexus/components.xml\",\n                    \"META-INF/maven/io.swagger.core.v3/swagger-maven-plugin/pom.xml\",\n                    \"META-INF/maven/io.swagger.core.v3/swagger-maven-plugin/pom.properties\")\n                    .collect(Collectors.toCollection(HashSet::new));\n\n    private static final String jakartaXmlBindDep = \"<dependency>\\n\" +\n            \"                <groupId>jakarta.xml.bind</groupId>\\n\" +\n            \"                <artifactId>jakarta.xml.bind-api</artifactId>\\n\" +\n            \"                <version>VERSION</version>\\n\" +\n            \"            </dependency>\\n\";\n\n    private static final String jakartaXmlBindRegex = \"^.*(<dependency>.*jakarta\\\\.xml\\\\.bind((?!</dependency>).)*</dependency>).*$\";\n\n    private static final String jakartaValidationDep = \"<dependency>\\n\" +\n            \"                <groupId>jakarta.validation</groupId>\\n\" +\n            \"                <artifactId>jakarta.validation-api</artifactId>\\n\" +\n            \"                <version>VERSION</version>\\n\" +\n            \"            </dependency>\\n\";\n\n    private static final String jakartaValidationRegex = \"^.*(<dependency>.*jakarta\\\\.validation((?!</dependency>).)*</dependency>).*$\";\n\n    private static final String jacksonJsonDep = \"<dependency>\\n\" +\n            \"                <groupId>com.fasterxml.jackson.jakarta.rs</groupId>\\n\" +\n            \"                <artifactId>jackson-jakarta-rs-json-provider</artifactId>\\n\" +\n            \"                <version>VERSION</version>\\n\" +\n            \"                <exclusions>\\n\" +\n            \"                    <exclusion>\\n\" +\n            \"                        <groupId>jakarta.activation</groupId>\\n\" +\n            \"                        <artifactId>jakarta.activation-api</artifactId>\\n\" +\n            \"                    </exclusion>\\n\" +\n            \"                    <exclusion>\\n\" +\n            \"                        <groupId>jakarta.xml.bind</groupId>\\n\" +\n            \"                        <artifactId>jakarta.xml.bind-api</artifactId>\\n\" +\n            \"                    </exclusion>\\n\" +\n            \"                </exclusions>\\n\" +\n            \"            </dependency>\";\n\n    private static final String jacksonJsonRegex = \"^.*(<dependency>.*jackson\\\\-jaxrs\\\\-json((?!</dependency>).)*</dependency>).*$\";\n\n    private static final String jacksonBaseDep = \"<dependency>\\n\" +\n            \"                <groupId>com.fasterxml.jackson.jakarta.rs</groupId>\\n\" +\n            \"                <artifactId>jackson-jakarta-rs-base</artifactId>\\n\" +\n            \"                <version>VERSION</version>\\n\" +\n            \"            </dependency>\";\n\n    private static final String jacksonBaseRegex = \"^.*(<dependency>.*jackson\\\\-jaxrs\\\\-base((?!</dependency>).)*</dependency>).*$\";\n\n    private static final String jacksonJaxbDep = \"<dependency>\\n\" +\n            \"                <groupId>com.fasterxml.jackson.module</groupId>\\n\" +\n            \"                <artifactId>jackson-module-jakarta-xmlbind-annotations</artifactId>\\n\" +\n            \"                <version>VERSION</version>\\n\" +\n            \"                <exclusions>\\n\" +\n            \"                    <exclusion>\\n\" +\n            \"                        <groupId>jakarta.activation</groupId>\\n\" +\n            \"                        <artifactId>jakarta.activation-api</artifactId>\\n\" +\n            \"                    </exclusion>\\n\" +\n            \"                    <exclusion>\\n\" +\n            \"                        <groupId>jakarta.xml.bind</groupId>\\n\" +\n            \"                        <artifactId>jakarta.xml.bind-api</artifactId>\\n\" +\n            \"                    </exclusion>\\n\" +\n            \"                    <exclusion>\\n\" +\n            \"                        <groupId>com.sun.activation</groupId>\\n\" +\n            \"                        <artifactId>jakarta.activation</artifactId>\\n\" +\n            \"                    </exclusion>\" +\n            \"                </exclusions>\\n\" +\n            \"            </dependency>\";\n\n    private static final String jacksonJaxbRegex = \"^.*(<dependency>.*jackson\\\\-module\\\\-jaxb((?!</dependency>).)*</dependency>).*$\";\n\n    private static final String jakartaActivationDep = \"<dependency>\\n\" +\n            \"                <groupId>jakarta.activation</groupId>\\n\" +\n            \"                <artifactId>jakarta.activation-api</artifactId>\\n\" +\n            \"                <version>VERSION</version>\\n\" +\n            \"            </dependency>\";\n\n    private static final String jakartaActivationRegex = \"^.*(<dependency>.*jakarta\\\\.activation((?!</dependency>).)*</dependency>).*$\";\n\n    /**\n     *\n     * Extracts Jar into temp directory\n     *\n     */\n    private static void extract(String inPath, String outPath) throws Exception {\n\n        Path target = Paths.get(outPath);\n        Path source = Paths.get(inPath);\n\n        try (ZipInputStream zis = new ZipInputStream(new FileInputStream(source.toFile()))) {\n            ZipEntry zipEntry = zis.getNextEntry();\n\n            while (zipEntry != null) {\n                Path path = target.resolve(zipEntry.getName()).normalize();\n\n                if (!path.startsWith(target + File.separator)) {\n                    throw new IOException(\"Entry is outside of the target dir: \" + zipEntry.getName());\n                }\n\n                if (zipEntry.isDirectory()) {\n                    if (!Files.isDirectory(path)) {\n                        Files.createDirectories(path);\n                    }\n                } else {\n                    // fix for Windows-created archives\n                    Path parent = path.getParent();\n                    if (!Files.isDirectory(parent)) {\n                        Files.createDirectories(parent);\n                    }\n\n                    // write file content\n                    try (OutputStream os = Files.newOutputStream(path)) {\n                        byte[] buffer = new byte[1024];\n                        int len;\n                        while ((len = zis.read(buffer)) > 0) {\n                            os.write(buffer, 0, len);\n                        }\n                    }\n                }\n                zipEntry = zis.getNextEntry();\n            }\n            zis.closeEntry();\n        }\n    }\n\n    /**\n     *\n     * Compress temp directory back into Jar after transformed\n     *\n     */\n    public static void jar(Path sourcePath, String outJarPath) throws IOException {\n\n        URI uri = URI.create(\"jar:\" + Paths.get(outJarPath).normalize().toUri());\n\n        Files.walkFileTree(sourcePath, new SimpleFileVisitor<Path>() {\n            @Override\n            public FileVisitResult visitFile(Path file,\n                                             BasicFileAttributes attributes) {\n\n                if (attributes.isSymbolicLink()) {\n                    return FileVisitResult.CONTINUE;\n                }\n\n                Map<String, String> env = new HashMap<>();\n                env.put(\"create\", \"true\");\n\n                try (FileSystem zipfs = FileSystems.newFileSystem(uri, env)) {\n\n                    Path targetFile = sourcePath.relativize(file);\n                    Path pathInZipfile = zipfs.getPath(targetFile.toString());\n\n                    if (pathInZipfile.getParent() != null) {\n                        Files.createDirectories(pathInZipfile.getParent());\n                    }\n\n                    CopyOption[] options = {\n                            StandardCopyOption.REPLACE_EXISTING,\n                            StandardCopyOption.COPY_ATTRIBUTES,\n                            LinkOption.NOFOLLOW_LINKS\n                    };\n                    Files.copy(file, pathInZipfile, options);\n\n                } catch (IOException e) {\n                    LOGGER.error(\"Error copying file '{}' into ZIP filesystem\", file, e);\n                }\n\n                return FileVisitResult.CONTINUE;\n            }\n\n            @Override\n            public FileVisitResult visitFileFailed(Path file, IOException exc) {\n                //\n                return FileVisitResult.CONTINUE;\n            }\n\n        });\n\n    }\n\n    /**\n     *\n     * Replaces swagger artifact adding `-jakarta` suffix\n     *\n     */\n    private static void replaceInJar(String filePath) throws Exception {\n        try (FileInputStream fis = new FileInputStream(filePath);\n             BufferedInputStream bis = new BufferedInputStream(fis);\n             ZipInputStream zis = new ZipInputStream(bis);\n             ZipOutputStream out = new ZipOutputStream(new FileOutputStream(filePath + \".jar\"))) {\n\n            for (ZipEntry zipEntry; (zipEntry = zis.getNextEntry()) != null; ) {\n                out.putNextEntry(new ZipEntry(zipEntry.getName()));\n\n                if (files.contains(zipEntry.getName())) {\n                    BufferedReader reader = new BufferedReader(new InputStreamReader(zis));\n                    PrintWriter writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(out)));\n                    for (String line; (line = reader.readLine()) != null; ) {\n                        line = line.replace(\"swagger-maven-plugin\", \"swagger-maven-plugin-jakarta\");\n                        line = line.replace(\"swagger-project\", \"swagger-project-jakarta\");\n                        line = line.replace(\"swagger-jaxrs2\", \"swagger-jaxrs2-jakarta\");\n                        line = line.replace(\"swagger-models\", \"swagger-models-jakarta\");\n                        line = line.replace(\"swagger-annotations\", \"swagger-annotations-jakarta\");\n                        line = line.replace(\"swagger-core\", \"swagger-core-jakarta\");\n                        line = line.replace(\"swagger-integration\", \"swagger-integration-jakarta\");\n                        writer.println(line);\n                    }\n                    writer.flush();\n                } else {\n                    byte[] buf = new byte[8192];\n                    int length;\n                    while ((length = zis.read(buf)) > 0) {\n                        out.write(buf, 0, length);\n                    }\n                }\n\n            }\n        }\n        Files.delete(Paths.get(filePath));\n        Files.move(Paths.get(filePath + \".jar\"), Paths.get(filePath));\n\n    }\n\n    public static void main(String[] args) throws Exception {\n        String filePath = args[0];\n        String outPath = args[1];\n        String jakartaVersion = args[2];\n        String jakartaActivationVersion = args[3];\n        String jacksonVersion = args[4];\n\n        replaceInJar(filePath);\n        extract(filePath, outPath);\n\n        // rename dir\n        Files.move(Paths.get(outPath + File.separator +\n                        \"META-INF\" + File.separator +\n                        \"maven\" + File.separator +\n                        \"io.swagger.core.v3\" + File.separator +\n                        \"swagger-maven-plugin\"),\n                Paths.get(outPath + File.separator +\n                        \"META-INF\" + File.separator +\n                        \"maven\" + File.separator +\n                        \"io.swagger.core.v3\" + File.separator +\n                        \"swagger-maven-plugin-jakarta\")\n        );\n\n        Path pluginXmlPath = Paths.get(\n                outPath +\n                        File.separator + \"META-INF\" +\n                        File.separator + \"maven\" +\n                        File.separator + \"plugin.xml\");\n        String pluginXml = new String(Files.readAllBytes(pluginXmlPath));\n        Matcher m = Pattern.compile(jakartaXmlBindRegex, Pattern.DOTALL).matcher(pluginXml);\n        while (m.find()) {\n            pluginXml = pluginXml.substring(m.start(), m.start(1)) +\n                    jakartaXmlBindDep.replace(\"VERSION\", jakartaVersion) +\n                    pluginXml.substring(m.end(1), m.end());\n        }\n\n        m = Pattern.compile(jakartaValidationRegex, Pattern.DOTALL).matcher(pluginXml);\n        while (m.find()) {\n            pluginXml = pluginXml.substring(m.start(), m.start(1)) +\n                    jakartaValidationDep.replace(\"VERSION\", jakartaVersion) +\n                    pluginXml.substring(m.end(1), m.end());\n        }\n\n        m = Pattern.compile(jacksonJsonRegex, Pattern.DOTALL).matcher(pluginXml);\n        while (m.find()) {\n            pluginXml = pluginXml.substring(m.start(), m.start(1)) +\n                    jacksonJsonDep.replace(\"VERSION\", jacksonVersion) +\n                    pluginXml.substring(m.end(1), m.end());\n        }\n\n        m = Pattern.compile(jacksonBaseRegex, Pattern.DOTALL).matcher(pluginXml);\n        while (m.find()) {\n            pluginXml = pluginXml.substring(m.start(), m.start(1)) +\n                    jacksonBaseDep.replace(\"VERSION\", jacksonVersion) +\n                    pluginXml.substring(m.end(1), m.end());\n        }\n\n        m = Pattern.compile(jacksonJaxbRegex, Pattern.DOTALL).matcher(pluginXml);\n        while (m.find()) {\n            pluginXml = pluginXml.substring(m.start(), m.start(1)) +\n                    jacksonJaxbDep.replace(\"VERSION\", jacksonVersion) +\n                    pluginXml.substring(m.end(1), m.end());\n        }\n\n        m = Pattern.compile(jakartaActivationRegex, Pattern.DOTALL).matcher(pluginXml);\n        while (m.find()) {\n            pluginXml = pluginXml.substring(m.start(), m.start(1)) +\n                    jakartaActivationDep.replace(\"VERSION\", jakartaActivationVersion) +\n                    pluginXml.substring(m.end(1), m.end());\n        }\n\n        // write back to plugin.xml file\n        Files.write(pluginXmlPath, pluginXml.getBytes());\n\n        // delete the original jar\n        Files.delete(Paths.get(filePath));\n        // compress the new jar\n        jar(Paths.get(outPath), filePath);\n        // delete the temp directory\n        Files.walk(Paths.get(outPath))\n                .sorted(Comparator.reverseOrder())\n                .map(Path::toFile)\n                .forEach(File::delete);\n\n    }\n\n}\n"
  },
  {
    "path": "modules/swagger-project-jakarta/modules/swagger-maven-plugin-jakarta/transformed/README.md",
    "content": "#### Don't delete\n\nTarget directory for eclipse transformer plugin;  Jakarta EE 9+ artifacts are generated in this directory\n"
  },
  {
    "path": "modules/swagger-project-jakarta/modules/swagger-models-jakarta/pom.xml",
    "content": "<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txmlns=\"http://maven.apache.org/POM/4.0.0\"\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <parent>\n        <groupId>io.swagger.core.v3</groupId>\n        <artifactId>swagger-project-jakarta</artifactId>\n        <version>2.2.46-SNAPSHOT</version>\n        <relativePath>../..</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>swagger-models-jakarta</artifactId>\n    <name>swagger-models-jakarta</name>\n    <description>swagger-models-jakarta</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.eclipse.transformer</groupId>\n                <artifactId>transformer-maven-plugin</artifactId>\n                <version>${transformer-maven-plugin-version}</version>\n                <extensions>true</extensions>\n                <configuration>\n                    <rules>\n                        <jakartaDefaults>true</jakartaDefaults>\n                    </rules>\n                    <baseName>${project.build.finalName}-jakarta</baseName>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>default-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-models</artifactId>\n                                <version>${project.version}</version>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>javadoc-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-models</artifactId>\n                                <version>${project.version}</version>\n                                <classifier>javadoc</classifier>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>source-jar</id>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                        <configuration>\n                            <artifact>\n                                <groupId>${project.groupId}</groupId>\n                                <artifactId>swagger-models</artifactId>\n                                <version>${project.version}</version>\n                                <classifier>sources</classifier>\n                            </artifact>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>com.fasterxml.jackson.core</groupId>\n            <artifactId>jackson-annotations</artifactId>\n        </dependency>\n    </dependencies>\n\n    <properties></properties>\n</project>\n"
  },
  {
    "path": "modules/swagger-project-jakarta/pom.xml",
    "content": "<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>io.swagger.core.v3</groupId>\n    <artifactId>swagger-project-jakarta</artifactId>\n    <packaging>pom</packaging>\n    <name>swagger-project-jakarta</name>\n    <description>swagger-project-jakarta</description>\n    <version>2.2.46-SNAPSHOT</version>\n    <url>https://github.com/swagger-api/swagger-core</url>\n    <scm>\n        <connection>scm:git:git@github.com:swagger-api/swagger-core.git</connection>\n        <developerConnection>scm:git:git@github.com:swagger-api/swagger-core.git</developerConnection>\n        <url>https://github.com/swagger-api/swagger-core</url>\n    </scm>\n    <prerequisites>\n        <maven>2.2.0</maven>\n    </prerequisites>\n    <developers>\n        <developer>\n            <id>frantuma</id>\n            <name>Francesco Tumanischvili</name>\n            <email>frantuma@yahoo.com</email>\n        </developer>\n    </developers>\n    <issueManagement>\n        <system>github</system>\n        <url>https://github.com/swagger-api/swagger-core/issues</url>\n    </issueManagement>\n    <mailingLists>\n        <mailingList>\n            <name>swagger-swaggersocket</name>\n            <archive>https://groups.google.com/forum/#!forum/swagger-swaggersocket</archive>\n        </mailingList>\n    </mailingLists>\n    <licenses>\n        <license>\n            <name>Apache License 2.0</name>\n            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>\n            <distribution>repo</distribution>\n        </license>\n    </licenses>\n    <build>\n        <defaultGoal>install</defaultGoal>\n        <directory>target</directory>\n        <finalName>${project.artifactId}-${project.version}</finalName>\n        <resources>\n            <resource>\n                <targetPath>META-INF</targetPath>\n                <directory>../../../..</directory>\n                <filtering>true</filtering>\n                <includes>\n                    <include>NOTICE</include>\n                    <include>LICENSE</include>\n                </includes>\n            </resource>\n        </resources>\n        <plugins>\n            <plugin>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <version>3.11.0</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-enforcer-plugin</artifactId>\n                <version>${enforcer-plugin-version}</version>\n                <executions>\n                    <execution>\n                        <id>enforce-versions</id>\n                        <goals>\n                            <goal>enforce</goal>\n                        </goals>\n                        <configuration>\n                            <rules>\n                                <DependencyConvergence/>\n                                <requireReleaseDeps>\n                                    <onlyWhenRelease>true</onlyWhenRelease>\n                                    <message>No Snapshots Allowed!</message>\n                                </requireReleaseDeps>\n                                <requireMavenVersion>\n                                    <version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>\n                                    <message>Maven 2.1.0 and 2.2.0 produce incorrect GPG signatures and checksums respectively.</message>\n                                </requireMavenVersion>\n                            </rules>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <artifactId>maven-dependency-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>copy-deps</id>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>copy-dependencies</goal>\n                        </goals>\n                        <configuration>\n                            <outputDirectory>${project.build.directory}/lib</outputDirectory>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.sonatype.central</groupId>\n                <artifactId>central-publishing-maven-plugin</artifactId>\n                <version>0.7.0</version>\n                <extensions>true</extensions>\n                <configuration>\n                    <publishingServerId>central</publishingServerId>\n                    <autoPublish>true</autoPublish>\n                    <waitUntil>published</waitUntil>\n                    <waitMaxTime>3600</waitMaxTime>\n                </configuration>\n            </plugin>\n        </plugins>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-gpg-plugin</artifactId>\n                    <version>1.6</version>\n                    <configuration>\n                        <!-- Prevent `gpg` from using pinentry programs -->\n                        <gpgArguments>\n                            <arg>--pinentry-mode</arg>\n                            <arg>loopback</arg>\n                        </gpgArguments>\n                    </configuration>\n                </plugin>\n                <plugin>\n                    <groupId>org.eclipse.jetty</groupId>\n                    <artifactId>jetty-maven-plugin</artifactId>\n                    <version>${jetty-version}</version>\n                    <dependencies>\n                        <dependency>\n                            <groupId>org.glassfish.jersey.core</groupId>\n                            <artifactId>jersey-server</artifactId>\n                            <version>${jersey2-version}</version>\n                            <exclusions>\n                                <exclusion>\n                                    <groupId>org.javassist</groupId>\n                                    <artifactId>javassist</artifactId>\n                                </exclusion>\n                            </exclusions>\n                        </dependency>\n                        <dependency>\n                            <groupId>org.glassfish.jersey.containers</groupId>\n                            <artifactId>jersey-container-servlet</artifactId>\n                            <version>${jersey2-version}</version>\n                            <exclusions>\n                                <exclusion>\n                                    <groupId>org.javassist</groupId>\n                                    <artifactId>javassist</artifactId>\n                                </exclusion>\n                            </exclusions>\n                        </dependency>\n                        <dependency>\n                            <groupId>org.glassfish.jersey.media</groupId>\n                            <artifactId>jersey-media-multipart</artifactId>\n                            <version>${jersey2-version}</version>\n                            <exclusions>\n                                <exclusion>\n                                    <groupId>org.javassist</groupId>\n                                    <artifactId>javassist</artifactId>\n                                </exclusion>\n                            </exclusions>\n                        </dependency>\n                        <dependency>\n                            <groupId>org.glassfish.jersey.inject</groupId>\n                            <artifactId>jersey-hk2</artifactId>\n                            <version>${jersey2-version}</version>\n                            <exclusions>\n                                <exclusion>\n                                    <groupId>org.javassist</groupId>\n                                    <artifactId>javassist</artifactId>\n                                </exclusion>\n                            </exclusions>\n                        </dependency>\n                    </dependencies>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-enforcer-plugin</artifactId>\n                    <version>${enforcer-plugin-version}</version>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n    <profiles>\n        <profile>\n            <id>release</id>\n            <build>\n                <plugins>\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-gpg-plugin</artifactId>\n                        <version>1.6</version>\n                        <configuration>\n                            <!-- Prevent `gpg` from using pinentry programs -->\n                            <gpgArguments>\n                                <arg>--pinentry-mode</arg>\n                                <arg>loopback</arg>\n                            </gpgArguments>\n                        </configuration>\n                        <executions>\n                            <execution>\n                                <id>sign-artifacts</id>\n                                <phase>verify</phase>\n                                <goals>\n                                    <goal>sign</goal>\n                                </goals>\n                            </execution>\n                        </executions>\n                    </plugin>\n                </plugins>\n            </build>\n        </profile>\n    </profiles>\n    <modules>\n        <module>modules/swagger-annotations-jakarta</module>\n        <module>modules/swagger-models-jakarta</module>\n        <module>modules/swagger-core-jakarta</module>\n        <module>modules/swagger-integration-jakarta</module>\n        <module>modules/swagger-jaxrs2-jakarta</module>\n        <module>modules/swagger-jaxrs2-servlet-initializer-jakarta</module>\n        <module>modules/swagger-jaxrs2-servlet-initializer-v2-jakarta</module>\n        <module>modules/swagger-maven-plugin-jakarta</module>\n\n    </modules>\n    <reporting>\n        <outputDirectory>target/site</outputDirectory>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-javadoc-plugin</artifactId>\n                <version>3.6.2</version>\n                <configuration>\n                    <aggregate>true</aggregate>\n                    <source>1.8</source>\n                    <encoding>UTF-8</encoding>\n                    <maxmemory>1g</maxmemory>\n                    <debug>true</debug>\n                    <links>\n                        <link>https://docs.oracle.com/javase/8/docs/api</link>\n                    </links>\n                    <excludePackageNames/>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jxr-plugin</artifactId>\n                <version>2.5</version>\n                <configuration>\n                    <aggregate>true</aggregate>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-project-info-reports-plugin</artifactId>\n                <version>2.9</version>\n                <reportSets>\n                    <reportSet>\n                        <reports>\n                            <report>project-team</report>\n                        </reports>\n                    </reportSet>\n                </reportSets>\n            </plugin>\n        </plugins>\n    </reporting>\n    <dependencyManagement>\n        <dependencies>\n            <dependency>\n                <groupId>org.apache.maven</groupId>\n                <artifactId>maven-plugin-tools-api</artifactId>\n                <version>3.5.1</version>\n            </dependency>\n            <dependency>\n                <groupId>org.slf4j</groupId>\n                <artifactId>slf4j-api</artifactId>\n                <version>${slf4j-version}</version>\n                <scope>compile</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.slf4j</groupId>\n                <artifactId>slf4j-ext</artifactId>\n                <version>${slf4j-version}</version>\n                <scope>compile</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.slf4j</groupId>\n                <artifactId>slf4j-log4j12</artifactId>\n                <version>${slf4j-version}</version>\n                <scope>provided</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.commons</groupId>\n                <artifactId>commons-lang3</artifactId>\n                <version>${commons-lang-version}</version>\n                <scope>compile</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.httpcomponents</groupId>\n                <artifactId>httpclient</artifactId>\n                <version>${httpcomponents-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>commons-io</groupId>\n                <artifactId>commons-io</artifactId>\n                <version>${commons-io-version}</version>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>io.github.classgraph</groupId>\n                <artifactId>classgraph</artifactId>\n                <version>${classgraph-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>ch.qos.logback</groupId>\n                <artifactId>logback-classic</artifactId>\n                <version>${logback-version}</version>\n                <scope>provided</scope>\n            </dependency>\n            <dependency>\n                <groupId>ch.qos.logback</groupId>\n                <artifactId>logback-core</artifactId>\n                <version>${logback-version}</version>\n                <scope>provided</scope>\n            </dependency>\n            <dependency>\n                <groupId>joda-time</groupId>\n                <artifactId>joda-time</artifactId>\n                <version>${joda-time-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.joda</groupId>\n                <artifactId>joda-convert</artifactId>\n                <version>${joda-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.yaml</groupId>\n                <artifactId>snakeyaml</artifactId>\n                <version>${snakeyaml-version}</version>\n            </dependency>\n\n\n            <!-- JEE / JAKARTA AND RELATED -->\n            <dependency>\n                <groupId>jakarta.servlet</groupId>\n                <artifactId>jakarta.servlet-api</artifactId>\n                <version>${servlet-api-version}</version>\n                <scope>provided</scope>\n            </dependency>\n\n            <dependency>\n                <groupId>jakarta.xml.bind</groupId>\n                <artifactId>jakarta.xml.bind-api</artifactId>\n                <version>${jakarta.xml.bind-api-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>jakarta.activation</groupId>\n                <artifactId>jakarta.activation-api</artifactId>\n                <version>${jakarta.activation-api-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>jakarta.ws.rs</groupId>\n                <artifactId>jakarta.ws.rs-api</artifactId>\n                <version>${jakarta.ws-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>jakarta.validation</groupId>\n                <artifactId>jakarta.validation-api</artifactId>\n                <version>${jakarta.validation-version}</version>\n            </dependency>\n\n\n            <!-- JACKSON -->\n            <dependency>\n                <groupId>com.fasterxml.jackson.core</groupId>\n                <artifactId>jackson-annotations</artifactId>\n                <version>${jackson-annotations-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>com.fasterxml.jackson.core</groupId>\n                <artifactId>jackson-core</artifactId>\n                <version>${jackson-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>com.fasterxml.jackson.core</groupId>\n                <artifactId>jackson-databind</artifactId>\n                <version>${jackson-databind-version}</version>\n                <exclusions>\n                    <exclusion>\n                        <groupId>jakarta.activation</groupId>\n                        <artifactId>jakarta.activation-api</artifactId>\n                    </exclusion>\n                    <exclusion>\n                        <groupId>jakarta.xml.bind</groupId>\n                        <artifactId>jakarta.xml.bind-api</artifactId>\n                    </exclusion>\n                </exclusions>\n            </dependency>\n            <dependency>\n                <groupId>com.fasterxml.jackson.dataformat</groupId>\n                <artifactId>jackson-dataformat-yaml</artifactId>\n                <version>${jackson-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>com.fasterxml.jackson.datatype</groupId>\n                <artifactId>jackson-datatype-jsr310</artifactId>\n                <version>${jackson-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>com.fasterxml.jackson.jakarta.rs</groupId>\n                <artifactId>jackson-jakarta-rs-json-provider</artifactId>\n                <version>${jackson-version}</version>\n                <exclusions>\n                    <exclusion>\n                        <groupId>jakarta.activation</groupId>\n                        <artifactId>jakarta.activation-api</artifactId>\n                    </exclusion>\n                    <exclusion>\n                        <groupId>jakarta.xml.bind</groupId>\n                        <artifactId>jakarta.xml.bind-api</artifactId>\n                    </exclusion>\n                </exclusions>\n            </dependency>\n            <dependency>\n                <groupId>com.fasterxml.jackson.jakarta.rs</groupId>\n                <artifactId>jackson-jakarta-rs-base</artifactId>\n                <version>${jackson-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>com.fasterxml.jackson.module</groupId>\n                <artifactId>jackson-module-jakarta-xmlbind-annotations</artifactId>\n                <version>${jackson-version}</version>\n                <exclusions>\n                    <exclusion>\n                        <groupId>jakarta.activation</groupId>\n                        <artifactId>jakarta.activation-api</artifactId>\n                    </exclusion>\n                    <exclusion>\n                        <groupId>jakarta.xml.bind</groupId>\n                        <artifactId>jakarta.xml.bind-api</artifactId>\n                    </exclusion>\n                    <exclusion>\n                        <groupId>com.sun.activation</groupId>\n                        <artifactId>jakarta.activation</artifactId>\n                    </exclusion>\n                </exclusions>\n            </dependency>\n\n            <dependency>\n                <groupId>com.google.guava</groupId>\n                <artifactId>guava</artifactId>\n                <version>${guava-version}</version>\n                <scope>test</scope>\n            </dependency>\n        </dependencies>\n    </dependencyManagement>\n    <properties>\n        <maven.compiler.release>8</maven.compiler.release>\n        <joda-version>2.2.4</joda-version>\n        <joda-time-version>2.13.0</joda-time-version>\n        <snakeyaml-version>2.3</snakeyaml-version>\n        <jakarta.ws-version>3.1.0</jakarta.ws-version>\n        <jakarta.validation-version>3.0.2</jakarta.validation-version>\n        <jakarta.xml.bind-api-version>3.0.1</jakarta.xml.bind-api-version>\n        <jakarta.activation-api-version>2.1.3</jakarta.activation-api-version>\n        <bnd-version>6.4.0</bnd-version>\n        <servlet-api-version>5.0.0</servlet-api-version>\n        <jersey2-version>3.1.10</jersey2-version>\n        <jackson-version>2.21.1</jackson-version>\n        <jackson-annotations-version>2.21</jackson-annotations-version>\n        <jackson-databind-version>2.21.1</jackson-databind-version>\n        <logback-version>1.5.25</logback-version>\n        <classgraph-version>4.8.184</classgraph-version>\n        <guava-version>32.1.3-jre</guava-version>\n        <ant-version>1.10.15</ant-version>\n        <commons-lang-version>3.20.0</commons-lang-version>\n        <commons-io-version>2.18.0</commons-io-version>\n        <slf4j-version>2.0.9</slf4j-version>\n        <jetty-version>9.4.56.v20240826g</jetty-version>\n        <testng-version>7.9.0</testng-version>\n        <mockito-version>2.28.2</mockito-version>\n        <rest-assured-version>4.5.1</rest-assured-version>\n        <httpcomponents-version>4.5.14</httpcomponents-version>\n        <commons-codec-version>1.17.2</commons-codec-version>\n\n        <surefire-version>2.22.2</surefire-version>\n        <enforcer-plugin-version>3.2.1</enforcer-plugin-version>\n        <failsafe-plugin-version>2.22.2</failsafe-plugin-version>\n\n        <coverage.complexity.minimum>0.90</coverage.complexity.minimum>\n        <coverage.line.minimum>0.90</coverage.line.minimum>\n        <coverage.missed.classes>0</coverage.missed.classes>\n\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n        <transformer-maven-plugin-version>0.5.0</transformer-maven-plugin-version>\n        <maven.version>3.9.9</maven.version>\n        <commons-compress-version>1.27.1</commons-compress-version>\n    </properties>\n</project>\n"
  },
  {
    "path": "mvnw",
    "content": "#!/bin/sh\n# ----------------------------------------------------------------------------\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n# ----------------------------------------------------------------------------\n\n# ----------------------------------------------------------------------------\n# Apache Maven Wrapper startup batch script, version 3.2.0\n#\n# Required ENV vars:\n# ------------------\n#   JAVA_HOME - location of a JDK home dir\n#\n# Optional ENV vars\n# -----------------\n#   MAVEN_OPTS - parameters passed to the Java VM when running Maven\n#     e.g. to debug Maven itself, use\n#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000\n#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files\n# ----------------------------------------------------------------------------\n\nif [ -z \"$MAVEN_SKIP_RC\" ] ; then\n\n  if [ -f /usr/local/etc/mavenrc ] ; then\n    . /usr/local/etc/mavenrc\n  fi\n\n  if [ -f /etc/mavenrc ] ; then\n    . /etc/mavenrc\n  fi\n\n  if [ -f \"$HOME/.mavenrc\" ] ; then\n    . \"$HOME/.mavenrc\"\n  fi\n\nfi\n\n# OS specific support.  $var _must_ be set to either true or false.\ncygwin=false;\ndarwin=false;\nmingw=false\ncase \"$(uname)\" in\n  CYGWIN*) cygwin=true ;;\n  MINGW*) mingw=true;;\n  Darwin*) darwin=true\n    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home\n    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html\n    if [ -z \"$JAVA_HOME\" ]; then\n      if [ -x \"/usr/libexec/java_home\" ]; then\n        JAVA_HOME=\"$(/usr/libexec/java_home)\"; export JAVA_HOME\n      else\n        JAVA_HOME=\"/Library/Java/Home\"; export JAVA_HOME\n      fi\n    fi\n    ;;\nesac\n\nif [ -z \"$JAVA_HOME\" ] ; then\n  if [ -r /etc/gentoo-release ] ; then\n    JAVA_HOME=$(java-config --jre-home)\n  fi\nfi\n\n# For Cygwin, ensure paths are in UNIX format before anything is touched\nif $cygwin ; then\n  [ -n \"$JAVA_HOME\" ] &&\n    JAVA_HOME=$(cygpath --unix \"$JAVA_HOME\")\n  [ -n \"$CLASSPATH\" ] &&\n    CLASSPATH=$(cygpath --path --unix \"$CLASSPATH\")\nfi\n\n# For Mingw, ensure paths are in UNIX format before anything is touched\nif $mingw ; then\n  [ -n \"$JAVA_HOME\" ] && [ -d \"$JAVA_HOME\" ] &&\n    JAVA_HOME=\"$(cd \"$JAVA_HOME\" || (echo \"cannot cd into $JAVA_HOME.\"; exit 1); pwd)\"\nfi\n\nif [ -z \"$JAVA_HOME\" ]; then\n  javaExecutable=\"$(which javac)\"\n  if [ -n \"$javaExecutable\" ] && ! [ \"$(expr \"\\\"$javaExecutable\\\"\" : '\\([^ ]*\\)')\" = \"no\" ]; then\n    # readlink(1) is not available as standard on Solaris 10.\n    readLink=$(which readlink)\n    if [ ! \"$(expr \"$readLink\" : '\\([^ ]*\\)')\" = \"no\" ]; then\n      if $darwin ; then\n        javaHome=\"$(dirname \"\\\"$javaExecutable\\\"\")\"\n        javaExecutable=\"$(cd \"\\\"$javaHome\\\"\" && pwd -P)/javac\"\n      else\n        javaExecutable=\"$(readlink -f \"\\\"$javaExecutable\\\"\")\"\n      fi\n      javaHome=\"$(dirname \"\\\"$javaExecutable\\\"\")\"\n      javaHome=$(expr \"$javaHome\" : '\\(.*\\)/bin')\n      JAVA_HOME=\"$javaHome\"\n      export JAVA_HOME\n    fi\n  fi\nfi\n\nif [ -z \"$JAVACMD\" ] ; then\n  if [ -n \"$JAVA_HOME\"  ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n      # IBM's JDK on AIX uses strange locations for the executables\n      JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n      JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n  else\n    JAVACMD=\"$(\\unset -f command 2>/dev/null; \\command -v java)\"\n  fi\nfi\n\nif [ ! -x \"$JAVACMD\" ] ; then\n  echo \"Error: JAVA_HOME is not defined correctly.\" >&2\n  echo \"  We cannot execute $JAVACMD\" >&2\n  exit 1\nfi\n\nif [ -z \"$JAVA_HOME\" ] ; then\n  echo \"Warning: JAVA_HOME environment variable is not set.\"\nfi\n\n# traverses directory structure from process work directory to filesystem root\n# first directory with .mvn subdirectory is considered project base directory\nfind_maven_basedir() {\n  if [ -z \"$1\" ]\n  then\n    echo \"Path not specified to find_maven_basedir\"\n    return 1\n  fi\n\n  basedir=\"$1\"\n  wdir=\"$1\"\n  while [ \"$wdir\" != '/' ] ; do\n    if [ -d \"$wdir\"/.mvn ] ; then\n      basedir=$wdir\n      break\n    fi\n    # workaround for JBEAP-8937 (on Solaris 10/Sparc)\n    if [ -d \"${wdir}\" ]; then\n      wdir=$(cd \"$wdir/..\" || exit 1; pwd)\n    fi\n    # end of workaround\n  done\n  printf '%s' \"$(cd \"$basedir\" || exit 1; pwd)\"\n}\n\n# concatenates all lines of a file\nconcat_lines() {\n  if [ -f \"$1\" ]; then\n    # Remove \\r in case we run on Windows within Git Bash\n    # and check out the repository with auto CRLF management\n    # enabled. Otherwise, we may read lines that are delimited with\n    # \\r\\n and produce $'-Xarg\\r' rather than -Xarg due to word\n    # splitting rules.\n    tr -s '\\r\\n' ' ' < \"$1\"\n  fi\n}\n\nlog() {\n  if [ \"$MVNW_VERBOSE\" = true ]; then\n    printf '%s\\n' \"$1\"\n  fi\n}\n\nBASE_DIR=$(find_maven_basedir \"$(dirname \"$0\")\")\nif [ -z \"$BASE_DIR\" ]; then\n  exit 1;\nfi\n\nMAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-\"$BASE_DIR\"}; export MAVEN_PROJECTBASEDIR\nlog \"$MAVEN_PROJECTBASEDIR\"\n\n##########################################################################################\n# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central\n# This allows using the maven wrapper in projects that prohibit checking in binary data.\n##########################################################################################\nwrapperJarPath=\"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar\"\nif [ -r \"$wrapperJarPath\" ]; then\n    log \"Found $wrapperJarPath\"\nelse\n    log \"Couldn't find $wrapperJarPath, downloading it ...\"\n\n    if [ -n \"$MVNW_REPOURL\" ]; then\n      wrapperUrl=\"$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar\"\n    else\n      wrapperUrl=\"https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar\"\n    fi\n    while IFS=\"=\" read -r key value; do\n      # Remove '\\r' from value to allow usage on windows as IFS does not consider '\\r' as a separator ( considers space, tab, new line ('\\n'), and custom '=' )\n      safeValue=$(echo \"$value\" | tr -d '\\r')\n      case \"$key\" in (wrapperUrl) wrapperUrl=\"$safeValue\"; break ;;\n      esac\n    done < \"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties\"\n    log \"Downloading from: $wrapperUrl\"\n\n    if $cygwin; then\n      wrapperJarPath=$(cygpath --path --windows \"$wrapperJarPath\")\n    fi\n\n    if command -v wget > /dev/null; then\n        log \"Found wget ... using wget\"\n        [ \"$MVNW_VERBOSE\" = true ] && QUIET=\"\" || QUIET=\"--quiet\"\n        if [ -z \"$MVNW_USERNAME\" ] || [ -z \"$MVNW_PASSWORD\" ]; then\n            wget $QUIET \"$wrapperUrl\" -O \"$wrapperJarPath\" || rm -f \"$wrapperJarPath\"\n        else\n            wget $QUIET --http-user=\"$MVNW_USERNAME\" --http-password=\"$MVNW_PASSWORD\" \"$wrapperUrl\" -O \"$wrapperJarPath\" || rm -f \"$wrapperJarPath\"\n        fi\n    elif command -v curl > /dev/null; then\n        log \"Found curl ... using curl\"\n        [ \"$MVNW_VERBOSE\" = true ] && QUIET=\"\" || QUIET=\"--silent\"\n        if [ -z \"$MVNW_USERNAME\" ] || [ -z \"$MVNW_PASSWORD\" ]; then\n            curl $QUIET -o \"$wrapperJarPath\" \"$wrapperUrl\" -f -L || rm -f \"$wrapperJarPath\"\n        else\n            curl $QUIET --user \"$MVNW_USERNAME:$MVNW_PASSWORD\" -o \"$wrapperJarPath\" \"$wrapperUrl\" -f -L || rm -f \"$wrapperJarPath\"\n        fi\n    else\n        log \"Falling back to using Java to download\"\n        javaSource=\"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java\"\n        javaClass=\"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class\"\n        # For Cygwin, switch paths to Windows format before running javac\n        if $cygwin; then\n          javaSource=$(cygpath --path --windows \"$javaSource\")\n          javaClass=$(cygpath --path --windows \"$javaClass\")\n        fi\n        if [ -e \"$javaSource\" ]; then\n            if [ ! -e \"$javaClass\" ]; then\n                log \" - Compiling MavenWrapperDownloader.java ...\"\n                (\"$JAVA_HOME/bin/javac\" \"$javaSource\")\n            fi\n            if [ -e \"$javaClass\" ]; then\n                log \" - Running MavenWrapperDownloader.java ...\"\n                (\"$JAVA_HOME/bin/java\" -cp .mvn/wrapper MavenWrapperDownloader \"$wrapperUrl\" \"$wrapperJarPath\") || rm -f \"$wrapperJarPath\"\n            fi\n        fi\n    fi\nfi\n##########################################################################################\n# End of extension\n##########################################################################################\n\n# If specified, validate the SHA-256 sum of the Maven wrapper jar file\nwrapperSha256Sum=\"\"\nwhile IFS=\"=\" read -r key value; do\n  case \"$key\" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;;\n  esac\ndone < \"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties\"\nif [ -n \"$wrapperSha256Sum\" ]; then\n  wrapperSha256Result=false\n  if command -v sha256sum > /dev/null; then\n    if echo \"$wrapperSha256Sum  $wrapperJarPath\" | sha256sum -c > /dev/null 2>&1; then\n      wrapperSha256Result=true\n    fi\n  elif command -v shasum > /dev/null; then\n    if echo \"$wrapperSha256Sum  $wrapperJarPath\" | shasum -a 256 -c > /dev/null 2>&1; then\n      wrapperSha256Result=true\n    fi\n  else\n    echo \"Checksum validation was requested but neither 'sha256sum' or 'shasum' are available.\"\n    echo \"Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties.\"\n    exit 1\n  fi\n  if [ $wrapperSha256Result = false ]; then\n    echo \"Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.\" >&2\n    echo \"Investigate or delete $wrapperJarPath to attempt a clean download.\" >&2\n    echo \"If you updated your Maven version, you need to update the specified wrapperSha256Sum property.\" >&2\n    exit 1\n  fi\nfi\n\nMAVEN_OPTS=\"$(concat_lines \"$MAVEN_PROJECTBASEDIR/.mvn/jvm.config\") $MAVEN_OPTS\"\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin; then\n  [ -n \"$JAVA_HOME\" ] &&\n    JAVA_HOME=$(cygpath --path --windows \"$JAVA_HOME\")\n  [ -n \"$CLASSPATH\" ] &&\n    CLASSPATH=$(cygpath --path --windows \"$CLASSPATH\")\n  [ -n \"$MAVEN_PROJECTBASEDIR\" ] &&\n    MAVEN_PROJECTBASEDIR=$(cygpath --path --windows \"$MAVEN_PROJECTBASEDIR\")\nfi\n\n# Provide a \"standardized\" way to retrieve the CLI args that will\n# work with both Windows and non-Windows executions.\nMAVEN_CMD_LINE_ARGS=\"$MAVEN_CONFIG $*\"\nexport MAVEN_CMD_LINE_ARGS\n\nWRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain\n\n# shellcheck disable=SC2086 # safe args\nexec \"$JAVACMD\" \\\n  $MAVEN_OPTS \\\n  $MAVEN_DEBUG_OPTS \\\n  -classpath \"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar\" \\\n  \"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}\" \\\n  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG \"$@\"\n"
  },
  {
    "path": "mvnw.cmd",
    "content": "@REM ----------------------------------------------------------------------------\r\n@REM Licensed to the Apache Software Foundation (ASF) under one\r\n@REM or more contributor license agreements.  See the NOTICE file\r\n@REM distributed with this work for additional information\r\n@REM regarding copyright ownership.  The ASF licenses this file\r\n@REM to you under the Apache License, Version 2.0 (the\r\n@REM \"License\"); you may not use this file except in compliance\r\n@REM with the License.  You may obtain a copy of the License at\r\n@REM\r\n@REM    http://www.apache.org/licenses/LICENSE-2.0\r\n@REM\r\n@REM Unless required by applicable law or agreed to in writing,\r\n@REM software distributed under the License is distributed on an\r\n@REM \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n@REM KIND, either express or implied.  See the License for the\r\n@REM specific language governing permissions and limitations\r\n@REM under the License.\r\n@REM ----------------------------------------------------------------------------\r\n\r\n@REM ----------------------------------------------------------------------------\r\n@REM Apache Maven Wrapper startup batch script, version 3.2.0\r\n@REM\r\n@REM Required ENV vars:\r\n@REM JAVA_HOME - location of a JDK home dir\r\n@REM\r\n@REM Optional ENV vars\r\n@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands\r\n@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending\r\n@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven\r\n@REM     e.g. to debug Maven itself, use\r\n@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000\r\n@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files\r\n@REM ----------------------------------------------------------------------------\r\n\r\n@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'\r\n@echo off\r\n@REM set title of command window\r\ntitle %0\r\n@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'\r\n@if \"%MAVEN_BATCH_ECHO%\" == \"on\"  echo %MAVEN_BATCH_ECHO%\r\n\r\n@REM set %HOME% to equivalent of $HOME\r\nif \"%HOME%\" == \"\" (set \"HOME=%HOMEDRIVE%%HOMEPATH%\")\r\n\r\n@REM Execute a user defined script before this one\r\nif not \"%MAVEN_SKIP_RC%\" == \"\" goto skipRcPre\r\n@REM check for pre script, once with legacy .bat ending and once with .cmd ending\r\nif exist \"%USERPROFILE%\\mavenrc_pre.bat\" call \"%USERPROFILE%\\mavenrc_pre.bat\" %*\r\nif exist \"%USERPROFILE%\\mavenrc_pre.cmd\" call \"%USERPROFILE%\\mavenrc_pre.cmd\" %*\r\n:skipRcPre\r\n\r\n@setlocal\r\n\r\nset ERROR_CODE=0\r\n\r\n@REM To isolate internal variables from possible post scripts, we use another setlocal\r\n@setlocal\r\n\r\n@REM ==== START VALIDATION ====\r\nif not \"%JAVA_HOME%\" == \"\" goto OkJHome\r\n\r\necho.\r\necho Error: JAVA_HOME not found in your environment. >&2\r\necho Please set the JAVA_HOME variable in your environment to match the >&2\r\necho location of your Java installation. >&2\r\necho.\r\ngoto error\r\n\r\n:OkJHome\r\nif exist \"%JAVA_HOME%\\bin\\java.exe\" goto init\r\n\r\necho.\r\necho Error: JAVA_HOME is set to an invalid directory. >&2\r\necho JAVA_HOME = \"%JAVA_HOME%\" >&2\r\necho Please set the JAVA_HOME variable in your environment to match the >&2\r\necho location of your Java installation. >&2\r\necho.\r\ngoto error\r\n\r\n@REM ==== END VALIDATION ====\r\n\r\n:init\r\n\r\n@REM Find the project base dir, i.e. the directory that contains the folder \".mvn\".\r\n@REM Fallback to current working directory if not found.\r\n\r\nset MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%\r\nIF NOT \"%MAVEN_PROJECTBASEDIR%\"==\"\" goto endDetectBaseDir\r\n\r\nset EXEC_DIR=%CD%\r\nset WDIR=%EXEC_DIR%\r\n:findBaseDir\r\nIF EXIST \"%WDIR%\"\\.mvn goto baseDirFound\r\ncd ..\r\nIF \"%WDIR%\"==\"%CD%\" goto baseDirNotFound\r\nset WDIR=%CD%\r\ngoto findBaseDir\r\n\r\n:baseDirFound\r\nset MAVEN_PROJECTBASEDIR=%WDIR%\r\ncd \"%EXEC_DIR%\"\r\ngoto endDetectBaseDir\r\n\r\n:baseDirNotFound\r\nset MAVEN_PROJECTBASEDIR=%EXEC_DIR%\r\ncd \"%EXEC_DIR%\"\r\n\r\n:endDetectBaseDir\r\n\r\nIF NOT EXIST \"%MAVEN_PROJECTBASEDIR%\\.mvn\\jvm.config\" goto endReadAdditionalConfig\r\n\r\n@setlocal EnableExtensions EnableDelayedExpansion\r\nfor /F \"usebackq delims=\" %%a in (\"%MAVEN_PROJECTBASEDIR%\\.mvn\\jvm.config\") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a\r\n@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%\r\n\r\n:endReadAdditionalConfig\r\n\r\nSET MAVEN_JAVA_EXE=\"%JAVA_HOME%\\bin\\java.exe\"\r\nset WRAPPER_JAR=\"%MAVEN_PROJECTBASEDIR%\\.mvn\\wrapper\\maven-wrapper.jar\"\r\nset WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain\r\n\r\nset WRAPPER_URL=\"https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar\"\r\n\r\nFOR /F \"usebackq tokens=1,2 delims==\" %%A IN (\"%MAVEN_PROJECTBASEDIR%\\.mvn\\wrapper\\maven-wrapper.properties\") DO (\r\n    IF \"%%A\"==\"wrapperUrl\" SET WRAPPER_URL=%%B\r\n)\r\n\r\n@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central\r\n@REM This allows using the maven wrapper in projects that prohibit checking in binary data.\r\nif exist %WRAPPER_JAR% (\r\n    if \"%MVNW_VERBOSE%\" == \"true\" (\r\n        echo Found %WRAPPER_JAR%\r\n    )\r\n) else (\r\n    if not \"%MVNW_REPOURL%\" == \"\" (\r\n        SET WRAPPER_URL=\"%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar\"\r\n    )\r\n    if \"%MVNW_VERBOSE%\" == \"true\" (\r\n        echo Couldn't find %WRAPPER_JAR%, downloading it ...\r\n        echo Downloading from: %WRAPPER_URL%\r\n    )\r\n\r\n    powershell -Command \"&{\"^\r\n\t\t\"$webclient = new-object System.Net.WebClient;\"^\r\n\t\t\"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {\"^\r\n\t\t\"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');\"^\r\n\t\t\"}\"^\r\n\t\t\"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')\"^\r\n\t\t\"}\"\r\n    if \"%MVNW_VERBOSE%\" == \"true\" (\r\n        echo Finished downloading %WRAPPER_JAR%\r\n    )\r\n)\r\n@REM End of extension\r\n\r\n@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file\r\nSET WRAPPER_SHA_256_SUM=\"\"\r\nFOR /F \"usebackq tokens=1,2 delims==\" %%A IN (\"%MAVEN_PROJECTBASEDIR%\\.mvn\\wrapper\\maven-wrapper.properties\") DO (\r\n    IF \"%%A\"==\"wrapperSha256Sum\" SET WRAPPER_SHA_256_SUM=%%B\r\n)\r\nIF NOT %WRAPPER_SHA_256_SUM%==\"\" (\r\n    powershell -Command \"&{\"^\r\n       \"$hash = (Get-FileHash \\\"%WRAPPER_JAR%\\\" -Algorithm SHA256).Hash.ToLower();\"^\r\n       \"If('%WRAPPER_SHA_256_SUM%' -ne $hash){\"^\r\n       \"  Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';\"^\r\n       \"  Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';\"^\r\n       \"  Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';\"^\r\n       \"  exit 1;\"^\r\n       \"}\"^\r\n       \"}\"\r\n    if ERRORLEVEL 1 goto error\r\n)\r\n\r\n@REM Provide a \"standardized\" way to retrieve the CLI args that will\r\n@REM work with both Windows and non-Windows executions.\r\nset MAVEN_CMD_LINE_ARGS=%*\r\n\r\n%MAVEN_JAVA_EXE% ^\r\n  %JVM_CONFIG_MAVEN_PROPS% ^\r\n  %MAVEN_OPTS% ^\r\n  %MAVEN_DEBUG_OPTS% ^\r\n  -classpath %WRAPPER_JAR% ^\r\n  \"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%\" ^\r\n  %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*\r\nif ERRORLEVEL 1 goto error\r\ngoto end\r\n\r\n:error\r\nset ERROR_CODE=1\r\n\r\n:end\r\n@endlocal & set ERROR_CODE=%ERROR_CODE%\r\n\r\nif not \"%MAVEN_SKIP_RC%\"==\"\" goto skipRcPost\r\n@REM check for post script, once with legacy .bat ending and once with .cmd ending\r\nif exist \"%USERPROFILE%\\mavenrc_post.bat\" call \"%USERPROFILE%\\mavenrc_post.bat\"\r\nif exist \"%USERPROFILE%\\mavenrc_post.cmd\" call \"%USERPROFILE%\\mavenrc_post.cmd\"\r\n:skipRcPost\r\n\r\n@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'\r\nif \"%MAVEN_BATCH_PAUSE%\"==\"on\" pause\r\n\r\nif \"%MAVEN_TERMINATE_CMD%\"==\"on\" exit %ERROR_CODE%\r\n\r\ncmd /C exit /B %ERROR_CODE%\r\n"
  },
  {
    "path": "pom.xml",
    "content": "<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>io.swagger.core.v3</groupId>\n    <artifactId>swagger-project</artifactId>\n    <packaging>pom</packaging>\n    <name>swagger-project</name>\n    <description>swagger-project</description>\n    <version>2.2.46-SNAPSHOT</version>\n    <url>https://github.com/swagger-api/swagger-core</url>\n    <scm>\n        <connection>scm:git:git@github.com:swagger-api/swagger-core.git</connection>\n        <developerConnection>scm:git:git@github.com:swagger-api/swagger-core.git</developerConnection>\n        <url>https://github.com/swagger-api/swagger-core</url>\n    </scm>\n    <prerequisites>\n        <maven>2.2.0</maven>\n    </prerequisites>\n    <developers>\n        <developer>\n            <id>frantuma</id>\n            <name>Francesco Tumanischvili</name>\n            <email>frantuma@yahoo.com</email>\n        </developer>\n        <developer>\n            <id>fehguy</id>\n            <name>Tony Tam</name>\n            <email>fehguy@gmail.com</email>\n        </developer>\n        <developer>\n            <id>webron</id>\n            <name>Ron Ratovsky</name>\n            <email>webron@gmail.com</email>\n        </developer>\n    </developers>\n    <issueManagement>\n        <system>github</system>\n        <url>https://github.com/swagger-api/swagger-core/issues</url>\n    </issueManagement>\n    <mailingLists>\n        <mailingList>\n            <name>swagger-swaggersocket</name>\n            <archive>https://groups.google.com/forum/#!forum/swagger-swaggersocket</archive>\n        </mailingList>\n    </mailingLists>\n    <licenses>\n        <license>\n            <name>Apache License 2.0</name>\n            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>\n            <distribution>repo</distribution>\n        </license>\n    </licenses>\n    <build>\n        <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>\n        <outputDirectory>target/classes</outputDirectory>\n        <testOutputDirectory>target/test-classes</testOutputDirectory>\n        <resources>\n            <resource>\n                <directory>src/main/resources</directory>\n                <excludes>\n                    <exclude>logback.xml</exclude>\n                </excludes>\n            </resource>\n            <resource>\n                <targetPath>META-INF</targetPath>\n                <directory>../..</directory>\n                <filtering>true</filtering>\n                <includes>\n                    <include>NOTICE</include>\n                    <include>LICENSE</include>\n                </includes>\n            </resource>\n        </resources>\n        <extensions>\n            <extension>\n                <groupId>org.jvnet.wagon-svn</groupId>\n                <artifactId>wagon-svn</artifactId>\n                <version>1.12</version>\n            </extension>\n            <extension>\n                <groupId>org.apache.maven.wagon</groupId>\n                <artifactId>wagon-ssh-external</artifactId>\n                <version>3.5.3</version>\n            </extension>\n            <extension>\n                <groupId>org.apache.maven.wagon</groupId>\n                <artifactId>wagon-webdav</artifactId>\n                <version>1.0-beta-2</version>\n            </extension>\n        </extensions>\n        <defaultGoal>install</defaultGoal>\n        <directory>target</directory>\n        <finalName>${project.artifactId}-${project.version}</finalName>\n        <plugins>\n            <plugin>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <version>3.11.0</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-enforcer-plugin</artifactId>\n                <version>${enforcer-plugin-version}</version>\n                <executions>\n                    <execution>\n                        <id>enforce-versions</id>\n                        <goals>\n                            <goal>enforce</goal>\n                        </goals>\n                        <configuration>\n                            <rules>\n                                <DependencyConvergence/>\n                                <requireReleaseDeps>\n                                    <onlyWhenRelease>true</onlyWhenRelease>\n                                    <message>No Snapshots Allowed!</message>\n                                </requireReleaseDeps>\n                                <requireMavenVersion>\n                                    <version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>\n                                    <message>Maven 2.1.0 and 2.2.0 produce incorrect GPG signatures and checksums respectively.</message>\n                                </requireMavenVersion>\n                            </rules>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <artifactId>maven-dependency-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>copy-dependencies</goal>\n                        </goals>\n                        <configuration>\n                            <outputDirectory>${project.build.directory}/lib</outputDirectory>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-source-plugin</artifactId>\n                <version>3.3.0</version>\n                <executions>\n                    <execution>\n                        <id>attach-sources</id>\n                        <phase>verify</phase>\n                        <goals>\n                            <goal>jar-no-fork</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-javadoc-plugin</artifactId>\n                <version>3.6.2</version>\n                <configuration>\n                    <aggregate>true</aggregate>\n                    <source>1.8</source>\n                    <encoding>UTF-8</encoding>\n                    <maxmemory>1g</maxmemory>\n                    <links>\n                        <link>http://docs.oracle.com/javase/8/docs/api</link>\n                    </links>\n                    <excludePackageNames>${javadoc.package.exclude}</excludePackageNames>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>attach-javadocs</id>\n                        <phase>verify</phase>\n                        <goals>\n                            <goal>jar</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <version>3.3.0</version>\n                <configuration>\n                    <excludes>\n                        <exclude>**/logback.xml</exclude>\n                    </excludes>\n                    <archive>\n                        <manifestEntries>\n                            <mode>development</mode>\n                            <url>${project.url}</url>\n                            <implementation-version>${project.version}</implementation-version>\n                            <package>io.swagger</package>\n                        </manifestEntries>\n                    </archive>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-site-plugin</artifactId>\n                <version>3.12.1</version>\n            </plugin>\n            <plugin>\n                <groupId>org.sonatype.central</groupId>\n                <artifactId>central-publishing-maven-plugin</artifactId>\n                <version>0.7.0</version>\n                <extensions>true</extensions>\n                <configuration>\n                    <publishingServerId>central</publishingServerId>\n                    <autoPublish>true</autoPublish>\n                    <waitUntil>published</waitUntil>\n                    <waitMaxTime>3600</waitMaxTime>\n                </configuration>\n            </plugin>\n        </plugins>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>biz.aQute.bnd</groupId>\n                    <artifactId>bnd-maven-plugin</artifactId>\n                    <version>${bnd-version}</version>\n                    <configuration>\n                        <bnd><![CDATA[\n                            Bundle-SymbolicName: ${project.groupId}.${project.artifactId}\n                            -exportcontents: ${packages;NAMED;!*.internal}\n                            -noextraheaders: true\n                            -noclassforname: true\n                            -snapshot: SNAPSHOT\n                            -contract: \\\n                                JavaJAXRS;resolution:=optional,\\\n                                JavaServlet;resolution:=optional\n                            -define-contract: \\\n                                osgi.contract;\\\n                                    osgi.contract=JavaJAXRS;\\\n                                    version:List<Version>=\"2.0\";\\\n                                    uses:=\"\\\n                                        javax.ws.rs,\\\n                                        javax.ws.rs.core,\\\n                                        javax.ws.rs.ext,\\\n                                        javax.ws.rs.client,\\\n                                        javax.ws.rs.container\",\\\n                                osgi.contract;\\\n                                    osgi.contract=JavaServlet;\\\n                                    version:List<Version>=\"4.0\";\\\n                                    uses:=\"\\\n                                        javax.servlet,\\\n                                        javax.servlet.annotation,\\\n                                        javax.servlet.descriptor,\\\n                                        javax.servlet.http\"\n                            -cdiannotations:\n                        ]]></bnd>\n                    </configuration>\n                    <executions>\n                        <execution>\n                            <goals>\n                                <goal>bnd-process</goal>\n                            </goals>\n                        </execution>\n                    </executions>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-gpg-plugin</artifactId>\n                    <version>1.6</version>\n                    <configuration>\n                        <!-- Prevent `gpg` from using pinentry programs -->\n                        <gpgArguments>\n                            <arg>--pinentry-mode</arg>\n                            <arg>loopback</arg>\n                        </gpgArguments>\n                    </configuration>\n                </plugin>\n                <plugin>\n                    <groupId>org.eclipse.jetty</groupId>\n                    <artifactId>jetty-maven-plugin</artifactId>\n                    <version>${jetty-version}</version>\n                    <dependencies>\n                        <dependency>\n                            <groupId>org.glassfish.jersey.core</groupId>\n                            <artifactId>jersey-server</artifactId>\n                            <version>${jersey2-version}</version>\n                            <exclusions>\n                                <exclusion>\n                                    <groupId>org.javassist</groupId>\n                                    <artifactId>javassist</artifactId>\n                                </exclusion>\n                            </exclusions>\n                        </dependency>\n                        <dependency>\n                            <groupId>org.glassfish.jersey.containers</groupId>\n                            <artifactId>jersey-container-servlet</artifactId>\n                            <version>${jersey2-version}</version>\n                            <exclusions>\n                                <exclusion>\n                                    <groupId>org.javassist</groupId>\n                                    <artifactId>javassist</artifactId>\n                                </exclusion>\n                            </exclusions>\n                        </dependency>\n                        <dependency>\n                            <groupId>org.glassfish.jersey.media</groupId>\n                            <artifactId>jersey-media-multipart</artifactId>\n                            <version>${jersey2-version}</version>\n                            <exclusions>\n                                <exclusion>\n                                    <groupId>org.javassist</groupId>\n                                    <artifactId>javassist</artifactId>\n                                </exclusion>\n                            </exclusions>\n                        </dependency>\n                        <dependency>\n                            <groupId>org.glassfish.jersey.inject</groupId>\n                            <artifactId>jersey-hk2</artifactId>\n                            <version>${jersey2-version}</version>\n                            <exclusions>\n                                <exclusion>\n                                    <groupId>org.javassist</groupId>\n                                    <artifactId>javassist</artifactId>\n                                </exclusion>\n                            </exclusions>\n                        </dependency>\n                    </dependencies>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-enforcer-plugin</artifactId>\n                    <version>${enforcer-plugin-version}</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.jacoco</groupId>\n                    <artifactId>jacoco-maven-plugin</artifactId>\n                    <version>0.8.6</version>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n    <profiles>\n        <profile>\n            <id>security</id>\n            <build>\n                <plugins>\n                    <plugin>\n                        <groupId>org.owasp</groupId>\n                        <artifactId>dependency-check-maven</artifactId>\n                        <version>6.5.3</version>\n                        <configuration>\n                            <skipSystemScope>true</skipSystemScope>\n                        </configuration>\n                        <executions>\n                            <execution>\n                                <goals>\n                                    <goal>check</goal>\n                                </goals>\n                            </execution>\n                        </executions>\n                    </plugin>\n                </plugins>\n            </build>\n        </profile>\n        <profile>\n            <id>release</id>\n            <build>\n                <plugins>\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-gpg-plugin</artifactId>\n                        <version>1.6</version>\n                        <configuration>\n                            <!-- Prevent `gpg` from using pinentry programs -->\n                            <gpgArguments>\n                                <arg>--pinentry-mode</arg>\n                                <arg>loopback</arg>\n                            </gpgArguments>\n                        </configuration>\n                        <executions>\n                            <execution>\n                                <id>sign-artifacts</id>\n                                <phase>verify</phase>\n                                <goals>\n                                    <goal>sign</goal>\n                                </goals>\n                            </execution>\n                        </executions>\n                    </plugin>\n                </plugins>\n            </build>\n        </profile>\n        <profile>\n            <id>java-17-modules</id>\n            <activation>\n                <jdk>[17,)</jdk>\n            </activation>\n            <modules>\n                <module>modules/swagger-java17-support</module>\n            </modules>\n        </profile>\n\n    </profiles>\n    <modules>\n        <module>modules/swagger-annotations</module>\n        <module>modules/swagger-models</module>\n        <module>modules/swagger-core</module>\n        <module>modules/swagger-integration</module>\n        <module>modules/swagger-jaxrs2</module>\n        <module>modules/swagger-jaxrs2-servlet-initializer</module>\n        <module>modules/swagger-jaxrs2-servlet-initializer-v2</module>\n        <module>modules/swagger-maven-plugin</module>\n        <module>modules/swagger-eclipse-transformer-maven-plugin</module>\n        <module>modules/swagger-project-jakarta</module>\n\n    </modules>\n    <reporting>\n        <outputDirectory>target/site</outputDirectory>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-javadoc-plugin</artifactId>\n                <version>3.6.2</version>\n                <configuration>\n                    <aggregate>true</aggregate>\n                    <source>1.8</source>\n                    <encoding>UTF-8</encoding>\n                    <maxmemory>1g</maxmemory>\n                    <debug>true</debug>\n                    <links>\n                        <link>https://docs.oracle.com/javase/8/docs/api</link>\n                    </links>\n                    <excludePackageNames/>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jxr-plugin</artifactId>\n                <version>2.5</version>\n                <configuration>\n                    <aggregate>true</aggregate>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-project-info-reports-plugin</artifactId>\n                <version>2.9</version>\n                <reportSets>\n                    <reportSet>\n                        <reports>\n                            <report>project-team</report>\n                        </reports>\n                    </reportSet>\n                </reportSets>\n            </plugin>\n        </plugins>\n    </reporting>\n    <dependencyManagement>\n        <dependencies>\n            <dependency>\n                <groupId>org.apache.maven</groupId>\n                <artifactId>maven-plugin-tools-api</artifactId>\n                <version>3.5.1</version>\n            </dependency>\n            <dependency>\n                <groupId>org.slf4j</groupId>\n                <artifactId>slf4j-ext</artifactId>\n                <version>${slf4j-version}</version>\n                <scope>compile</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.slf4j</groupId>\n                <artifactId>slf4j-api</artifactId>\n                <version>${slf4j-version}</version>\n                <scope>compile</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.commons</groupId>\n                <artifactId>commons-lang3</artifactId>\n                <version>${commons-lang-version}</version>\n                <scope>compile</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.testng</groupId>\n                <artifactId>testng</artifactId>\n                <version>${testng-version}</version>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>io.rest-assured</groupId>\n                <artifactId>rest-assured</artifactId>\n                <version>${rest-assured-version}</version>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.httpcomponents</groupId>\n                <artifactId>httpmime</artifactId>\n                <version>${httpcomponents-version}</version>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.httpcomponents</groupId>\n                <artifactId>httpclient</artifactId>\n                <version>${httpcomponents-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.mockito</groupId>\n                <artifactId>mockito-core</artifactId>\n                <version>${mockito-version}</version>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>jakarta.servlet</groupId>\n                <artifactId>jakarta.servlet-api</artifactId>\n                <version>${servlet-api-version}</version>\n                <scope>provided</scope>\n            </dependency>\n            <dependency>\n                <groupId>jakarta.xml.bind</groupId>\n                <artifactId>jakarta.xml.bind-api</artifactId>\n                <version>${jakarta.xml.bind-api-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>jakarta.activation</groupId>\n                <artifactId>jakarta.activation-api</artifactId>\n                <version>${jakarta.activation-api-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.slf4j</groupId>\n                <artifactId>slf4j-log4j12</artifactId>\n                <version>${slf4j-version}</version>\n                <scope>provided</scope>\n            </dependency>\n            <dependency>\n                <groupId>commons-io</groupId>\n                <artifactId>commons-io</artifactId>\n                <version>${commons-io-version}</version>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>io.github.classgraph</groupId>\n                <artifactId>classgraph</artifactId>\n                <version>${classgraph-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>com.fasterxml.jackson.dataformat</groupId>\n                <artifactId>jackson-dataformat-yaml</artifactId>\n                <version>${jackson-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>com.fasterxml.jackson.core</groupId>\n                <artifactId>jackson-annotations</artifactId>\n                <version>${jackson-annotations-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>com.fasterxml.jackson.core</groupId>\n                <artifactId>jackson-databind</artifactId>\n                <version>${jackson-databind-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>com.fasterxml.jackson.core</groupId>\n                <artifactId>jackson-core</artifactId>\n                <version>${jackson-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>com.fasterxml.jackson.datatype</groupId>\n                <artifactId>jackson-datatype-jsr310</artifactId>\n                <version>${jackson-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>ch.qos.logback</groupId>\n                <artifactId>logback-classic</artifactId>\n                <version>${logback-version}</version>\n                <scope>provided</scope>\n            </dependency>\n            <dependency>\n                <groupId>ch.qos.logback</groupId>\n                <artifactId>logback-core</artifactId>\n                <version>${logback-version}</version>\n                <scope>provided</scope>\n            </dependency>\n            <dependency>\n                <groupId>joda-time</groupId>\n                <artifactId>joda-time</artifactId>\n                <version>${joda-time-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.joda</groupId>\n                <artifactId>joda-convert</artifactId>\n                <version>${joda-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.yaml</groupId>\n                <artifactId>snakeyaml</artifactId>\n                <version>${snakeyaml-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>jakarta.ws.rs</groupId>\n                <artifactId>jakarta.ws.rs-api</artifactId>\n                <version>${jakarta.ws-version}</version>\n            </dependency>\n            <dependency>\n                <groupId>com.google.guava</groupId>\n                <artifactId>guava</artifactId>\n                <version>${guava-version}</version>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.ant</groupId>\n                <artifactId>ant</artifactId>\n                <version>${ant-version}</version>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>commons-codec</groupId>\n                <artifactId>commons-codec</artifactId>\n                <version>${commons-codec-version}</version>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.codehaus.groovy</groupId>\n                <artifactId>groovy</artifactId>\n                <version>3.0.23</version>\n                <scope>test</scope>\n            </dependency>\n        </dependencies>\n    </dependencyManagement>\n    <properties>\n        <maven.compiler.release>8</maven.compiler.release>\n        <joda-version>2.2.4</joda-version>\n        <joda-time-version>2.13.0</joda-time-version>\n        <snakeyaml-version>2.3</snakeyaml-version>\n        <jakarta.ws-version>2.1.6</jakarta.ws-version>\n        <jakarta.xml.bind-api-version>2.3.3</jakarta.xml.bind-api-version>\n        <jakarta.activation-api-version>1.2.2</jakarta.activation-api-version>\n        <bnd-version>6.4.0</bnd-version>\n        <servlet-api-version>4.0.4</servlet-api-version>\n        <jersey2-version>2.46</jersey2-version>\n        <jackson-version>2.21.1</jackson-version>\n        <jackson-annotations-version>2.21</jackson-annotations-version>\n        <jackson-databind-version>2.21.1</jackson-databind-version>\n        <logback-version>1.5.25</logback-version>\n        <classgraph-version>4.8.184</classgraph-version>\n        <guava-version>32.1.3-jre</guava-version>\n        <ant-version>1.10.15</ant-version>\n        <commons-lang-version>3.20.0</commons-lang-version>\n        <commons-io-version>2.18.0</commons-io-version>\n        <slf4j-version>2.0.9</slf4j-version>\n        <jetty-version>9.4.56.v20240826</jetty-version>\n        <testng-version>7.10.2</testng-version>\n        <mockito-version>2.28.2</mockito-version>\n        <rest-assured-version>4.5.1</rest-assured-version>\n        <httpcomponents-version>4.5.14</httpcomponents-version>\n        <commons-codec-version>1.17.2</commons-codec-version>\n\n        <surefire-version>3.5.0</surefire-version>\n        <enforcer-plugin-version>3.2.1</enforcer-plugin-version>\n        <failsafe-plugin-version>2.22.2</failsafe-plugin-version>\n\n        <coverage.complexity.minimum>0.90</coverage.complexity.minimum>\n        <coverage.line.minimum>0.90</coverage.line.minimum>\n        <coverage.missed.classes>0</coverage.missed.classes>\n        <transformer-maven-plugin-version>0.5.0</transformer-maven-plugin-version>\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n    </properties>\n</project>\n"
  }
]